diff options
6 files changed, 166 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle index 3dec3c2e46..772903a830 100644 --- a/build.gradle +++ b/build.gradle @@ -52,7 +52,7 @@ targetCompatibility = JavaVersion.VERSION_1_8 //Jar Info archivesBaseName = "GT-PlusPlus" -version = "1.7.1.01-fresh" +version = "1.7.1.04-fresh" minecraft.version = "1.7.10-10.13.4.1614-1.7.10" minecraft { @@ -76,17 +76,24 @@ repositories { } } +task discordChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { + file = new File("CHANGELOG Basic ${project.version}.txt"); + untaggedName = "Current Basic release ${project.version}" + fromCommit = "4e5ee5845b872b09ba95dbcdaacbf7f9fbe0d699" + toRef = "HEAD" + templateContent = file('changeloggeneral.mustache').getText('UTF-8') +} task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { file = new File("CHANGELOG ${project.version}.md"); untaggedName = "Current release ${project.version}" - fromCommit = "e3a9829150afd77c0a00cb85be8b7c450d120dd1" + fromCommit = "4e5ee5845b872b09ba95dbcdaacbf7f9fbe0d699" toRef = "HEAD" templateContent = file('changelog.mustache').getText('UTF-8') } task curseChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { file = new File("CHANGELOG Curse ${project.version}.md"); untaggedName = "Current Curse release ${project.version}" - fromCommit = "e3a9829150afd77c0a00cb85be8b7c450d120dd1" + fromCommit = "4e5ee5845b872b09ba95dbcdaacbf7f9fbe0d699" toRef = "HEAD" templateContent = file('changelogcurse.mustache').getText('UTF-8') } @@ -130,6 +137,7 @@ artifacts { build.finalizedBy(gitChangelogTask) build.finalizedBy(curseChangelogTask) +build.finalizedBy(discordChangelogTask) processResources { // this will ensure that this task is redone when the versions change. diff --git a/changeloggeneral.mustache b/changeloggeneral.mustache new file mode 100644 index 0000000000..c014e557de --- /dev/null +++ b/changeloggeneral.mustache @@ -0,0 +1,17 @@ +# Generated via Git Changelog Gradle plugin + +# Legend +# (+) - Addition +# (-) - Removal +# (%) - Change +# ($) - Fix +# (^) - Update + +{{#commits}} + +[{{hash}}] | {{authorName}} | {{commitTime}} +{{{messageTitle}}} +{{#messageBodyItems}} +{{.}} +{{/messageBodyItems}} +{{/commits}}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java index cafc650352..2ec0c9abdd 100644 --- a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java +++ b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java @@ -114,6 +114,7 @@ public class COMPAT_HANDLER { GregtechThaumcraftDevices.run(); GregtechThreadedBuffers.run(); GregtechIndustrialMixer.run(); + GregtechCustomHatches.run(); //New Horizons Content NewHorizonsAccelerator.run(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 25e1b7d395..b2172519d5 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -343,7 +343,9 @@ public enum GregtechItemList implements GregtechItemContainer { Infinite_Item_Chest, - Industrial_Mixer, + Industrial_Mixer, + + Hatch_Input_Cryotheum, Hatch_Input_Pyrotheum, ; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java new file mode 100644 index 0000000000..5a12905756 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java @@ -0,0 +1,78 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; + +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; + +public class GT_MetaTileEntity_Hatch_CustomFluidBase extends GT_MetaTileEntity_Hatch_Input { + + public final Fluid mLockedFluid; + public final int mFluidCapacity; + + public GT_MetaTileEntity_Hatch_CustomFluidBase(Fluid aFluid, int aAmount, final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional, 6); + this.mRecipeMap = null; + this.mLockedFluid = aFluid; + this.mFluidCapacity = aAmount; + } + + public GT_MetaTileEntity_Hatch_CustomFluidBase(Fluid aFluid, int aAmount, final String aName, final String aDescription, + final ITexture[][][] aTextures) { + super(aName, 6, aDescription, aTextures); + this.mRecipeMap = null; + this.mLockedFluid = aFluid; + this.mFluidCapacity = aAmount; + } + + public GT_MetaTileEntity_Hatch_CustomFluidBase(Fluid aFluid, int aAmount, final String aName, final String[] aDescription, final ITexture[][][] aTextures) { + super(aName, 6, aDescription, aTextures); + this.mRecipeMap = null; + this.mLockedFluid = aFluid; + this.mFluidCapacity = aAmount; + } + + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + return aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0 + && (this.mRecipeMap == null || GT_Utility.getFluidForFilledItem(aStack, true).getFluid() == this.mLockedFluid); + } + + public ITexture[] getTexturesActive(final ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_PUMP)}; + } + + public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_PUMP)}; + } + + public int getCapacity() { + return this.mFluidCapacity; + } + + @Override + public String[] getDescription() { + String[] s2 = new String[]{ + "Fluid Input for Multiblocks", + "Capacity: " + getCapacity()+"L" + }; + return s2; + } + + public boolean isFluidInputAllowed(final FluidStack aFluid) { + return aFluid.getFluid() == this.mLockedFluid; + } + + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return (MetaTileEntity) new GT_MetaTileEntity_Hatch_CustomFluidBase(this.mLockedFluid, this.mFluidCapacity, this.mName, this.mDescriptionArray, this.mTextures); + } +}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java new file mode 100644 index 0000000000..6ad5ff2866 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java @@ -0,0 +1,56 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.enums.ItemList; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; + +public class GregtechCustomHatches { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Custom Fluid Hatches."); + run1(); + } + } + + private static void run1() { + + + GregtechItemList.Hatch_Input_Cryotheum.set( + new GT_MetaTileEntity_Hatch_CustomFluidBase( + FluidUtils.getFluidStack("cryotheum", 1).getFluid(), // Fluid to resitrct hatch to + 128000, // Capacity + 967, // ID + "hatch.cryotheum.input.tier.00", // unlocal name + "Cryotheum Cooling Hatch" //Local name + ).getStackForm(1L)); + + GregtechItemList.Hatch_Input_Pyrotheum.set( + new GT_MetaTileEntity_Hatch_CustomFluidBase( + FluidUtils.getFluidStack("pyrotheum", 1).getFluid(), // Fluid to resitrct hatch to + 128000, // Capacity + 968, // ID + "hatch.pyrotheum.input.tier.00", // unlocal name + "Pyrotheum Heating Vent" //Local name + ).getStackForm(1L)); + + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[6], ALLOY.MARAGING250.getGear(1), CI.component_Plate[6], + CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_AdvancedVacuum.get(1), CI.getTieredCircuitOreDictName(4), + CI.component_Plate[5], ItemList.Hatch_Input_IV.get(1), CI.component_Plate[5], + GregtechItemList.Hatch_Input_Cryotheum.get(1L, new Object[0])); + + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[5], ALLOY.MARAGING300.getGear(1), CI.component_Plate[5], + CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_Adv_BlastFurnace.get(1), CI.getTieredCircuitOreDictName(4), + CI.component_Plate[6], ItemList.Hatch_Input_IV.get(1), CI.component_Plate[6], + GregtechItemList.Hatch_Input_Pyrotheum.get(1L, new Object[0])); + + } + +} |