Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@
dependencies {
// Published dependencies
api("codechicken:codechickenlib:3.2.3.358") // CCL 3.2.3.358
api("com.cleanroommc:modularui:2.4.3") { transitive = false } // MUI 2.4.3
api("com.cleanroommc:modularui:2.5.0-rc1") { transitive = false } // MUI 2.5.0-rc1
api("com.cleanroommc:groovyscript:1.1.1") { transitive = false } // GrS 1.1.1
api("CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.700") // CrT 4.1.20.700
api rfg.deobf("curse.maven:ctm-267602:2915363") // CTM 1.0.2.31

// Hard Dependencies
devOnlyNonPublishable(rfg.deobf("curse.maven:gregtech-ce-unofficial-557242:5519022")) // CEu 2.8.10
devOnlyNonPublishable(rfg.deobf("curse.maven:gregicality-multiblocks-564858:5508050")) // GCYM 1.2.10

//devOnlyNonPublishable(rfg.deobf("curse.maven:gregtech-ce-unofficial-557242:5519022")) // CEu 2.8.10
devOnlyNonPublishable(rfg.deobf(project.files("libs/gregtech-1.12.2-2.9.0-beta-dev.jar"))) // CEu pr 2.9.0
//devOnlyNonPublishable(rfg.deobf("curse.maven:gregicality-multiblocks-564858:5508050")) // GCYM 1.2.10
devOnlyNonPublishable(rfg.deobf(project.files("libs/GregicalityMultiblocks-1.3.0-dev.jar"))) // GCYM pr 1.3.0
}
Binary file added libs/GregicalityMultiblocks-1.3.0-dev.jar
Binary file not shown.
Binary file added libs/gregtech-1.12.2-2.9.0-beta-dev.jar
Binary file not shown.
Binary file added libs/gregtech-1.12.2-2.9.0-beta-sources.jar
Binary file not shown.
10 changes: 9 additions & 1 deletion src/main/java/com/github/gtexpert/inb/INBMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

import gregtech.GTInternalTags;
import gregtech.api.GregTechAPI;
import gregtech.api.metatileentity.registry.MTEManager;

import com.github.gtexpert.inb.api.INBValues;
import com.github.gtexpert.inb.api.util.INBLog;
Expand All @@ -30,7 +32,8 @@
name = INBValues.MODNAME,
acceptedMinecraftVersions = "[1.12.2]",
version = Tags.VERSION,
dependencies = GTInternalTags.DEP_VERSION_STRING + "required-after:" + Mods.Names.MIXINBOOTER + ";" +
dependencies = GTInternalTags.DEP_VERSION_STRING + "required-after:" + Mods.Names.MODULRAUI + ";" +
"required-after:" + Mods.Names.MIXINBOOTER + ";" +
"required-after:" + Mods.Names.GREGICALITY_MULTIBLOCKS + ";")
@Mod.EventBusSubscriber(modid = INBValues.MODID)
public class INBMod {
Expand Down Expand Up @@ -146,6 +149,11 @@ public static <T extends Block> ItemBlock createItemBlock(T block, Function<T, I
return itemBlock;
}

@SubscribeEvent
public static void registerMTERegistry(MTEManager.MTERegistryEvent event) {
GregTechAPI.mteManager.createRegistry(INBValues.MODID);
}

@SubscribeEvent
public static void syncConfigValues(ConfigChangedEvent.OnConfigChangedEvent event) {
if (event.getModID().equals(INBValues.MODID)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

import static gregtech.api.GTValues.*;
import static gregtech.api.unification.ore.OrePrefix.dust;
import static gregtech.api.util.GTUtility.gregtechId;

import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;

import gregtech.api.gui.GuiTextures;
import gregtech.api.recipes.RecipeMap;
import gregtech.api.recipes.RecipeMapBuilder;
import gregtech.api.recipes.RecipeMaps;
import gregtech.api.recipes.builders.SimpleRecipeBuilder;
import gregtech.api.recipes.ingredients.GTRecipeInput;
Expand All @@ -31,57 +33,64 @@ public class INBRecipeMaps {
*
* This action cannot be negated, unlike special build actions for other recipe maps.
*/

@ZenProperty
public static final RecipeMap<SimpleRecipeBuilder> FAKE_IMPLOSION_RECIPES = new RecipeMap<>(
"fake_implosion_compressor", 3, 2, 0, 0,
new SimpleRecipeBuilder().duration(20).EUt(VA[LV]), true)
.onRecipeBuild(recipeBuilder -> {
public static final RecipeMap<SimpleRecipeBuilder> FAKE_IMPLOSION_RECIPES = new RecipeMapBuilder<>(
"fake_implosion_compressor",
new SimpleRecipeBuilder().duration(20).EUt(VA[LV]).hidden())
.itemInputs(3)
.itemOutputs(2)
.fluidInputs(0)
.fluidOutputs(0)
.onBuild(gregtechId("implosion_compressor"), recipeBuilder -> {
RecipeMaps.IMPLOSION_RECIPES.recipeBuilder()
.inputs(recipeBuilder.getInputs().toArray(new GTRecipeInput[0]))
.outputs(recipeBuilder.getOutputs())
.chancedOutputs(recipeBuilder.getChancedOutputs())
.explosivesType(new ItemStack(MetaBlocks.POWDERBARREL, 8))
.explosives(new ItemStack(MetaBlocks.POWDERBARREL, 8))
.buildAndRegister();

RecipeMaps.IMPLOSION_RECIPES.recipeBuilder()
.inputs(recipeBuilder.getInputs().toArray(new GTRecipeInput[0]))
.outputs(recipeBuilder.getOutputs())
.chancedOutputs(recipeBuilder.getChancedOutputs())
.explosivesAmount(4)
.explosives(4)
.buildAndRegister();

RecipeMaps.IMPLOSION_RECIPES.recipeBuilder()
.inputs(recipeBuilder.getInputs().toArray(new GTRecipeInput[0]))
.outputs(recipeBuilder.getOutputs())
.chancedOutputs(recipeBuilder.getChancedOutputs())
.explosivesType(MetaItems.DYNAMITE.getStackForm(2))
.explosives(MetaItems.DYNAMITE.getStackForm(2))
.buildAndRegister();

RecipeMaps.IMPLOSION_RECIPES.recipeBuilder()
.inputs(recipeBuilder.getInputs().toArray(new GTRecipeInput[0]))
.outputs(recipeBuilder.getOutputs())
.chancedOutputs(recipeBuilder.getChancedOutputs())
.explosivesType(new ItemStack(MetaBlocks.ITNT))
.explosives(new ItemStack(MetaBlocks.ITNT))
.buildAndRegister();
});
})
.build();

/**
* Any Recipe added to the Compressor not specifying an <B>EUt</B> value will default to 491,520.
* Any Recipe added to the Compressor not specifying a <B>duration</B> value will default to 1.
*/

@ZenProperty
public static final RecipeMap<SimpleRecipeBuilder> ELECTRIC_IMPLOSION_COMPRESSOR_RECIPES = new RecipeMap<>(
"electric_implosion_compressor", 6, 2, 0, 0,
new SimpleRecipeBuilder().duration(1).EUt(VA[UV]).chancedOutput(dust, Materials.DarkAsh, 2500, 0), false)
.setSlotOverlay(false, false, false, GuiTextures.IMPLOSION_OVERLAY_2)
.setSlotOverlay(false, false, false, GuiTextures.IMPLOSION_OVERLAY_2)
.setSlotOverlay(false, false, false, GuiTextures.IMPLOSION_OVERLAY_2)
.setSlotOverlay(false, false, false, GuiTextures.IMPLOSION_OVERLAY_2)
.setSlotOverlay(false, false, false, GuiTextures.IMPLOSION_OVERLAY_2)
.setSlotOverlay(false, false, true, GuiTextures.IMPLOSION_OVERLAY_2)
.setSlotOverlay(true, false, true, GuiTextures.DUST_OVERLAY)
.setSound(SoundEvents.ENTITY_GENERIC_EXPLODE)
.setSmallRecipeMap(RecipeMaps.IMPLOSION_RECIPES);
public static final RecipeMap<SimpleRecipeBuilder> ELECTRIC_IMPLOSION_COMPRESSOR_RECIPES = new RecipeMapBuilder<>(
"electric_implosion_compressor",
new SimpleRecipeBuilder().duration(1).EUt(VA[UV]).chancedOutput(dust, Materials.DarkAsh, 2500, 0))
.itemInputs(6)
.itemOutputs(2)
.fluidInputs(0)
.fluidOutputs(0)
.itemSlotOverlay(GuiTextures.IMPLOSION_OVERLAY_2, false, false)
.itemSlotOverlay(GuiTextures.IMPLOSION_OVERLAY_2, false, false)
.itemSlotOverlay(GuiTextures.IMPLOSION_OVERLAY_2, false, false)
.itemSlotOverlay(GuiTextures.IMPLOSION_OVERLAY_2, false, false)
.itemSlotOverlay(GuiTextures.IMPLOSION_OVERLAY_2, false, false)
.itemSlotOverlay(GuiTextures.IMPLOSION_OVERLAY_2, false, true)
.itemSlotOverlay(GuiTextures.DUST_OVERLAY, true, true)
.sound(SoundEvents.ENTITY_GENERIC_EXPLODE)
.build().setSmallRecipeMap(RecipeMaps.IMPLOSION_RECIPES);
}
17 changes: 9 additions & 8 deletions src/main/java/com/github/gtexpert/inb/core/INBCoreModule.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.github.gtexpert.inb.core;

import static gregtech.api.util.GTUtility.gregtechId;

import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.crafting.IRecipe;
Expand Down Expand Up @@ -52,14 +54,13 @@ public void construction(FMLConstructionEvent event) {}
public void preInit(FMLPreInitializationEvent event) {
proxy.preInit(event);

RecipeMaps.IMPLOSION_RECIPES.onRecipeBuild(
recipeBuilder -> {
INBRecipeMaps.ELECTRIC_IMPLOSION_COMPRESSOR_RECIPES.recipeBuilder()
.inputs(recipeBuilder.getInputs().toArray(new GTRecipeInput[0]))
.outputs(recipeBuilder.getOutputs())
.chancedOutputs(recipeBuilder.getChancedOutputs())
.buildAndRegister();
});
RecipeMaps.IMPLOSION_RECIPES.onRecipeBuild(gregtechId("implosion_compressor"), recipeBuilder -> {
INBRecipeMaps.ELECTRIC_IMPLOSION_COMPRESSOR_RECIPES.recipeBuilder()
.inputs(recipeBuilder.getInputs().toArray(new GTRecipeInput[0]))
.outputs(recipeBuilder.getOutputs())
.chancedOutputs(recipeBuilder.getChancedOutputs())
.buildAndRegister();
});
}

@Override
Expand Down
17 changes: 17 additions & 0 deletions src/main/resources/assets/inb/models/item/mte.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:cube_all",
"textures": {
"all": "blocks/iron_block"
}
},
"variants": {
"normal": [
{}
],
"inventory": [
{}
]
}
}
2 changes: 2 additions & 0 deletions src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
],
"credits": "",
"dependencies": [
"chickenchunks",
"modularui",
"mixinbooter",
"gregtech",
"gcym"
Expand Down