Skip to content

Commit 7ecea00

Browse files
authored
Merge branch 'master' into exnihilo
2 parents 4d6d0bb + e4d3f40 commit 7ecea00

File tree

209 files changed

+6388
-433
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+6388
-433
lines changed

dependencies.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ dependencies {
4141
compileOnlyApi "curse.maven:exnihilo-274456:2817545" // Ex Nihilo Creatio 0.4.7.2
4242
compileOnlyApi rfg.deobf("curse.maven:hwyla-253449:2568751") // HWYLA 1.8.26-B41
4343
compileOnlyApi rfg.deobf("curse.maven:baubles-227083:2518667") // Baubles 1.5.2
44+
compileOnlyApi rfg.deobf("curse.maven:forestry-59751:2684780") // Forestry 5.8.2.387
45+
46+
// Mods with Soft compat but which have no need to be in code, such as isModLoaded() checks and getModItem() recipes.
47+
// Uncomment any of these to test them in-game.
48+
49+
// runtimeOnly rfg.deobf("curse.maven:beebetteratbees-244516:2627215") // BeeBetterAtBees 2.0.3 (recommended to enable when testing Forestry compat)
50+
// runtimeOnly rfg.deobf("curse.maven:jei-bees-248370:2490058") // JEIBees 0.9.0.5 (recommended to enable when testing Forestry compat)
51+
// runtimeOnly rfg.deobf("curse.maven:binnies-mods-223525:2916129") // Binnie 2.5.1.203
52+
// runtimeOnly rfg.deobf("curse.maven:magic-bees-65764:2855061") // Magic Bees 3.2.25
53+
// runtimeOnly rfg.deobf("curse.maven:gendustry-70492:2516215") // Gendustry 1.6.5.8
54+
// runtimeOnly rfg.deobf("curse.maven:bdlib-70496:2518031") // BdLib 1.14.3.12
4455
}
4556

4657
minecraft {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ modGroup = gregtech
77

88
# Version of your mod.
99
# This field can be left empty if you want your mod's version to be determined by the latest git tag instead.
10-
modVersion = 2.7.3-beta
10+
modVersion = 2.7.4-beta
1111

1212
# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version)
1313
includeMCVersionJar = true

src/main/java/gregtech/GregTechMod.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
+ "required-after:codechickenlib@[3.2.3,);"
2525
+ "after:appliedenergistics2;"
2626
+ "after:forestry;"
27+
+ "after:extrabees;"
28+
+ "after:extratrees;"
29+
+ "after:genetics;"
30+
+ "after:magicbees;"
2731
+ "after:jei@[4.15.0,);"
2832
+ "after:crafttweaker@[4.1.20,);"
2933
+ "after:groovyscript@[0.6.0,);"

src/main/java/gregtech/api/GTValues.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,18 @@ public class GTValues {
147147
MODID_EN = "exnihilocreatio",
148148
MODID_HWYLA = "hwyla",
149149
MODID_BAUBLES = "baubles",
150-
MODID_TOP_ADDONS = "topaddons";
150+
MODID_TOP_ADDONS = "topaddons",
151+
MODID_IC2 = "ic2",
152+
MODID_GTFO = "gregtechfoodoption",
153+
MODID_BINNIE = "binniecore",
154+
MODID_XU2 = "extrautils2",
155+
MODID_TR = "techreborn",
156+
MODID_MB = "magicbees",
157+
MODID_EB = "extrabees",
158+
MODID_ET = "extratrees",
159+
MODID_GENETICS = "genetics",
160+
MODID_BOP = "biomesoplenty",
161+
MODID_TCON = "tconstruct";
151162

152163
private static Boolean isClient;
153164

src/main/java/gregtech/api/metatileentity/SimpleGeneratorMetaTileEntity.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,14 @@ protected ModularUI.Builder createGuiTemplate(EntityPlayer player) {
116116
@Override
117117
public void renderMetaTileEntity(CCRenderState renderState, Matrix4 translation, IVertexOperation[] pipeline) {
118118
super.renderMetaTileEntity(renderState, translation, pipeline);
119-
this.renderer.renderOrientedState(renderState, translation, pipeline, getFrontFacing(), workable.isActive(), workable.isWorkingEnabled());
119+
renderOverlays(renderState, translation, pipeline);
120120
Textures.ENERGY_OUT.renderSided(getFrontFacing(), renderState, translation, PipelineUtil.color(pipeline, GTValues.VC[getTier()]));
121121
}
122122

123+
protected void renderOverlays(CCRenderState renderState, Matrix4 translation, IVertexOperation[] pipeline) {
124+
this.renderer.renderOrientedState(renderState, translation, pipeline, getFrontFacing(), workable.isActive(), workable.isWorkingEnabled());
125+
}
126+
123127
@Override
124128
protected ModularUI createUI(EntityPlayer entityPlayer) {
125129
return createGuiTemplate(entityPlayer).build(getHolder(), entityPlayer);

src/main/java/gregtech/api/metatileentity/multiblock/MultiblockWithDisplayBase.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
import gregtech.api.gui.Widget;
99
import gregtech.api.gui.Widget.ClickData;
1010
import gregtech.api.gui.resources.TextureArea;
11-
import gregtech.api.gui.widgets.*;
11+
import gregtech.api.gui.widgets.AdvancedTextWidget;
12+
import gregtech.api.gui.widgets.ImageCycleButtonWidget;
13+
import gregtech.api.gui.widgets.ImageWidget;
14+
import gregtech.api.gui.widgets.IndicatorImageWidget;
1215
import gregtech.api.pattern.PatternMatchContext;
1316
import gregtech.api.pattern.TraceabilityPredicate;
1417
import gregtech.api.unification.OreDictUnifier;
@@ -328,15 +331,22 @@ public TraceabilityPredicate autoAbilities() {
328331
public TraceabilityPredicate autoAbilities(boolean checkMaintenance, boolean checkMuffler) {
329332
TraceabilityPredicate predicate = new TraceabilityPredicate();
330333
if (checkMaintenance && hasMaintenanceMechanics()) {
331-
predicate = predicate.or(abilities(MultiblockAbility.MAINTENANCE_HATCH)
332-
.setMinGlobalLimited(ConfigHolder.machines.enableMaintenance ? 1 : 0).setMaxGlobalLimited(1));
334+
predicate = predicate.or(maintenancePredicate());
333335
}
334336
if (checkMuffler && hasMufflerMechanics()) {
335337
predicate = predicate.or(abilities(MultiblockAbility.MUFFLER_HATCH).setMinGlobalLimited(1).setMaxGlobalLimited(1));
336338
}
337339
return predicate;
338340
}
339341

342+
protected TraceabilityPredicate maintenancePredicate() {
343+
if (hasMaintenanceMechanics()) {
344+
return abilities(MultiblockAbility.MAINTENANCE_HATCH)
345+
.setMinGlobalLimited(ConfigHolder.machines.enableMaintenance ? 1 : 0).setMaxGlobalLimited(1);
346+
}
347+
return new TraceabilityPredicate();
348+
}
349+
340350
/**
341351
* Called serverside to obtain text displayed in GUI
342352
* each element of list is displayed on new line

src/main/java/gregtech/api/modules/GregTechModule.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,47 @@
55
import java.lang.annotation.RetentionPolicy;
66
import java.lang.annotation.Target;
77

8+
/**
9+
* All of your {@link IGregTechModule} classes must be annotated with this to be registered.
10+
*/
811
@Target(ElementType.TYPE)
912
@Retention(RetentionPolicy.RUNTIME)
1013
public @interface GregTechModule {
1114

15+
/**
16+
* The ID of this module. Must be unique within its container.
17+
*/
1218
String moduleID();
1319

20+
/**
21+
* The ID of the container to associate this module with.
22+
*/
1423
String containerID();
1524

25+
/**
26+
* A human-readable name for this module.
27+
*/
1628
String name();
1729

30+
/**
31+
* A list of mod IDs that this module depends on. If any mods specified are not present, the module will not load.
32+
*/
1833
String[] modDependencies() default {};
1934

35+
/**
36+
* Whether this module is the "core" module for its container.
37+
* Each container must have exactly one core module, which will be loaded before all other modules in the container.
38+
* <p>
39+
* Core modules should not have mod dependencies.
40+
*/
2041
boolean coreModule() default false;
2142

2243
String author() default "";
2344

2445
String version() default "";
2546

26-
String descriptionKey() default "";
47+
/**
48+
* A description of this module in the module configuration file.
49+
*/
50+
String description() default "";
2751
}

src/main/java/gregtech/api/modules/IGregTechModule.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@
99
import java.util.List;
1010
import java.util.Set;
1111

12+
/**
13+
* All modules must implement this interface.
14+
* <p>
15+
* Provides methods for responding to FML lifecycle events, adding event bus subscriber classes, and processing IMC messages.
16+
*/
1217
public interface IGregTechModule {
1318

19+
/**
20+
* What other modules this module depends on.
21+
* <p>
22+
* e.g. <code>new ResourceLocation("gregtech", "foo_module")</code> represents a dependency on the module "foo_module" in the container "gregtech"
23+
*/
1424
@Nonnull
1525
default Set<ResourceLocation> getDependencyUids() {
1626
return Collections.emptySet();
@@ -46,9 +56,16 @@ default void serverStopping(FMLServerStoppingEvent event) {
4656
default void serverStopped(FMLServerStoppedEvent event) {
4757
}
4858

59+
/**
60+
* Register packets using GregTech's packet handling API here.
61+
*/
4962
default void registerPackets() {
5063
}
5164

65+
/**
66+
* @return A list of classes to subscribe to the Forge event bus.
67+
* As the class gets subscribed, not any specific instance, event handlers must be static!
68+
*/
5269
@Nonnull
5370
default List<Class<?>> getEventBusSubscribers() {
5471
return Collections.emptyList();
@@ -58,6 +75,9 @@ default boolean processIMC(FMLInterModComms.IMCMessage message) {
5875
return false;
5976
}
6077

78+
/**
79+
* @return A logger to use for this module.
80+
*/
6181
@Nonnull
6282
Logger getLogger();
6383
}

src/main/java/gregtech/api/modules/IModuleContainer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22

33
public interface IModuleContainer {
44

5+
/**
6+
* The ID of this container. If this is your mod's only container, you should use your mod ID to prevent collisions.
7+
*/
58
String getID();
69
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package gregtech.api.modules;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import java.lang.annotation.Target;
7+
8+
/**
9+
* Annotate your {@link IModuleContainer} with this for it to be automatically registered.
10+
*/
11+
@Target(ElementType.TYPE)
12+
@Retention(RetentionPolicy.RUNTIME)
13+
public @interface ModuleContainer {
14+
}

0 commit comments

Comments
 (0)