Skip to content

Commit

Permalink
GuideBook stuff (GregTechCEu#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yefancy authored Aug 21, 2021
1 parent 63adb22 commit 0f6c8b7
Show file tree
Hide file tree
Showing 624 changed files with 11,759 additions and 200 deletions.
4 changes: 4 additions & 0 deletions src/main/java/gregtech/GregTechMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import gregtech.api.model.ResourcePackHook;
import gregtech.api.net.NetworkHandler;
import gregtech.api.recipes.RecipeMap;
import gregtech.api.terminal.util.GuideJsonLoader;
import gregtech.api.unification.OreDictUnifier;
import gregtech.api.unification.material.IMaterialHandler;
import gregtech.api.unification.material.MaterialRegistry;
Expand All @@ -36,6 +37,8 @@
import gregtech.common.worldgen.WorldGenRubberTree;
import gregtech.integration.theoneprobe.TheOneProbeCompatibility;
import gregtech.loaders.dungeon.DungeonLootLoader;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.SimpleReloadableResourceManager;
import gregtech.loaders.recipe.component.AnnotatedComponentHandlerLoader;
import net.minecraftforge.classloading.FMLForgePlugin;
import net.minecraftforge.fluids.FluidRegistry;
Expand Down Expand Up @@ -63,6 +66,7 @@ public class GregTechMod {
BlockOreFactory.init();
BlockCompressedFactory.init();
BlockFrameFactory.init();
((SimpleReloadableResourceManager)Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new GuideJsonLoader());
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/gregtech/api/GTValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public class GTValues {
MODID_EIO = "enderio",
MODID_BC = "buildcraftcore",
MODID_COFH = "cofhcore",
MODID_APPENG = "appliedenergistics2";
MODID_APPENG = "appliedenergistics2",
MODID_JEI = "jei";

//because forge is too fucking retarded to cache results or at least do not create fucking
//immutable collections every time you retrieve indexed mod list
Expand Down
1 change: 0 additions & 1 deletion src/main/java/gregtech/api/GregTechAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ public static <T extends MetaTileEntity> T registerMetaTileEntity(int id, T samp
META_TILE_ENTITY_REGISTRY.register(id, sampleMetaTileEntity.metaTileEntityId, sampleMetaTileEntity);
return sampleMetaTileEntity;
}

}
16 changes: 16 additions & 0 deletions src/main/java/gregtech/api/gui/GuiTextures.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package gregtech.api.gui;

import gregtech.api.gui.resources.AdoptableTextureArea;
import gregtech.api.gui.resources.IGuiTexture;
import gregtech.api.gui.resources.SizedTextureArea;
import gregtech.api.gui.resources.TextureArea;

Expand Down Expand Up @@ -170,4 +171,19 @@ public class GuiTextures {
public static final TextureArea INFO_ICON = TextureArea.fullImage("textures/gui/widget/information.png");
public static final TextureArea MULTIBLOCK_CATEGORY = TextureArea.fullImage("textures/gui/icon/coke_oven.png");

//Terminal
public static final TextureArea ICON_REMOVE = TextureArea.fullImage("textures/gui/terminal/icon/remove_hover.png");
public static final TextureArea ICON_UP = TextureArea.fullImage("textures/gui/terminal/icon/up_hover.png");
public static final TextureArea ICON_DOWN = TextureArea.fullImage("textures/gui/terminal/icon/down_hover.png");
public static final TextureArea ICON_RIGHT = TextureArea.fullImage("textures/gui/terminal/icon/right_hover.png");
public static final TextureArea ICON_LEFT = TextureArea.fullImage("textures/gui/terminal/icon/left_hover.png");
public static final TextureArea ICON_ADD = TextureArea.fullImage("textures/gui/terminal/icon/add_hover.png");

public final static TextureArea ICON_NEW_PAGE = TextureArea.fullImage("textures/gui/terminal/icon/system/memory_card_hover.png");
public final static TextureArea ICON_LOAD = TextureArea.fullImage("textures/gui/terminal/icon/folder_hover.png");
public final static TextureArea ICON_SAVE = TextureArea.fullImage("textures/gui/terminal/icon/system/save_hover.png");
public final static TextureArea ICON_LOCATION = TextureArea.fullImage("textures/gui/terminal/icon/guide_hover.png");
public final static TextureArea ICON_VISIBLE = TextureArea.fullImage("textures/gui/terminal/icon/appearance_hover.png");
public final static TextureArea ICON_CALCULATOR = TextureArea.fullImage("textures/gui/terminal/icon/other/calculator_hover.png");

}
1 change: 1 addition & 0 deletions src/main/java/gregtech/api/gui/ModularUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public List<Widget> getFlatVisibleWidgetCollection() {
List<Widget> widgetList = new ArrayList<>(guiWidgets.size());

for (Widget widget : guiWidgets.values()) {
if (!widget.isVisible()) continue;
widgetList.add(widget);

if (widget instanceof AbstractWidgetGroup)
Expand Down
Loading

0 comments on commit 0f6c8b7

Please sign in to comment.