aboutsummaryrefslogtreecommitdiff
path: root/src/Java
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-07-26 04:23:36 +0100
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-07-26 04:23:36 +0100
commit9fe3f693f1d6d015f45898818b7958b3a57a9f4a (patch)
tree1e35a386d5ab58244e6a6e8249f947b321de5828 /src/Java
parent5a3076e52ea188c69851e0c8711937485123dc18 (diff)
downloadGT5-Unofficial-9fe3f693f1d6d015f45898818b7958b3a57a9f4a.tar.gz
GT5-Unofficial-9fe3f693f1d6d015f45898818b7958b3a57a9f4a.tar.bz2
GT5-Unofficial-9fe3f693f1d6d015f45898818b7958b3a57a9f4a.zip
+ Added config option to adjust ingame BGM delays. (Should be working)
+ Added a Pest Killer for quick removal of Butterflies and Bats. + Added Hydrogen Cyanide. % Replaced existing assets for the Bat King. % Replaced Bat King Logic, it's now an offensive mob. $ Fixed Bat King model scaling.
Diffstat (limited to 'src/Java')
-rw-r--r--src/Java/gtPlusPlus/GTplusplus.java2
-rw-r--r--src/Java/gtPlusPlus/api/interfaces/IPlugin.java3
-rw-r--r--src/Java/gtPlusPlus/api/objects/Logger.java2
-rw-r--r--src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java10
-rw-r--r--src/Java/gtPlusPlus/core/block/ModBlocks.java5
-rw-r--r--src/Java/gtPlusPlus/core/block/machine/Machine_PestKiller.java137
-rw-r--r--src/Java/gtPlusPlus/core/client/model/ModelBatKing.java120
-rw-r--r--src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java42
-rw-r--r--src/Java/gtPlusPlus/core/config/ConfigHandler.java1
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_PestKiller.java154
-rw-r--r--src/Java/gtPlusPlus/core/entity/monster/EntityBatKing.java540
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_PestKiller.java161
-rw-r--r--src/Java/gtPlusPlus/core/handler/GuiHandler.java9
-rw-r--r--src/Java/gtPlusPlus/core/inventories/InventoryPestKiller.java176
-rw-r--r--src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java55
-rw-r--r--src/Java/gtPlusPlus/core/lib/CORE.java2
-rw-r--r--src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java16
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotGeneric.java5
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java20
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java506
-rw-r--r--src/Java/gtPlusPlus/core/util/Utils.java45
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java12
-rw-r--r--src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java38
-rw-r--r--src/Java/gtPlusPlus/plugin/agrichem/Core_Agrichem.java10
-rw-r--r--src/Java/gtPlusPlus/plugin/fishing/Core_Fishing.java10
-rw-r--r--src/Java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java13
-rw-r--r--src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java59
-rw-r--r--src/Java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java130
-rw-r--r--src/Java/gtPlusPlus/plugin/manager/Core_Manager.java32
-rw-r--r--src/Java/gtPlusPlus/plugin/sulfurchem/Core_SulfuricChemistry.java10
-rw-r--r--src/Java/gtPlusPlus/plugin/villagers/Core_VillagerAdditions.java16
-rw-r--r--src/Java/gtPlusPlus/plugin/waila/Core_WailaPlugin.java10
-rw-r--r--src/Java/gtPlusPlus/preloader/CORE_Preloader.java3
-rw-r--r--src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java25
-rw-r--r--src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java29
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java8
37 files changed, 2079 insertions, 345 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java
index c51b2e2997..9813e550ad 100644
--- a/src/Java/gtPlusPlus/GTplusplus.java
+++ b/src/Java/gtPlusPlus/GTplusplus.java
@@ -238,12 +238,14 @@ public class GTplusplus implements ActionListener {
if (LoadedMods.Thaumcraft) {
event.registerServerCommand(new CommandDumpAspects());
}
+ Core_Manager.serverStart();
INIT_PHASE.STARTED.setPhaseActive(true);
}
@Mod.EventHandler
public synchronized void serverStopping(final FMLServerStoppingEvent event) {
mChunkLoading.serverStopping(event);
+ Core_Manager.serverStop();
if (GregtechBufferThread.mBufferThreadAllocation.size() > 0) {
for (GregtechBufferThread i : GregtechBufferThread.mBufferThreadAllocation.values()) {
i.destroy();
diff --git a/src/Java/gtPlusPlus/api/interfaces/IPlugin.java b/src/Java/gtPlusPlus/api/interfaces/IPlugin.java
index c3840476e9..67be182402 100644
--- a/src/Java/gtPlusPlus/api/interfaces/IPlugin.java
+++ b/src/Java/gtPlusPlus/api/interfaces/IPlugin.java
@@ -34,4 +34,7 @@ public interface IPlugin {
public boolean init();
public boolean postInit();
+ public boolean serverStart();
+ public boolean serverStop();
+
}
diff --git a/src/Java/gtPlusPlus/api/objects/Logger.java b/src/Java/gtPlusPlus/api/objects/Logger.java
index f994c40b52..616a241d89 100644
--- a/src/Java/gtPlusPlus/api/objects/Logger.java
+++ b/src/Java/gtPlusPlus/api/objects/Logger.java
@@ -112,7 +112,7 @@ public class Logger {
* Special Logger for Materials related content
*/
public static void MATERIALS(final String s) {
- if (CORE.DEVENV || CORE.DEBUG)
+ if (/* CORE.DEVENV || */CORE.DEBUG)
modLogger.info("[Materials] "+s);
}
/**
diff --git a/src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java b/src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java
index 82671acaea..543ec8e1fa 100644
--- a/src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java
+++ b/src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java
@@ -25,6 +25,16 @@ public final class Sample_Plugin implements IPlugin {
}
@Override
+ public boolean serverStart() {
+ return true;
+ }
+
+ @Override
+ public boolean serverStop() {
+ return true;
+ }
+
+ @Override
public String getPluginName() {
return "Sample Plugin";
}
diff --git a/src/Java/gtPlusPlus/core/block/ModBlocks.java b/src/Java/gtPlusPlus/core/block/ModBlocks.java
index b904b04556..b59facf9e2 100644
--- a/src/Java/gtPlusPlus/core/block/ModBlocks.java
+++ b/src/Java/gtPlusPlus/core/block/ModBlocks.java
@@ -18,6 +18,7 @@ import gtPlusPlus.core.block.machine.DecayablesChest;
import gtPlusPlus.core.block.machine.FishTrap;
import gtPlusPlus.core.block.machine.HeliumGenerator;
import gtPlusPlus.core.block.machine.Machine_ModularityTable;
+import gtPlusPlus.core.block.machine.Machine_PestKiller;
import gtPlusPlus.core.block.machine.Machine_PooCollector;
import gtPlusPlus.core.block.machine.Machine_ProjectTable;
import gtPlusPlus.core.block.machine.Machine_SuperJukebox;
@@ -91,6 +92,8 @@ public final class ModBlocks {
public static Block blockCustomJukebox;
public static Block blockPooCollector;
+
+ public static Block blockPestKiller;
public static void init() {
Logger.INFO("Initializing Blocks.");
@@ -142,6 +145,8 @@ public final class ModBlocks {
blockCustomJukebox = new Machine_SuperJukebox();
blockPooCollector = new Machine_PooCollector();
+
+ blockPestKiller = new Machine_PestKiller();
new BlockGenericRedstoneDetector();
new BlockGenericRedstoneTest();
diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_PestKiller.java b/src/Java/gtPlusPlus/core/block/machine/Machine_PestKiller.java
new file mode 100644
index 0000000000..11fa80f439
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/block/machine/Machine_PestKiller.java
@@ -0,0 +1,137 @@
+package gtPlusPlus.core.block.machine;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.GTplusplus;
+import gtPlusPlus.api.interfaces.ITileTooltip;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.handler.GuiHandler;
+import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller;
+import gtPlusPlus.core.util.minecraft.InventoryUtils;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.EnumCreatureType;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+public class Machine_PestKiller extends BlockContainer implements ITileTooltip
+{
+ @SideOnly(Side.CLIENT)
+ private IIcon textureTop;
+ @SideOnly(Side.CLIENT)
+ private IIcon textureBottom;
+ @SideOnly(Side.CLIENT)
+ private IIcon textureFront;
+
+ /**
+ * Determines which tooltip is displayed within the itemblock.
+ */
+ private final int mTooltipID = 6;
+
+ @Override
+ public int getTooltipID() {
+ return this.mTooltipID;
+ }
+
+ @SuppressWarnings("deprecation")
+ public Machine_PestKiller()
+ {
+ super(Material.wood);
+ this.setBlockName("blockPestKiller");
+ this.setHardness(5f);
+ this.setResistance(1f);
+ this.setCreativeTab(AddToCreativeTab.tabMachines);
+ GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockPestKiller");
+ LanguageRegistry.addName(this, "Pest Killer");
+
+ }
+
+ /**
+ * Gets the block's texture. Args: side, meta
+ */
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(final int aSide, final int p_149691_2_)
+ {
+ return aSide == 1 ? this.textureTop : (aSide == 0 ? this.textureBottom : this.textureFront);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(final IIconRegister p_149651_1_)
+ {
+ this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "MACHINE_CASING_FARM_MANAGER_STRUCTURAL");
+ this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "MACHINE_PESTKILLER_TOP");
+ this.textureBottom = p_149651_1_.registerIcon("planks_acacia");
+ this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "MACHINE_CASING_FARM_MANAGER_STRUCTURAL");
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ @Override
+ public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz)
+ {
+ if (world.isRemote) {
+ return true;
+ }
+
+ final TileEntity te = world.getTileEntity(x, y, z);
+ if ((te != null) && (te instanceof TileEntityPestKiller)){
+ player.openGui(GTplusplus.instance, GuiHandler.GUI15, world, x, y, z);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int getRenderBlockPass() {
+ return 0;
+ }
+
+ @Override
+ public boolean isOpaqueCube() {
+ return false;
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(final World world, final int p_149915_2_) {
+ return new TileEntityPestKiller();
+ }
+
+ @Override
+ public void onBlockAdded(final World world, final int x, final int y, final int z) {
+ super.onBlockAdded(world, x, y, z);
+ }
+
+ @Override
+ public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int number) {
+ InventoryUtils.dropInventoryItems(world, x, y, z, block);
+ super.breakBlock(world, x, y, z, block, number);
+ }
+
+ @Override
+ public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) {
+ if (stack.hasDisplayName()) {
+ ((TileEntityPestKiller) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName());
+ }
+ }
+
+ @Override
+ public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) {
+ return false;
+ }
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/client/model/ModelBatKing.java b/src/Java/gtPlusPlus/core/client/model/ModelBatKing.java
new file mode 100644
index 0000000000..ac64dee26a
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/client/model/ModelBatKing.java
@@ -0,0 +1,120 @@
+package gtPlusPlus.core.client.model;
+
+import org.lwjgl.opengl.GL11;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.core.entity.monster.EntityBatKing;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.passive.EntityBat;
+import net.minecraft.util.MathHelper;
+
+@SideOnly(Side.CLIENT)
+public class ModelBatKing extends ModelBase
+{
+ private ModelRenderer batHead;
+ /** The body box of the bat model. */
+ private ModelRenderer batBody;
+ /** The inner right wing box of the bat model. */
+ private ModelRenderer batRightWing;
+ /** The inner left wing box of the bat model. */
+ private ModelRenderer batLeftWing;
+ /** The outer right wing box of the bat model. */
+ private ModelRenderer batOuterRightWing;
+ /** The outer left wing box of the bat model. */
+ private ModelRenderer batOuterLeftWing;
+
+ public ModelBatKing()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 64;
+
+ this.batHead = new ModelRenderer(this, 0, 0);
+ this.batHead.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6);
+ ModelRenderer modelrenderer = new ModelRenderer(this, 24, 0);
+ modelrenderer.addBox(-4.0F, -6.0F, -2.0F, 3, 4, 1);
+ this.batHead.addChild(modelrenderer);
+ ModelRenderer modelrenderer1 = new ModelRenderer(this, 24, 0);
+ modelrenderer1.mirror = true;
+ modelrenderer1.addBox(1.0F, -6.0F, -2.0F, 3, 4, 1);
+ this.batHead.addChild(modelrenderer1);
+ this.batBody = new ModelRenderer(this, 0, 16);
+ this.batBody.addBox(-3.0F, 4.0F, -3.0F, 6, 12, 6);
+ this.batBody.setTextureOffset(0, 34).addBox(-5.0F, 16.0F, 0.0F, 10, 6, 1);
+ this.batRightWing = new ModelRenderer(this, 42, 0);
+ this.batRightWing.addBox(-12.0F, 1.0F, 1.5F, 10, 16, 1);
+ this.batOuterRightWing = new ModelRenderer(this, 24, 16);
+ this.batOuterRightWing.setRotationPoint(-12.0F, 1.0F, 1.5F);
+ this.batOuterRightWing.addBox(-8.0F, 1.0F, 0.0F, 8, 12, 1);
+ this.batLeftWing = new ModelRenderer(this, 42, 0);
+ this.batLeftWing.mirror = true;
+ this.batLeftWing.addBox(2.0F, 1.0F, 1.5F, 10, 16, 1);
+ this.batOuterLeftWing = new ModelRenderer(this, 24, 16);
+ this.batOuterLeftWing.mirror = true;
+ this.batOuterLeftWing.setRotationPoint(12.0F, 1.0F, 1.5F);
+ this.batOuterLeftWing.addBox(0.0F, 1.0F, 0.0F, 8, 12, 1);
+ this.batBody.addChild(this.batRightWing);
+ this.batBody.addChild(this.batLeftWing);
+ this.batRightWing.addChild(this.batOuterRightWing);
+ this.batLeftWing.addChild(this.batOuterLeftWing);
+ }
+
+ /**
+ * not actually sure this is size, is not used as of now, but the model would be recreated if the value changed and
+ * it seems a good match for a bats size
+ */
+ public int getBatSize()
+ {
+ return 72;
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_)
+ {
+ EntityBatKing entitybat = (EntityBatKing)p_78088_1_;
+ float f6;
+
+ if (entitybat.getIsBatHanging())
+ {
+ f6 = (180F / (float)Math.PI);
+ this.batHead.rotateAngleX = p_78088_6_ / (180F / (float)Math.PI);
+ this.batHead.rotateAngleY = (float)Math.PI - p_78088_5_ / (180F / (float)Math.PI);
+ this.batHead.rotateAngleZ = (float)Math.PI;
+ this.batHead.setRotationPoint(0.0F, -2.0F, 0.0F);
+ this.batRightWing.setRotationPoint(-3.0F, 0.0F, 3.0F);
+ this.batLeftWing.setRotationPoint(3.0F, 0.0F, 3.0F);
+ this.batBody.rotateAngleX = (float)Math.PI;
+ this.batRightWing.rotateAngleX = -0.15707964F;
+ this.batRightWing.rotateAngleY = -((float)Math.PI * 2F / 5F);
+ this.batOuterRightWing.rotateAngleY = -1.7278761F;
+ this.batLeftWing.rotateAngleX = this.batRightWing.rotateAngleX;
+ this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
+ this.batOuterLeftWing.rotateAngleY = -this.batOuterRightWing.rotateAngleY;
+ }
+ else
+ {
+ f6 = (180F / (float)Math.PI);
+ this.batHead.rotateAngleX = p_78088_6_ / (180F / (float)Math.PI);
+ this.batHead.rotateAngleY = p_78088_5_ / (180F / (float)Math.PI);
+ this.batHead.rotateAngleZ = 0.0F;
+ this.batHead.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.batRightWing.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.batLeftWing.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.batBody.rotateAngleX = ((float)Math.PI / 4F) + MathHelper.cos(p_78088_4_ * 0.1F) * 0.15F;
+ this.batBody.rotateAngleY = 0.0F;
+ this.batRightWing.rotateAngleY = MathHelper.cos(p_78088_4_ * 1.3F) * (float)Math.PI * 0.25F;
+ this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
+ this.batOuterRightWing.rotateAngleY = this.batRightWing.rotateAngleY * 0.5F;
+ this.batOuterLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY * 0.5F;
+ }
+
+
+ GL11.glScalef(4, 4, 4);
+ this.batHead.render(p_78088_7_);
+ this.batBody.render(p_78088_7_);
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java b/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java
index fb260eedeb..000badb80f 100644
--- a/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java
+++ b/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java
@@ -1,21 +1,23 @@
package gtPlusPlus.core.client.renderer;
+import org.lwjgl.opengl.GL11;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import net.minecraft.client.model.ModelBat;
+import gtPlusPlus.core.client.model.ModelBatKing;
+import gtPlusPlus.core.entity.monster.EntityBatKing;
+import gtPlusPlus.core.lib.CORE;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.passive.EntityBat;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
-import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class RenderBatKing extends RenderLiving {
- private static final ResourceLocation batTextures = new ResourceLocation("textures/entity/bat.png");
+ private static final ResourceLocation batTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/batKing.png");
/**
* not actually sure this is size, is not used as of now, but the model would be
@@ -24,8 +26,8 @@ public class RenderBatKing extends RenderLiving {
private int renderedBatSize;
public RenderBatKing() {
- super(new ModelBat(), 1F);
- this.renderedBatSize = ((ModelBat) this.mainModel).getBatSize();
+ super(new ModelBatKing(), 0.7F);
+ this.renderedBatSize = (((ModelBatKing) this.mainModel).getBatSize());
}
/**
@@ -36,13 +38,13 @@ public class RenderBatKing extends RenderLiving {
* func_76986_a(T entity, double d, double d1, double d2, float f, float f1).
* But JAD is pre 1.5 so doesn't do that.
*/
- public void doRender(EntityBat p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_,
+ public void doRender(EntityBatKing p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_,
float p_76986_8_, float p_76986_9_) {
- int i = ((ModelBat) this.mainModel).getBatSize();
+ int i = ((ModelBatKing) this.mainModel).getBatSize();
if (i != this.renderedBatSize) {
this.renderedBatSize = i;
- this.mainModel = new ModelBat();
+ this.mainModel = new ModelBatKing();
}
super.doRender((EntityLiving) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
@@ -52,7 +54,7 @@ public class RenderBatKing extends RenderLiving {
* Returns the location of an entity's texture. Doesn't seem to be called unless
* you call Render.bindEntityTexture.
*/
- protected ResourceLocation getEntityTexture(EntityBat p_110775_1_) {
+ protected ResourceLocation getEntityTexture(EntityBatKing p_110775_1_) {
return batTextures;
}
@@ -60,18 +62,18 @@ public class RenderBatKing extends RenderLiving {
* Allows the render to do any OpenGL state modifications necessary before the
* model is rendered. Args: entityLiving, partialTickTime
*/
- protected void preRenderCallback(EntityBat p_77041_1_, float p_77041_2_) {
+ protected void preRenderCallback(EntityBatKing p_77041_1_, float p_77041_2_) {
GL11.glScalef(0.35F, 0.35F, 0.35F);
}
/**
* Sets a simple glTranslate on a LivingEntity.
*/
- protected void renderLivingAt(EntityBat p_77039_1_, double p_77039_2_, double p_77039_4_, double p_77039_6_) {
+ protected void renderLivingAt(EntityBatKing p_77039_1_, double p_77039_2_, double p_77039_4_, double p_77039_6_) {
super.renderLivingAt(p_77039_1_, p_77039_2_, p_77039_4_, p_77039_6_);
}
- protected void rotateCorpse(EntityBat p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) {
+ protected void rotateCorpse(EntityBatKing p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) {
if (!p_77043_1_.getIsBatHanging()) {
GL11.glTranslatef(0.0F, MathHelper.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F);
} else {
@@ -91,7 +93,7 @@ public class RenderBatKing extends RenderLiving {
*/
public void doRender(EntityLiving p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_,
float p_76986_8_, float p_76986_9_) {
- this.doRender((EntityBat) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ this.doRender((EntityBatKing) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
/**
@@ -99,11 +101,11 @@ public class RenderBatKing extends RenderLiving {
* model is rendered. Args: entityLiving, partialTickTime
*/
protected void preRenderCallback(EntityLivingBase p_77041_1_, float p_77041_2_) {
- this.preRenderCallback((EntityBat) p_77041_1_, p_77041_2_);
+ this.preRenderCallback((EntityBatKing) p_77041_1_, p_77041_2_);
}
protected void rotateCorpse(EntityLivingBase p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) {
- this.rotateCorpse((EntityBat) p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_);
+ this.rotateCorpse((EntityBatKing) p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_);
}
/**
@@ -111,7 +113,7 @@ public class RenderBatKing extends RenderLiving {
*/
protected void renderLivingAt(EntityLivingBase p_77039_1_, double p_77039_2_, double p_77039_4_,
double p_77039_6_) {
- this.renderLivingAt((EntityBat) p_77039_1_, p_77039_2_, p_77039_4_, p_77039_6_);
+ this.renderLivingAt((EntityBatKing) p_77039_1_, p_77039_2_, p_77039_4_, p_77039_6_);
}
/**
@@ -124,7 +126,7 @@ public class RenderBatKing extends RenderLiving {
*/
public void doRender(EntityLivingBase p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_,
float p_76986_8_, float p_76986_9_) {
- this.doRender((EntityBat) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ this.doRender((EntityBatKing) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
/**
@@ -132,7 +134,7 @@ public class RenderBatKing extends RenderLiving {
* you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
- return this.getEntityTexture((EntityBat) p_110775_1_);
+ return this.getEntityTexture((EntityBatKing) p_110775_1_);
}
/**
@@ -145,6 +147,6 @@ public class RenderBatKing extends RenderLiving {
*/
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
float p_76986_9_) {
- this.doRender((EntityBat) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ this.doRender((EntityBatKing) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/config/ConfigHandler.java b/src/Java/gtPlusPlus/core/config/ConfigHandler.java
index 89c1324a54..ecaf031030 100644
--- a/src/Java/gtPlusPlus/core/config/ConfigHandler.java
+++ b/src/Java/gtPlusPlus/core/config/ConfigHandler.java
@@ -176,6 +176,7 @@ public class ConfigHandler {
"Enables Custom GT++ Cape.");
disableZombieReinforcement = config.getBoolean("disableZombieReinforcement", "features", false,
"Disables Zombie Reinforcement on hard difficutly.");
+ enableWatchdogBGM = config.getInt("enableWatchdogBGM", "features", 0, 0, Short.MAX_VALUE, "Set to a value greater than 0 to reduce the ticks taken to delay between BGM tracks. Acceptable Values are 1-32767, where 0 is disabled. Vanilla Uses 12,000 & 24,000. 200 is 10s.");
//Biomes
EVERGLADES_ID = config.getInt("darkworld_ID", "worldgen", 227, 1, 254, "The ID of the Dark Dimension.");
diff --git a/src/Java/gtPlusPlus/core/container/Container_PestKiller.java b/src/Java/gtPlusPlus/core/container/Container_PestKiller.java
new file mode 100644
index 0000000000..2f25c5aace
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/container/Container_PestKiller.java
@@ -0,0 +1,154 @@
+package gtPlusPlus.core.container;
+
+import gregtech.api.gui.GT_Slot_Render;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.inventories.InventoryPestKiller;
+import gtPlusPlus.core.slots.SlotGeneric;
+import gtPlusPlus.core.slots.SlotNoInput;
+import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import net.minecraftforge.fluids.FluidStack;
+
+public class Container_PestKiller extends Container {
+
+ public TileEntityPestKiller tile_entity;
+ public final InventoryPestKiller inventoryChest;
+
+ private final World worldObj;
+ private final int posX;
+ private final int posY;
+ private final int posZ;
+
+ public static int StorageSlotNumber = 3; // Number of slots in storage area
+ public static int InventorySlotNumber = 36; // Inventory Slots (Inventory
+ // and Hotbar)
+ public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All
+ // slots
+
+ public Container_PestKiller(final InventoryPlayer inventory, final TileEntityPestKiller te) {
+ this.tile_entity = te;
+ this.inventoryChest = te.getInventory();
+ te.openInventory();
+ int var6;
+ int var7;
+ this.worldObj = te.getWorldObj();
+ this.posX = te.xCoord;
+ this.posY = te.yCoord;
+ this.posZ = te.zCoord;
+ int o = 0;
+
+ int aSlotX = 134;
+
+ this.addSlotToContainer(new SlotGeneric(this.inventoryChest, o++, aSlotX, 10));
+ this.addSlotToContainer(new SlotNoInput(this.inventoryChest, o++, aSlotX, 60));
+ addSlotToContainer(new GT_Slot_Render(tile_entity, o++, aSlotX, 35));
+
+ // Player Inventory
+ for (var6 = 0; var6 < 3; ++var6) {
+ for (var7 = 0; var7 < 9; ++var7) {
+ this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18)));
+ }
+ }
+
+ // Player Hotbar
+ for (var6 = 0; var6 < 9; ++var6) {
+ this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142));
+ }
+
+ }
+
+ public FluidStack getFluidOfStoredTank() {
+ if (tile_entity != null) {
+ if (tile_entity.getTank() != null) {
+ return tile_entity.getTank().getFluid();
+ }
+ }
+ return null;
+ }
+
+ public int getFluidStoredAmount() {
+ FluidStack f = getFluidOfStoredTank();
+ return f == null ? 0 : f.amount;
+ }
+
+ @Override
+ public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer) {
+ boolean fluid = false;
+ if (aSlotIndex == 2) {
+ fluid = true;
+ }
+ if (!fluid) {
+ return super