From cc2833098fb2599b544ff2e84e7d622939cb7921 Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 16 Apr 2023 21:28:45 +0200 Subject: [PATCH 1/9] bolt gun --- src/main/java/api/hbm/block/IToolable.java | 3 +- src/main/java/com/hbm/blocks/ModBlocks.java | 4 +- .../com/hbm/blocks/generic/BlockBoltable.java | 72 + .../java/com/hbm/items/IAnimatedItem.java | 14 + src/main/java/com/hbm/items/ModItems.java | 7 +- .../com/hbm/items/tool/ItemBlowtorch.java | 1 + .../java/com/hbm/items/tool/ItemBoltgun.java | 78 + src/main/java/com/hbm/main/ClientProxy.java | 23 +- .../java/com/hbm/main/ResourceManager.java | 2 + .../hbm/render/item/ItemRenderBoltgun.java | 98 + .../item/weapon/ItemRenderChainsaw.java | 3 - .../tileentity/machine/TileEntityWatz.java | 6 +- .../assets/hbm/models/weapons/boltgun.obj | 2415 +++++++++++++++++ .../hbm/textures/models/weapons/boltgun.png | Bin 0 -> 1069 bytes 14 files changed, 2708 insertions(+), 18 deletions(-) create mode 100644 src/main/java/com/hbm/blocks/generic/BlockBoltable.java create mode 100644 src/main/java/com/hbm/items/IAnimatedItem.java create mode 100644 src/main/java/com/hbm/items/tool/ItemBoltgun.java create mode 100644 src/main/java/com/hbm/render/item/ItemRenderBoltgun.java create mode 100644 src/main/resources/assets/hbm/models/weapons/boltgun.obj create mode 100644 src/main/resources/assets/hbm/textures/models/weapons/boltgun.png diff --git a/src/main/java/api/hbm/block/IToolable.java b/src/main/java/api/hbm/block/IToolable.java index 3a2a87931..429a14d59 100644 --- a/src/main/java/api/hbm/block/IToolable.java +++ b/src/main/java/api/hbm/block/IToolable.java @@ -12,6 +12,7 @@ public interface IToolable { HAND_DRILL, DEFUSER, WRENCH, - TORCH + TORCH, + BOLT } } diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 492d2092f..b3b3d3e51 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -1981,7 +1981,7 @@ public class ModBlocks { watz_element = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_element_top").setBlockName("watz_element").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_element_side"); watz_control = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_control_top").setBlockName("watz_control").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_control_side"); watz_cooler = new BlockGeneric(Material.iron).setBlockName("watz_cooler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_cooler"); - watz_end = new BlockGeneric(Material.iron).setBlockName("watz_end").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_casing"); + watz_end = new BlockBoltable(Material.iron).setBlockName("watz_end").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_casing"); watz_hatch = new WatzHatch(Material.iron).setBlockName("watz_hatch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_hatch"); watz_conductor = new BlockCableConnect(Material.iron).setBlockName("watz_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_conductor_top"); watz_core = new WatzCore(Material.iron).setBlockName("watz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_computer"); @@ -3263,7 +3263,7 @@ public class ModBlocks { GameRegistry.registerBlock(watz_element, watz_element.getUnlocalizedName()); GameRegistry.registerBlock(watz_control, watz_control.getUnlocalizedName()); GameRegistry.registerBlock(watz_cooler, watz_cooler.getUnlocalizedName()); - GameRegistry.registerBlock(watz_end, watz_end.getUnlocalizedName()); + register(watz_end); GameRegistry.registerBlock(watz_hatch, watz_hatch.getUnlocalizedName()); GameRegistry.registerBlock(watz_conductor, watz_conductor.getUnlocalizedName()); GameRegistry.registerBlock(watz_core, watz_core.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/blocks/generic/BlockBoltable.java b/src/main/java/com/hbm/blocks/generic/BlockBoltable.java new file mode 100644 index 000000000..87ff806ed --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockBoltable.java @@ -0,0 +1,72 @@ +package com.hbm.blocks.generic; + +import java.util.ArrayList; +import java.util.List; + +import com.hbm.blocks.BlockBase; +import com.hbm.blocks.IBlockMulti; +import com.hbm.blocks.ILookOverlay; +import com.hbm.inventory.RecipesCommon.AStack; +import com.hbm.items.ModItems; +import com.hbm.util.I18nUtil; + +import api.hbm.block.IToolable; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.material.Material; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; + +public class BlockBoltable extends BlockBase implements IToolable, ILookOverlay, IBlockMulti { + + public BlockBoltable(Material mat) { + super(mat); + } + + @Override + public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) { + if(tool != ToolType.BOLT) return false; + + return true; + } + + public List getMaterials(int meta) { + List list = new ArrayList(); + + return list; + } + + @Override + @SideOnly(Side.CLIENT) + public void printHook(Pre event, World world, int x, int y, int z) { + + ItemStack held = Minecraft.getMinecraft().thePlayer.getHeldItem(); + if(held == null || held.getItem() != ModItems.boltgun) return; + + List text = new ArrayList(); + text.add(EnumChatFormatting.GOLD + "Requires:"); + List materials = getMaterials(world.getBlockMetadata(x, y, z)); + + for(AStack stack : materials) { + try { + ItemStack display = stack.extractForCyclingDisplay(20); + text.add("- " + display.getDisplayName() + " x" + display.stackSize); + } catch(Exception ex) { + text.add(EnumChatFormatting.RED + "- ERROR"); + } + } + + if(!materials.isEmpty()) { + ILookOverlay.printGeneric(event, I18nUtil.resolveKey(this.getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text); + } + } + + @Override + public int getSubCount() { + return 1; + } +} diff --git a/src/main/java/com/hbm/items/IAnimatedItem.java b/src/main/java/com/hbm/items/IAnimatedItem.java new file mode 100644 index 000000000..1457b72a2 --- /dev/null +++ b/src/main/java/com/hbm/items/IAnimatedItem.java @@ -0,0 +1,14 @@ +package com.hbm.items; + +import com.hbm.render.anim.BusAnimation; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +@SideOnly(Side.CLIENT) +public interface IAnimatedItem { + + public BusAnimation getAnimation(NBTTagCompound data, ItemStack stack); +} diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index c9708afcd..d63f62630 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -1802,6 +1802,7 @@ public class ModItems { public static Item chemistry_set_boron; public static Item blowtorch; public static Item acetylene_torch; + public static Item boltgun; public static Item overfuse; public static Item arc_electrode; public static Item arc_electrode_burnt; @@ -4408,6 +4409,7 @@ public class ModItems { chemistry_set_boron = new ItemCraftingDegradation(0).setUnlocalizedName("chemistry_set_boron"); blowtorch = new ItemBlowtorch().setUnlocalizedName("blowtorch"); acetylene_torch = new ItemBlowtorch().setUnlocalizedName("acetylene_torch"); + boltgun = new ItemBoltgun().setUnlocalizedName("boltgun"); overfuse = new ItemCustomLore().setUnlocalizedName("overfuse").setMaxStackSize(1).setFull3D().setTextureName(RefStrings.MODID + ":overfuse"); arc_electrode = new ItemCustomLore().setUnlocalizedName("arc_electrode").setMaxDamage(250).setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setFull3D().setTextureName(RefStrings.MODID + ":arc_electrode"); arc_electrode_burnt = new Item().setUnlocalizedName("arc_electrode_burnt").setMaxStackSize(1).setFull3D().setTextureName(RefStrings.MODID + ":arc_electrode_burnt"); @@ -6431,15 +6433,12 @@ public class ModItems { GameRegistry.registerItem(chemistry_set_boron, chemistry_set_boron.getUnlocalizedName()); GameRegistry.registerItem(blowtorch, blowtorch.getUnlocalizedName()); GameRegistry.registerItem(acetylene_torch, acetylene_torch.getUnlocalizedName()); + GameRegistry.registerItem(boltgun, boltgun.getUnlocalizedName()); GameRegistry.registerItem(overfuse, overfuse.getUnlocalizedName()); GameRegistry.registerItem(arc_electrode, arc_electrode.getUnlocalizedName()); GameRegistry.registerItem(arc_electrode_burnt, arc_electrode_burnt.getUnlocalizedName()); GameRegistry.registerItem(arc_electrode_desh, arc_electrode_desh.getUnlocalizedName()); - //Particle Collider Items - //GameRegistry.registerItem(crystal_energy, crystal_energy.getUnlocalizedName()); - //GameRegistry.registerItem(pellet_coolant, pellet_coolant.getUnlocalizedName()); - //Particle Collider Fuel GameRegistry.registerItem(part_lithium, part_lithium.getUnlocalizedName()); GameRegistry.registerItem(part_beryllium, part_beryllium.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/tool/ItemBlowtorch.java b/src/main/java/com/hbm/items/tool/ItemBlowtorch.java index 3e2285ec6..cb200d6ec 100644 --- a/src/main/java/com/hbm/items/tool/ItemBlowtorch.java +++ b/src/main/java/com/hbm/items/tool/ItemBlowtorch.java @@ -28,6 +28,7 @@ import net.minecraft.world.World; public class ItemBlowtorch extends Item implements IFillableItem { public ItemBlowtorch() { + this.setMaxStackSize(1); this.setFull3D(); this.setCreativeTab(MainRegistry.controlTab); } diff --git a/src/main/java/com/hbm/items/tool/ItemBoltgun.java b/src/main/java/com/hbm/items/tool/ItemBoltgun.java new file mode 100644 index 000000000..e0c1e0999 --- /dev/null +++ b/src/main/java/com/hbm/items/tool/ItemBoltgun.java @@ -0,0 +1,78 @@ +package com.hbm.items.tool; + +import com.hbm.items.IAnimatedItem; +import com.hbm.lib.RefStrings; +import com.hbm.packet.AuxParticlePacketNT; +import com.hbm.packet.PacketDispatcher; +import com.hbm.render.anim.BusAnimation; +import com.hbm.render.anim.BusAnimationKeyframe; +import com.hbm.render.anim.BusAnimationSequence; + +import api.hbm.block.IToolable; +import api.hbm.block.IToolable.ToolType; +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class ItemBoltgun extends Item implements IAnimatedItem { + + public ItemBoltgun() { + this.setMaxStackSize(1); + } + + @Override + public Item setUnlocalizedName(String unlocalizedName) { + super.setUnlocalizedName(unlocalizedName); + this.setTextureName(RefStrings.MODID + ":"+ unlocalizedName); + return this; + } + + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float fX, float fY, float fZ) { + + Block b = world.getBlock(x, y, z); + + if(b instanceof IToolable && ((IToolable)b).onScrew(world, player, x, y, z, side, fX, fY, fZ, ToolType.BOLT)) { + + if(!world.isRemote) { + + player.inventoryContainer.detectAndSendChanges(); + ForgeDirection dir = ForgeDirection.getOrientation(side); + double off = 0.25; + + NBTTagCompound data = new NBTTagCompound(); + data.setString("type", "vanillaExt"); + data.setString("mode", "largeexplode"); + data.setFloat("size", 1F); + data.setByte("count", (byte)1); + PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + fX + dir.offsetX * off, y + fY + dir.offsetY * off, z + fZ + dir.offsetZ * off), new TargetPoint(world.provider.dimensionId, x, y, z, 50)); + + NBTTagCompound d0 = new NBTTagCompound(); + d0.setString("type", "anim"); + d0.setString("mode", "generic"); + PacketDispatcher.wrapper.sendTo(new AuxParticlePacketNT(d0, 0, 0, 0), (EntityPlayerMP) player); + } + + return false; + } + + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public BusAnimation getAnimation(NBTTagCompound data, ItemStack stack) { + return new BusAnimation() + .addBus("RECOIL", new BusAnimationSequence() + .addKeyframe(new BusAnimationKeyframe(1, 0, 1, 50)) + .addKeyframe(new BusAnimationKeyframe(0, 0, 1, 100))); + } +} diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index 09cd6439d..3360a132b 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -64,6 +64,7 @@ import com.hbm.handler.CasingEjector; import com.hbm.handler.HbmKeybinds; import com.hbm.handler.ImpactWorldHandler; import com.hbm.handler.HbmKeybinds.EnumKeybind; +import com.hbm.items.IAnimatedItem; import com.hbm.items.ModItems; import com.hbm.particle.*; import com.hbm.particle.psys.engine.EventHandlerParticleEngine; @@ -428,6 +429,7 @@ public class ClientProxy extends ServerProxy { MinecraftForgeClient.registerItemRenderer(ModItems.mese_gavel, new ItemRenderGavel()); MinecraftForgeClient.registerItemRenderer(ModItems.crucible, new ItemRenderCrucible()); MinecraftForgeClient.registerItemRenderer(ModItems.chainsaw, new ItemRenderChainsaw()); + MinecraftForgeClient.registerItemRenderer(ModItems.boltgun, new ItemRenderBoltgun()); //guns MinecraftForgeClient.registerItemRenderer(ModItems.gun_rpg, new ItemRenderRpg()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_karl, new ItemRenderRpg()); @@ -1630,8 +1632,10 @@ public class ClientProxy extends ServerProxy { if("anim".equals(type)) { + String mode = data.getString("mode"); + /* crucible deploy */ - if("crucible".equals(data.getString("mode")) && player.getHeldItem() != null) { + if("crucible".equals(mode) && player.getHeldItem() != null) { BusAnimation animation = new BusAnimation() .addBus("GUARD_ROT", new BusAnimationSequence() @@ -1643,7 +1647,7 @@ public class ClientProxy extends ServerProxy { } /* crucible swing */ - if("cSwing".equals(data.getString("mode"))) { + if("cSwing".equals(mode)) { if(HbmAnimations.getRelevantTransformation("SWING_ROT")[0] == 0) { @@ -1666,7 +1670,7 @@ public class ClientProxy extends ServerProxy { } /* chainsaw swing */ - if("sSwing".equals(data.getString("mode")) || "lSwing".equals(data.getString("mode"))) { //temp for lance + if("sSwing".equals(mode) || "lSwing".equals(mode)) { //temp for lance int forward = 150; int sideways = 100; @@ -1709,6 +1713,19 @@ public class ClientProxy extends ServerProxy { HbmAnimations.hotbar[player.inventory.currentItem] = new Animation(player.getHeldItem().getItem().getUnlocalizedName(), System.currentTimeMillis(), animation); } } + + if("generic".equals(mode)) { + ItemStack stack = player.getHeldItem(); + + if(stack != null && stack.getItem() instanceof IAnimatedItem) { + IAnimatedItem item = (IAnimatedItem) stack.getItem(); + BusAnimation anim = item.getAnimation(data, stack); + + if(anim != null) { + HbmAnimations.hotbar[player.inventory.currentItem] = new Animation(player.getHeldItem().getItem().getUnlocalizedName(), System.currentTimeMillis(), anim); + } + } + } } if("tau".equals(type)) { diff --git a/src/main/java/com/hbm/main/ResourceManager.java b/src/main/java/com/hbm/main/ResourceManager.java index 9c4e51884..b442588d3 100644 --- a/src/main/java/com/hbm/main/ResourceManager.java +++ b/src/main/java/com/hbm/main/ResourceManager.java @@ -681,6 +681,7 @@ public class ResourceManager { public static final IModelCustom gavel = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/gavel.obj")); public static final IModelCustom crucible = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/crucible.obj")); public static final IModelCustom chainsaw = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/chainsaw.obj"), false); + public static final IModelCustom boltgun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/boltgun.obj")); public static final IModelCustom hk69 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/hk69.obj")); public static final IModelCustom deagle = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/deagle.obj")); @@ -754,6 +755,7 @@ public class ResourceManager { public static final ResourceLocation crucible_guard = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/crucible_guard.png"); public static final ResourceLocation crucible_blade = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/crucible_blade.png"); public static final ResourceLocation chainsaw_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/chainsaw.png"); + public static final ResourceLocation boltgun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/boltgun.png"); public static final ResourceLocation hk69_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/hk69.png"); public static final ResourceLocation deagle_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/deagle.png"); diff --git a/src/main/java/com/hbm/render/item/ItemRenderBoltgun.java b/src/main/java/com/hbm/render/item/ItemRenderBoltgun.java new file mode 100644 index 000000000..15fe471f6 --- /dev/null +++ b/src/main/java/com/hbm/render/item/ItemRenderBoltgun.java @@ -0,0 +1,98 @@ +package com.hbm.render.item; + +import org.lwjgl.opengl.GL11; + +import com.hbm.main.ResourceManager; +import com.hbm.render.anim.HbmAnimations; + +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.IItemRenderer; + +public class ItemRenderBoltgun implements IItemRenderer { + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch(type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case ENTITY: + case INVENTORY: + return true; + default: return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + + GL11.glPushMatrix(); + + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.boltgun_tex); + + switch(type) { + + case EQUIPPED_FIRST_PERSON: + + double s0 = 0.15D; + GL11.glTranslated(0.5, 0.35, -0.25F); + GL11.glRotated(15, 0, 0, 1); + GL11.glRotated(80, 0, 1, 0); + GL11.glScaled(s0, s0, s0); + + GL11.glPushMatrix(); + double[] anim = HbmAnimations.getRelevantTransformation("RECOIL"); + GL11.glTranslated(0, 0, -anim[0]); + ResourceManager.boltgun.renderPart("Barrel"); + GL11.glPopMatrix(); + + break; + + case EQUIPPED: + + double scale = -0.375D; + GL11.glScaled(scale, scale, scale); + GL11.glRotated(85, 0, 1, 0); + GL11.glRotated(135D, 1.0D, 0.0D, 0.0D); + GL11.glTranslated(-0.125, -2.0, 1.75); + + break; + + case ENTITY: + + double s1 = 0.1D; + GL11.glScaled(s1, s1, s1); + break; + + case INVENTORY: + + GL11.glEnable(GL11.GL_ALPHA_TEST); + GL11.glEnable(GL11.GL_LIGHTING); + + double s = 1.75D; + GL11.glTranslated(7, 10, 0); + GL11.glRotated(-90, 0, 1, 0); + GL11.glRotated(-135, 1, 0, 0); + GL11.glScaled(s, s, -s); + + break; + + default: break; + } + + GL11.glShadeModel(GL11.GL_SMOOTH); + ResourceManager.boltgun.renderPart("Gun"); + if(type != type.EQUIPPED_FIRST_PERSON) { + ResourceManager.boltgun.renderPart("Barrel"); + } + GL11.glShadeModel(GL11.GL_FLAT); + + GL11.glPopMatrix(); + } +} diff --git a/src/main/java/com/hbm/render/item/weapon/ItemRenderChainsaw.java b/src/main/java/com/hbm/render/item/weapon/ItemRenderChainsaw.java index 26522b8ef..f758b99b8 100644 --- a/src/main/java/com/hbm/render/item/weapon/ItemRenderChainsaw.java +++ b/src/main/java/com/hbm/render/item/weapon/ItemRenderChainsaw.java @@ -12,8 +12,6 @@ import net.minecraft.util.MathHelper; import net.minecraftforge.client.IItemRenderer; public class ItemRenderChainsaw implements IItemRenderer { - - public ItemRenderChainsaw() { } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { @@ -29,7 +27,6 @@ public class ItemRenderChainsaw implements IItemRenderer { @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { - return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING); } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityWatz.java b/src/main/java/com/hbm/tileentity/machine/TileEntityWatz.java index 461d1e711..4b8bc95e3 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityWatz.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityWatz.java @@ -131,11 +131,7 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand /** basic sanity checking, usually wouldn't do anything except when NBT loading borks */ public void setupCoolant() { - - if(!tanks[0].getTankType().hasTrait(FT_Heatable.class)) { - tanks[0].setTankType(Fluids.COOLANT); - } - + tanks[0].setTankType(Fluids.COOLANT); tanks[1].setTankType(tanks[0].getTankType().getTrait(FT_Heatable.class).getFirstStep().typeProduced); } diff --git a/src/main/resources/assets/hbm/models/weapons/boltgun.obj b/src/main/resources/assets/hbm/models/weapons/boltgun.obj new file mode 100644 index 000000000..0d9de366c --- /dev/null +++ b/src/main/resources/assets/hbm/models/weapons/boltgun.obj @@ -0,0 +1,2415 @@ +# Blender v2.79 (sub 0) OBJ File: 'boltgun.blend' +# www.blender.org +o Barrel +v 0.000000 2.250000 1.000000 +v -0.176777 2.176777 1.000000 +v -0.250000 2.000000 1.000000 +v -0.176777 1.823223 1.000000 +v 0.000000 1.750000 1.000000 +v 0.176777 1.823223 1.000000 +v 0.250000 2.000000 1.000000 +v 0.176777 2.176777 1.000000 +v 0.000000 2.250000 3.500000 +v -0.176777 2.176777 3.500000 +v -0.250000 2.000000 3.500000 +v -0.176777 1.823223 3.500000 +v 0.000000 1.750000 3.500000 +v 0.176777 1.823223 3.500000 +v 0.250000 2.000000 3.500000 +v 0.176777 2.176777 3.500000 +v 0.000000 2.375000 3.500000 +v -0.265165 2.265165 3.500000 +v -0.375000 2.000000 3.500000 +v -0.265165 1.734835 3.500000 +v 0.000000 1.625000 3.500000 +v 0.265165 1.734835 3.500000 +v 0.375000 2.000000 3.500000 +v 0.265165 2.265165 3.500000 +v 0.000000 2.500000 4.500000 +v -0.353553 2.353553 4.500000 +v -0.500000 2.000000 4.500000 +v -0.353553 1.646447 4.500000 +v 0.000000 1.500000 4.500000 +v 0.353553 1.646447 4.500000 +v 0.500000 2.000000 4.500000 +v 0.353553 2.353553 4.500000 +v 0.000000 2.250000 4.500000 +v -0.176777 2.176777 4.500000 +v -0.250000 2.000000 4.500000 +v -0.176777 1.823223 4.500000 +v 0.000000 1.750000 4.500000 +v 0.176777 1.823223 4.500000 +v 0.250000 2.000000 4.500000 +v 0.176777 2.176777 4.500000 +v 0.000000 2.250000 3.750000 +v -0.176777 2.176777 3.750000 +v -0.250000 2.000000 3.750000 +v -0.176777 1.823223 3.750000 +v 0.000000 1.750000 3.750000 +v 0.176777 1.823223 3.750000 +v 0.250000 2.000000 3.750000 +v 0.176777 2.176777 3.750000 +vt 0.517647 0.250000 +vt 0.511765 0.229167 +vt 0.517647 0.229167 +vt 0.517647 0.479167 +vt 0.511765 0.500000 +vt 0.511765 0.479167 +vt 0.517647 0.416667 +vt 0.511765 0.395833 +vt 0.517647 0.395833 +vt 0.517647 0.270833 +vt 0.511765 0.291667 +vt 0.511765 0.270833 +vt 0.517647 0.208333 +vt 0.511765 0.187500 +vt 0.517647 0.187500 +vt 0.517647 0.437500 +vt 0.511765 0.458333 +vt 0.511765 0.437500 +vt 0.517647 0.375000 +vt 0.511765 0.354167 +vt 0.517647 0.354167 +vt 0.517647 0.333333 +vt 0.511765 0.312500 +vt 0.517647 0.312500 +vt 0.464706 0.291667 +vt 0.452941 0.270833 +vt 0.464706 0.250000 +vt 0.464706 0.208333 +vt 0.452941 0.187500 +vt 0.464706 0.166667 +vt 0.464706 0.458333 +vt 0.452941 0.437500 +vt 0.464706 0.416667 +vt 0.464706 0.375000 +vt 0.452941 0.354167 +vt 0.464706 0.333333 +vt 0.452941 0.333333 +vt 0.452941 0.312500 +vt 0.452941 0.250000 +vt 0.452941 0.229167 +vt 0.452941 0.500000 +vt 0.452941 0.479167 +vt 0.452941 0.416667 +vt 0.452941 0.395833 +vt 0.514165 0.571002 +vt 0.505882 0.583153 +vt 0.505882 0.500181 +vt 0.511765 0.250000 +vt 0.517647 0.500000 +vt 0.511765 0.416667 +vt 0.517647 0.291667 +vt 0.511765 0.208333 +vt 0.517647 0.458333 +vt 0.511765 0.375000 +vt 0.511765 0.333333 +vt 0.452941 0.291667 +vt 0.452941 0.208333 +vt 0.452941 0.458333 +vt 0.452941 0.375000 +vt 0.464706 0.500000 +vt 0.497599 0.571002 +vt 0.494169 0.541667 +vt 0.497599 0.512332 +vt 0.514165 0.512332 +vt 0.517596 0.541667 +vt 0.517647 0.145833 +vt 0.400000 0.125000 +vt 0.517647 0.125000 +vt 0.517647 0.104167 +vt 0.400000 0.083333 +vt 0.517647 0.083333 +vt 0.400000 0.062500 +vt 0.517647 0.062500 +vt 0.517647 0.041667 +vt 0.400000 0.020833 +vt 0.517647 0.020833 +vt 0.517647 0.166667 +vt 0.400000 0.145833 +vt 0.400000 0.104167 +vt 0.400000 0.041667 +vt 0.400000 -0.000000 +vt 0.517647 -0.000000 +vt 0.417647 0.395833 +vt 0.417647 0.270833 +vt 0.417647 0.187500 +vt 0.417647 0.437500 +vt 0.417647 0.354167 +vt 0.417647 0.312500 +vt 0.417647 0.229167 +vt 0.417647 0.479167 +vt 0.400000 0.166667 +vt 0.417647 0.416667 +vt 0.417647 0.291667 +vt 0.417647 0.208333 +vt 0.417647 0.458333 +vt 0.417647 0.375000 +vt 0.417647 0.333333 +vt 0.417647 0.250000 +vt 0.417647 0.500000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 0.0000 1.0000 +vn -0.7071 -0.7071 0.0000 +vn -1.0000 0.0000 0.0000 +vn -0.7071 0.7071 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.7071 0.7071 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.7071 -0.7071 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.9923 -0.1240 +vn 0.7016 0.7016 -0.1240 +vn 0.9923 0.0000 -0.1240 +vn 0.7016 -0.7016 -0.1240 +vn -0.0000 -0.9923 -0.1240 +vn -0.7016 -0.7016 -0.1240 +vn -0.9923 0.0000 -0.1240 +vn -0.7016 0.7016 -0.1240 +s off +f 15/1/1 22/2/1 14/3/1 +f 12/4/1 21/5/1 20/6/1 +f 11/7/1 18/8/1 10/9/1 +f 15/10/1 24/11/1 23/12/1 +f 14/13/1 21/14/1 13/15/1 +f 11/16/1 20/17/1 19/18/1 +f 10/19/1 17/20/1 9/21/1 +f 9/22/1 24/23/1 16/24/1 +f 32/25/2 39/26/2 31/27/2 +f 30/28/2 37/29/2 29/30/2 +f 28/31/2 35/32/2 27/33/2 +f 26/34/2 33/35/2 25/36/2 +f 32/25/2 33/37/2 40/38/2 +f 30/28/2 39/39/2 38/40/2 +f 28/31/2 37/41/2 36/42/2 +f 26/34/2 35/43/2 34/44/2 +f 48/45/2 41/46/2 45/47/2 +f 15/1/1 23/48/1 22/2/1 +f 12/4/1 13/49/1 21/5/1 +f 11/7/1 19/50/1 18/8/1 +f 15/10/1 16/51/1 24/11/1 +f 14/13/1 22/52/1 21/14/1 +f 11/16/1 12/53/1 20/17/1 +f 10/19/1 18/54/1 17/20/1 +f 9/22/1 17/55/1 24/23/1 +f 32/25/2 40/56/2 39/26/2 +f 30/28/2 38/57/2 37/29/2 +f 28/31/2 36/58/2 35/32/2 +f 26/34/2 34/59/2 33/35/2 +f 32/25/2 25/36/2 33/37/2 +f 30/28/2 31/27/2 39/39/2 +f 28/31/2 29/60/2 37/41/2 +f 26/34/2 27/33/2 35/43/2 +f 41/46/2 42/61/2 45/47/2 +f 42/61/2 43/62/2 45/47/2 +f 43/62/2 44/63/2 45/47/2 +f 45/47/2 46/64/2 47/65/2 +f 47/65/2 48/45/2 45/47/2 +s 1 +f 4/66/3 11/67/4 3/68/4 +f 2/69/5 9/70/6 1/71/6 +f 1/71/6 16/72/7 8/73/7 +f 7/74/8 14/75/9 6/76/9 +f 5/77/10 12/78/3 4/66/3 +f 3/68/4 10/79/5 2/69/5 +f 8/73/7 15/80/8 7/74/8 +f 6/76/9 13/81/10 5/82/10 +f 17/55/11 32/25/12 24/23/12 +f 23/12/13 32/25/12 31/27/13 +f 23/48/13 30/28/14 22/2/14 +f 22/52/14 29/30/15 21/14/15 +f 21/5/15 28/31/16 20/6/16 +f 19/18/17 28/31/16 27/33/17 +f 19/50/17 26/34/18 18/8/18 +f 17/20/11 26/34/18 25/36/11 +f 35/43/8 42/83/9 34/44/9 +f 40/56/3 47/84/4 39/26/4 +f 38/57/5 45/85/6 37/29/6 +f 36/58/7 43/86/8 35/32/8 +f 34/59/9 41/87/10 33/35/10 +f 33/37/10 48/88/3 40/38/3 +f 39/39/4 46/89/5 38/40/5 +f 37/41/6 44/90/7 36/42/7 +f 4/66/3 12/78/3 11/67/4 +f 2/69/5 10/79/5 9/70/6 +f 1/71/6 9/70/6 16/72/7 +f 7/74/8 15/80/8 14/75/9 +f 5/77/10 13/91/10 12/78/3 +f 3/68/4 11/67/4 10/79/5 +f 8/73/7 16/72/7 15/80/8 +f 6/76/9 14/75/9 13/81/10 +f 17/55/11 25/36/11 32/25/12 +f 23/12/13 24/11/12 32/25/12 +f 23/48/13 31/27/13 30/28/14 +f 22/52/14 30/28/14 29/30/15 +f 21/5/15 29/60/15 28/31/16 +f 19/18/17 20/17/16 28/31/16 +f 19/50/17 27/33/17 26/34/18 +f 17/20/11 18/54/18 26/34/18 +f 35/43/8 43/92/8 42/83/9 +f 40/56/3 48/93/3 47/84/4 +f 38/57/5 46/94/5 45/85/6 +f 36/58/7 44/95/7 43/86/8 +f 34/59/9 42/96/9 41/87/10 +f 33/37/10 41/97/10 48/88/3 +f 39/39/4 47/98/4 46/89/5 +f 37/41/6 45/99/6 44/90/7 +o Gun +v 0.000000 3.000000 0.000000 +v -0.382684 2.923880 0.000000 +v -0.707107 2.707107 0.000000 +v -0.923879 2.382684 0.000000 +v -1.000000 2.000000 -0.000000 +v -0.923879 1.617316 -0.000000 +v -0.707107 1.292893 -0.000000 +v -0.382684 1.076120 -0.000000 +v -0.000000 1.000000 0.000000 +v 0.382683 1.076120 -0.000000 +v 0.707107 1.292893 -0.000000 +v 0.923879 1.617316 -0.000000 +v 1.000000 2.000000 -0.000000 +v 0.923879 2.382684 0.000000 +v 0.707107 2.707107 0.000000 +v 0.382683 2.923880 0.000000 +v 0.000000 3.000000 -3.000000 +v -0.382684 2.923880 -3.000000 +v -0.707107 2.707107 -3.000000 +v -0.923879 2.382684 -3.000000 +v -1.000000 2.000000 -3.000000 +v -0.923879 1.617316 -3.000000 +v -0.707107 1.292893 -3.000000 +v -0.382684 1.076120 -3.000000 +v -0.000000 1.000000 -3.000000 +v 0.382683 1.076120 -3.000000 +v 0.707107 1.292893 -3.000000 +v 0.923879 1.617316 -3.000000 +v 1.000000 2.000000 -3.000000 +v 0.923879 2.382684 -3.000000 +v 0.707107 2.707107 -3.000000 +v 0.382683 2.923880 -3.000000 +v 0.000000 2.375000 1.000000 +v -0.143506 2.346455 1.000000 +v -0.265165 2.265165 1.000000 +v -0.346455 2.143506 1.000000 +v -0.375000 2.000000 1.000000 +v -0.346455 1.856494 1.000000 +v -0.265165 1.734835 1.000000 +v -0.143506 1.653545 1.000000 +v 0.000000 1.625000 1.000000 +v 0.143506 1.653545 1.000000 +v 0.265165 1.734835 1.000000 +v 0.346455 1.856494 1.000000 +v 0.375000 2.000000 1.000000 +v 0.346455 2.143506 1.000000 +v 0.265165 2.265165 1.000000 +v 0.143506 2.346455 1.000000 +v -0.250000 2.000000 3.000000 +v 0.250000 2.000000 3.000000 +v -0.250000 2.000000 1.000000 +v 0.250000 2.000000 1.000000 +v -0.250000 -3.000000 0.000000 +v -0.250000 -3.000000 2.000000 +v 0.250000 -3.000000 2.000000 +v 0.250000 -3.000000 0.000000 +v -0.375000 2.000000 2.750000 +v -0.250000 2.000000 2.750000 +v -0.375000 2.000000 2.250000 +v -0.250000 2.000000 2.250000 +v -0.375000 -2.000000 1.450000 +v -0.375000 -2.000000 1.950000 +v -0.250000 -2.000000 1.950000 +v -0.250000 -2.000000 1.450000 +v 0.000000 2.375000 2.250000 +v -0.265165 2.265165 2.250000 +v -0.265165 2.265165 2.750000 +v 0.000000 2.375000 2.750000 +v 0.000000 1.625000 2.250000 +v 0.265165 1.734835 2.250000 +v 0.375000 2.000000 2.250000 +v 0.265165 2.265165 2.250000 +v 0.000000 1.625000 2.750000 +v 0.265165 1.734835 2.750000 +v 0.375000 2.000000 2.750000 +v 0.265165 2.265165 2.750000 +v 0.000000 2.250000 2.250000 +v -0.176777 2.176777 2.250000 +v 0.176777 1.823223 2.750000 +v -0.176777 2.176777 2.750000 +v 0.000000 2.250000 2.750000 +v 0.176777 1.823223 2.250000 +v 0.250000 2.000000 2.250000 +v 0.176777 2.176777 2.250000 +v 0.250000 2.000000 2.750000 +v 0.176777 2.176777 2.750000 +v 0.000000 1.750000 2.750000 +v 0.000000 1.750000 2.250000 +v -0.375000 2.000000 1.750000 +v -0.250000 2.000000 1.750000 +v -0.375000 2.000000 1.250000 +v -0.250000 2.000000 1.250000 +v -0.375000 -2.000000 0.450000 +v -0.375000 -2.000000 0.950000 +v -0.250000 -2.000000 0.950000 +v -0.250000 -2.000000 0.450000 +v 0.000000 2.375000 1.250000 +v -0.265165 2.265165 1.250000 +v -0.265165 2.265165 1.750000 +v 0.000000 2.375000 1.750000 +v 0.000000 1.625000 1.250000 +v 0.265165 1.734835 1.250000 +v 0.375000 2.000000 1.250000 +v 0.265165 2.265165 1.250000 +v 0.000000 1.625000 1.750000 +v 0.265165 1.734835 1.750000 +v 0.375000 2.000000 1.750000 +v 0.265165 2.265165 1.750000 +v 0.000000 2.250000 1.250000 +v -0.176777 2.176777 1.250000 +v 0.176777 1.823223 1.750000 +v -0.176777 2.176777 1.750000 +v 0.000000 2.250000 1.750000 +v 0.176777 1.823223 1.250000 +v 0.250000 2.000000 1.250000 +v 0.176777 2.176777 1.250000 +v 0.250000 2.000000 1.750000 +v 0.176777 2.176777 1.750000 +v 0.000000 1.750000 1.750000 +v 0.000000 1.750000 1.250000 +v 0.000000 2.750000 -3.500000 +v -0.287013 2.692910 -3.500000 +v -0.530330 2.530330 -3.500000 +v -0.692910 2.287013 -3.500000 +v -0.750000 2.000000 -3.500000 +v -0.692910 1.712987 -3.500000 +v -0.530330 1.469670 -3.500000 +v -0.287013 1.307090 -3.500000 +v -0.000000 1.250000 -3.500000 +v 0.287012 1.307090 -3.500000 +v 0.530330 1.469670 -3.500000 +v 0.692909 1.712987 -3.500000 +v 0.750000 2.000000 -3.500000 +v 0.692909 2.287013 -3.500000 +v 0.530330 2.530330 -3.500000 +v 0.287012 2.692910 -3.500000 +v 0.707106 1.480393 -3.750000 +v 0.707106 1.667893 -3.500000 +v 0.972272 1.558058 -2.500000 +v 0.441941 1.558058 -3.500000 +v 1.082107 1.292893 -2.500000 +v 0.332107 1.292893 -3.500000 +v 0.972272 1.027728 -2.500000 +v 0.441941 1.027728 -3.500000 +v 0.707107 0.917893 -2.500000 +v 0.707107 0.917893 -3.500000 +v 0.441942 1.027728 -2.500000 +v 0.972272 1.027728 -3.500000 +v 0.332107 1.292893 -2.500000 +v 1.082106 1.292893 -3.500000 +v 0.707107 1.292893 -1.500000 +v 0.707107 1.667893 -2.500000 +v 0.972271 1.558058 -3.500000 +v 0.839689 1.425476 -3.750000 +v 0.574524 1.425476 -3.750000 +v 0.519607 1.292893 -3.750000 +v 0.574524 1.160311 -3.750000 +v 0.707107 1.105393 -3.750000 +v 0.839689 1.160311 -3.750000 +v 0.894606 1.292893 -3.750000 +v -0.519607 1.292893 -3.750000 +v -0.332107 1.292893 -3.500000 +v -0.441942 1.027728 -2.500000 +v -0.441942 1.558058 -3.500000 +v -0.707107 0.917893 -2.500000 +v -0.707107 1.667893 -3.500000 +v -0.972272 1.027728 -2.500000 +v -0.972272 1.558058 -3.500000 +v -1.082107 1.292893 -2.500000 +v -1.082107 1.292893 -3.500000 +v -0.972272 1.558058 -2.500000 +v -0.972272 1.027728 -3.500000 +v -0.707107 1.667893 -2.500000 +v -0.707107 0.917893 -3.500000 +v -0.707107 1.292893 -1.500000 +v -0.332107 1.292893 -2.500000 +v -0.441942 1.027728 -3.500000 +v -0.574525 1.160311 -3.750000 +v -0.574524 1.425476 -3.750000 +v -0.707107 1.480393 -3.750000 +v -0.839690 1.425476 -3.750000 +v -0.894607 1.292893 -3.750000 +v -0.839690 1.160311 -3.750000 +v -0.707107 1.105393 -3.750000 +v -0.707107 2.519607 -3.750000 +v -0.707107 2.332107 -3.500000 +v -0.972272 2.441942 -2.500000 +v -0.441942 2.441942 -3.500000 +v -1.082107 2.707107 -2.500000 +v -0.332107 2.707107 -3.500000 +v -0.972272 2.972272 -2.500000 +v -0.441942 2.972272 -3.500000 +v -0.707107 3.082108 -2.500000 +v -0.707107 3.082108 -3.500000 +v -0.441942 2.972272 -2.500000 +v -0.972272 2.972272 -3.500000 +v -0.332107 2.707107 -2.500000 +v -1.082107 2.707107 -3.500000 +v -0.707107 2.707107 -1.500000 +v -0.707107 2.332107 -2.500000 +v -0.972272 2.441942 -3.500000 +v -0.839689 2.574524 -3.750000 +v -0.574524 2.574524 -3.750000 +v -0.519607 2.707107 -3.750000 +v -0.574524 2.839689 -3.750000 +v -0.707107 2.894607 -3.750000 +v -0.839689 2.839689 -3.750000 +v -0.894607 2.707107 -3.750000 +v 0.519607 2.707107 -3.750000 +v 0.332107 2.707107 -3.500000 +v 0.441942 2.972272 -2.500000 +v 0.441942 2.441941 -3.500000 +v 0.707107 3.082107 -2.500000 +v 0.707107 2.332107 -3.500000 +v 0.972272 2.972272 -2.500000 +v 0.972272 2.441941 -3.500000 +v 1.082107 2.707107 -2.500000 +v 1.082107 2.707107 -3.500000 +v 0.972272 2.441942 -2.500000 +v 0.972272 2.972272 -3.500000 +v 0.707107 2.332107 -2.500000 +v 0.707107 3.082107 -3.500000 +v 0.707107 2.707107 -1.500000 +v 0.332107 2.707107 -2.500000 +v 0.441942 2.972272 -3.500000 +v 0.574524 2.839689 -3.750000 +v 0.574524 2.574524 -3.750000 +v 0.707107 2.519607 -3.750000 +v 0.839689 2.574524 -3.750000 +v 0.894607 2.707107 -3.750000 +v 0.839689 2.839689 -3.750000 +v 0.707107 2.894607 -3.750000 +v 0.250000 1.500000 2.650000 +v 0.250000 -2.500000 1.850000 +v 0.250000 1.500000 1.150000 +v 0.250000 -2.500000 0.350000 +v 0.250000 1.500000 1.775000 +v 0.250000 -2.500000 0.975000 +v 0.250000 1.500000 2.025000 +v 0.250000 -2.500000 1.225000 +v -0.125000 1.500000 2.650000 +v -0.125000 -2.500000 1.850000 +v -0.125000 -2.500000 0.350000 +v -0.125000 1.500000 1.150000 +v -0.125000 -2.500000 0.975000 +v -0.125000 1.500000 1.775000 +v -0.125000 1.500000 2.025000 +v -0.125000 -2.500000 1.225000 +v 0.000000 1.593750 2.525000 +v 0.066291 1.566291 2.525000 +v 0.000000 1.687500 1.025000 +v 0.000000 1.687500 2.400000 +v 0.132583 1.632583 1.025000 +v 0.132583 1.632582 2.400000 +v 0.187500 1.500000 1.025000 +v 0.187500 1.500000 2.400000 +v 0.132583 1.367418 1.025000 +v 0.132583 1.367417 2.400000 +v 0.000000 1.312500 1.025000 +v 0.000000 1.312500 2.400000 +v -0.132583 1.367418 1.025000 +v -0.132583 1.367417 2.400000 +v -0.187500 1.500000 1.025000 +v -0.187500 1.500000 2.400000 +v -0.132583 1.632583 1.025000 +v -0.132583 1.632582 2.400000 +v 0.093750 1.500000 2.525000 +v 0.066291 1.433709 2.525000 +v 0.000000 1.406250 2.525000 +v -0.066291 1.433709 2.525000 +v -0.093750 1.500000 2.525000 +v -0.066291 1.566291 2.525000 +v 0.000000 0.093750 2.225000 +v 0.066291 0.066291 2.225000 +v 0.000000 0.187500 0.725000 +v 0.000000 0.187500 2.100000 +v 0.132583 0.132583 0.725000 +v 0.132583 0.132582 2.100000 +v 0.187500 0.000000 0.725000 +v 0.187500 0.000000 2.100000 +v 0.132583 -0.132582 0.725000 +v 0.132583 -0.132583 2.100000 +v 0.000000 -0.187500 0.725000 +v 0.000000 -0.187500 2.100000 +v -0.132583 -0.132582 0.725000 +v -0.132583 -0.132583 2.100000 +v -0.187500 0.000000 0.725000 +v -0.187500 0.000000 2.100000 +v -0.132583 0.132583 0.725000 +v -0.132583 0.132582 2.100000 +v 0.093750 0.000000 2.225000 +v 0.066291 -0.066291 2.225000 +v 0.000000 -0.093750 2.225000 +v -0.066291 -0.066291 2.225000 +v -0.093750 0.000000 2.225000 +v -0.066291 0.066291 2.225000 +v 0.000000 0.593750 2.325000 +v 0.066291 0.566291 2.325000 +v 0.000000 0.687500 0.825000 +v 0.000000 0.687500 2.200000 +v 0.132583 0.632583 0.825000 +v 0.132583 0.632582 2.200000 +v 0.187500 0.500000 0.825000 +v 0.187500 0.500000 2.200000 +v 0.132583 0.367418 0.825000 +v 0.132583 0.367417 2.200000 +v 0.000000 0.312500 0.825000 +v 0.000000 0.312500 2.200000 +v -0.132583 0.367418 0.825000 +v -0.132583 0.367417 2.200000 +v -0.187500 0.500000 0.825000 +v -0.187500 0.500000 2.200000 +v -0.132583 0.632583 0.825000 +v -0.132583 0.632582 2.200000 +v 0.093750 0.500000 2.325000 +v 0.066291 0.433709 2.325000 +v 0.000000 0.406250 2.325000 +v -0.066291 0.433709 2.325000 +v -0.093750 0.500000 2.325000 +v -0.066291 0.566291 2.325000 +v -0.066291 1.066291 2.425000 +v -0.093750 1.000000 2.425000 +v -0.066291 0.933709 2.425000 +v 0.000000 0.906250 2.425000 +v 0.066291 0.933709 2.425000 +v 0.093750 1.000000 2.425000 +v -0.132583 1.132582 2.300000 +v -0.132583 1.132583 0.925000 +v -0.187500 1.000000 2.300000 +v -0.187500 1.000000 0.925000 +v -0.132583 0.867417 2.300000 +v -0.132583 0.867418 0.925000 +v 0.000000 0.812500 2.300000 +v 0.000000 0.812500 0.925000 +v 0.132583 0.867417 2.300000 +v 0.132583 0.867418 0.925000 +v 0.187500 1.000000 2.300000 +v 0.187500 1.000000 0.925000 +v 0.132583 1.132582 2.300000 +v 0.132583 1.132583 0.925000 +v 0.000000 1.187500 2.300000 +v 0.000000 1.187500 0.925000 +v 0.066291 1.066291 2.425000 +v 0.000000 1.093750 2.425000 +v 0.000000 -2.406250 1.725000 +v 0.066291 -2.433709 1.725000 +v 0.000000 -2.312500 0.225000 +v 0.000000 -2.312500 1.600000 +v 0.132583 -2.367417 0.225000 +v 0.132583 -2.367418 1.600000 +v 0.187500 -2.500000 0.225000 +v 0.187500 -2.500000 1.600000 +v 0.132583 -2.632582 0.225000 +v 0.132583 -2.632583 1.600000 +v 0.000000 -2.687500 0.225000 +v 0.000000 -2.687500 1.600000 +v -0.132583 -2.632582 0.225000 +v -0.132583 -2.632583 1.600000 +v -0.187500 -2.500000 0.225000 +v -0.187500 -2.500000 1.600000 +v -0.132583 -2.367417 0.225000 +v -0.132583 -2.367418 1.600000 +v 0.093750 -2.500000 1.725000 +v 0.066291 -2.566291 1.725000 +v 0.000000 -2.593750 1.725000 +v -0.066291 -2.566291 1.725000 +v -0.093750 -2.500000 1.725000 +v -0.066291 -2.433709 1.725000 +v -0.066291 -0.433709 2.125000 +v -0.093750 -0.500000 2.125000 +v -0.066291 -0.566291 2.125000 +v 0.000000 -0.593750 2.125000 +v 0.066291 -0.566291 2.125000 +v 0.093750 -0.500000 2.125000 +v -0.132583 -0.367418 2.000000 +v -0.132583 -0.367417 0.625000 +v -0.187500 -0.500000 2.000000 +v -0.187500 -0.500000 0.625000 +v -0.132583 -0.632583 2.000000 +v -0.132583 -0.632582 0.625000 +v 0.000000 -0.687500 2.000000 +v 0.000000 -0.687500 0.625000 +v 0.132583 -0.632583 2.000000 +v 0.132583 -0.632582 0.625000 +v 0.187500 -0.500000 2.000000 +v 0.187500 -0.500000 0.625000 +v 0.132583 -0.367418 2.000000 +v 0.132583 -0.367417 0.625000 +v 0.000000 -0.312500 2.000000 +v 0.000000 -0.312500 0.625000 +v 0.066291 -0.433709 2.125000 +v 0.000000 -0.406250 2.125000 +v 0.000000 -0.906250 2.025000 +v 0.066291 -0.933709 2.025000 +v 0.000000 -0.812500 0.525000 +v 0.000000 -0.812500 1.900000 +v 0.132583 -0.867417 0.525000 +v 0.132583 -0.867418 1.900000 +v 0.187500 -1.000000 0.525000 +v 0.187500 -1.000000 1.900000 +v 0.132583 -1.132582 0.525000 +v 0.132583 -1.132583 1.900000 +v 0.000000 -1.187500 0.525000 +v 0.000000 -1.187500 1.900000 +v -0.132583 -1.132582 0.525000 +v -0.132583 -1.132583 1.900000 +v -0.187500 -1.000000 0.525000 +v -0.187500 -1.000000 1.900000 +v -0.132583 -0.867417 0.525000 +v -0.132583 -0.867418 1.900000 +v 0.093750 -1.000000 2.025000 +v 0.066291 -1.066291 2.025000 +v 0.000000 -1.093750 2.025000 +v -0.066291 -1.066291 2.025000 +v -0.093750 -1.000000 2.025000 +v -0.066291 -0.933709 2.025000 +v -0.066291 -1.433709 1.925000 +v -0.093750 -1.500000 1.925000 +v -0.066291 -1.566291 1.925000 +v 0.000000 -1.593750 1.925000 +v 0.066291 -1.566291 1.925000 +v 0.093750 -1.500000 1.925000 +v -0.132583 -1.367418 1.800000 +v -0.132583 -1.367417 0.425000 +v -0.187500 -1.500000 1.800000 +v -0.187500 -1.500000 0.425000 +v -0.132583 -1.632583 1.800000 +v -0.132583 -1.632582 0.425000 +v 0.000000 -1.687500 1.800000 +v 0.000000 -1.687500 0.425000 +v 0.132583 -1.632583 1.800000 +v 0.132583 -1.632582 0.425000 +v 0.187500 -1.500000 1.800000 +v 0.187500 -1.500000 0.425000 +v 0.132583 -1.367418 1.800000 +v 0.132583 -1.367417 0.425000 +v 0.000000 -1.312500 1.800000 +v 0.000000 -1.312500 0.425000 +v 0.066291 -1.433709 1.925000 +v 0.000000 -1.406250 1.925000 +v -0.066291 -1.933709 1.825000 +v -0.093750 -2.000000 1.825000 +v -0.066291 -2.066291 1.825000 +v 0.000000 -2.093750 1.825000 +v 0.066291 -2.066291 1.825000 +v 0.093750 -2.000000 1.825000 +v -0.132583 -1.867418 1.700000 +v -0.132583 -1.867417 0.325000 +v -0.187500 -2.000000 1.700000 +v -0.187500 -2.000000 0.325000 +v -0.132583 -2.132583 1.700000 +v -0.132583 -2.132582 0.325000 +v 0.000000 -2.187500 1.700000 +v 0.000000 -2.187500 0.325000 +v 0.132583 -2.132583 1.700000 +v 0.132583 -2.132582 0.325000 +v 0.187500 -2.000000 1.700000 +v 0.187500 -2.000000 0.325000 +v 0.132583 -1.867418 1.700000 +v 0.132583 -1.867417 0.325000 +v 0.000000 -1.812500 1.700000 +v 0.000000 -1.812500 0.325000 +v 0.066291 -1.933709 1.825000 +v 0.000000 -1.906250 1.825000 +v -0.375000 1.125000 -1.250000 +v 0.375000 1.125000 -1.250000 +v -0.375000 1.125000 -2.250000 +v 0.375000 1.125000 -2.250000 +v -0.187500 1.125000 -1.000000 +v 0.187500 1.125000 -1.000000 +v -0.375000 -1.375000 -2.750000 +v -0.375000 -1.375000 -1.750000 +v 0.375000 -1.375000 -1.750000 +v 0.375000 -1.375000 -2.750000 +v -0.187500 -1.375000 -1.500000 +v 0.187500 -1.375000 -1.500000 +v -0.187500 1.125000 -0.875000 +v 0.187500 1.125000 -0.875000 +v -0.187500 0.875000 -0.875000 +v 0.187500 0.875000 -0.875000 +v -0.187500 1.125000 -0.625000 +v 0.187500 1.125000 -0.625000 +v -0.187500 0.875000 -0.625000 +v 0.187500 0.875000 -0.625000 +v -0.125000 0.875000 -0.687500 +v 0.125000 0.875000 -0.687500 +v -0.125000 0.875000 -0.812500 +v 0.125000 0.875000 -0.812500 +v -0.125000 -0.625000 -1.112500 +v -0.125000 -0.625000 -0.987500 +v 0.125000 -0.625000 -0.987500 +v 0.125000 -0.625000 -1.112500 +v -0.125000 -0.875000 -1.112500 +v -0.125000 -0.875000 -0.987500 +v 0.125000 -0.875000 -0.987500 +v 0.125000 -0.875000 -1.112500 +v -0.125000 -1.375000 -0.862500 +v -0.125000 -1.375000 -0.737500 +v 0.125000 -1.375000 -0.737500 +v 0.125000 -1.375000 -0.862500 +vt 0.752941 0.687653 +vt 0.770545 0.750000 +vt 0.752941 0.812347 +vt 0.341176 0.000000 +vt 0.247059 0.083333 +vt 0.247059 0.000000 +vt 0.300000 0.833333 +vt 0.288235 0.166667 +vt 0.300000 0.166667 +vt 0.129412 0.916667 +vt 0.223529 0.083333 +vt 0.223529 0.916667 +vt 0.341176 0.083333 +vt 0.364706 0.916667 +vt 0.341176 0.916667 +vt 0.247059 0.916667 +vt 0.370588 0.020833 +vt 0.394118 0.000000 +vt 0.394118 0.020833 +vt 0.394118 0.687500 +vt 0.400000 0.020833 +vt 0.400000 0.687500 +vt 0.364706 0.687500 +vt 0.370588 0.687500 +vt 0.394118 0.770833 +vt 0.400000 0.729167 +vt 0.400000 0.770833 +vt 0.400000 0.812500 +vt 0.394118 0.812500 +vt 0.400000 0.854167 +vt 0.394118 0.854167 +vt 0.400000 0.895833 +vt 0.394118 0.895833 +vt 0.394118 0.937500 +vt 0.400000 0.937500 +vt 0.370588 0.937500 +vt 0.364706 0.895833 +vt 0.370588 0.895833 +vt 0.370588 0.854167 +vt 0.364706 0.854167 +vt 0.370588 0.812500 +vt 0.364706 0.812500 +vt 0.370588 0.770833 +vt 0.364706 0.729167 +vt 0.364706 0.770833 +vt 0.370588 0.020833 +vt 0.394118 0.000000 +vt 0.394118 0.020833 +vt 0.394118 0.687500 +vt 0.400000 0.020833 +vt 0.400000 0.687500 +vt 0.364706 0.687500 +vt 0.370588 0.687500 +vt 0.394118 0.770833 +vt 0.400000 0.729167 +vt 0.400000 0.770833 +vt 0.400000 0.812500 +vt 0.394118 0.812500 +vt 0.400000 0.854167 +vt 0.394118 0.854167 +vt 0.400000 0.895833 +vt 0.394118 0.895833 +vt 0.394118 0.937500 +vt 0.400000 0.937500 +vt 0.370588 0.937500 +vt 0.364706 0.895833 +vt 0.370588 0.895833 +vt 0.370588 0.854167 +vt 0.364706 0.854167 +vt 0.370588 0.812500 +vt 0.364706 0.812500 +vt 0.370588 0.770833 +vt 0.364706 0.729167 +vt 0.364706 0.770833 +vt 0.795473 0.213133 +vt 0.745703 0.213133 +vt 0.745703 0.036867 +vt 0.738036 0.677788 +vt 0.738036 0.634712 +vt 0.750199 0.634712 +vt 0.738036 0.677788 +vt 0.738036 0.634712 +vt 0.750199 0.634712 +vt 0.750199 0.634712 +vt 0.750199 0.677788 +vt 0.738036 0.677788 +vt 0.750199 0.634712 +vt 0.750199 0.677788 +vt 0.738036 0.677788 +vt 0.329412 0.166667 +vt 0.329412 0.833333 +vt 0.258824 0.833333 +vt 0.258824 0.166667 +vt 0.047059 0.000000 +vt 0.017647 0.062500 +vt 0.017647 0.000000 +vt 0.064706 0.062500 +vt 0.082353 0.729167 +vt 0.064706 0.729167 +vt 0.047059 0.729167 +vt 0.017647 0.729167 +vt 0.111765 0.729167 +vt 0.082353 0.062500 +vt 0.111765 0.062500 +vt 0.017647 0.791667 +vt 0.047059 0.791667 +vt 0.064706 0.729167 +vt 0.047059 0.062500 +vt 0.064706 0.062500 +vt 0.129412 0.729167 +vt 0.129412 0.062500 +vt 0.111765 0.000000 +vt 0.082353 -0.000000 +vt 0.000000 0.062500 +vt 0.000000 0.729167 +vt 0.082353 0.791667 +vt 0.111765 0.791667 +vt 0.435382 0.770833 +vt 0.441176 0.750310 +vt 0.446971 0.770833 +vt 0.435382 0.770833 +vt 0.441176 0.750310 +vt 0.446971 0.770833 +vt 0.435382 0.770833 +vt 0.441176 0.750310 +vt 0.446971 0.770833 +vt 0.435382 0.770833 +vt 0.441176 0.750310 +vt 0.446971 0.770833 +vt 0.435382 0.770833 +vt 0.441176 0.750310 +vt 0.446971 0.770833 +vt 0.435382 0.770833 +vt 0.441176 0.750310 +vt 0.446971 0.770833 +vt 0.435382 0.770833 +vt 0.441176 0.750310 +vt 0.446971 0.770833 +vt 0.435382 0.770833 +vt 0.441176 0.750310 +vt 0.446971 0.770833 +vt 0.435382 0.770833 +vt 0.441176 0.750310 +vt 0.446971 0.770833 +vt 0.858823 0.541667 +vt 0.841176 0.583333 +vt 0.841176 0.541667 +vt 0.841176 0.625000 +vt 0.858823 0.666667 +vt 0.841176 0.666667 +vt 0.917647 -0.000000 +vt 0.870588 0.125000 +vt 0.870588 0.000000 +vt 0.858824 0.083333 +vt 0.829412 0.541667 +vt 0.841176 0.125000 +vt 0.841176 0.541667 +vt 0.858824 0.125000 +vt 0.858824 0.541667 +vt 0.917647 0.541667 +vt 0.917647 0.125000 +vt 0.952941 0.541667 +vt 1.000000 0.125000 +vt 1.000000 0.541667 +vt 0.870588 0.541667 +vt 0.952941 0.125000 +vt 0.829412 0.625000 +vt 0.858823 0.625000 +vt 0.870588 0.583333 +vt 0.870588 0.625000 +vt 0.858823 0.583333 +vt 0.888235 0.687500 +vt 0.894118 0.645833 +vt 0.894118 0.687500 +vt 0.894118 0.937500 +vt 0.870588 0.937500 +vt 0.876471 0.687500 +vt 0.876471 0.937500 +vt 0.870588 0.687500 +vt 0.876471 0.645833 +vt 0.905882 0.562500 +vt 0.894118 0.541667 +vt 0.905882 0.541667 +vt 0.888235 0.645833 +vt 0.894118 0.562500 +vt 0.870588 0.562500 +vt 0.876471 0.562500 +vt 0.746204 0.807601 +vt 0.740493 0.794086 +vt 0.736677 0.773859 +vt 0.735337 0.750000 +vt 0.736677 0.726141 +vt 0.740493 0.705914 +vt 0.746204 0.692399 +vt 0.759678 0.692399 +vt 0.765389 0.705914 +vt 0.769205 0.726141 +vt 0.769205 0.773859 +vt 0.765389 0.794086 +vt 0.759678 0.807601 +vt 0.288235 0.833333 +vt 0.129412 0.083333 +vt 0.364706 0.083333 +vt 0.370588 -0.000000 +vt 0.364706 0.020833 +vt 0.394118 0.729167 +vt 0.364706 0.937500 +vt 0.370588 0.729167 +vt 0.370588 -0.000000 +vt 0.364706 0.020833 +vt 0.394118 0.729167 +vt 0.364706 0.937500 +vt 0.370588 0.729167 +vt 0.784055 0.240151 +vt 0.770588 0.249639 +vt 0.757121 0.240151 +vt 0.738075 0.172697 +vt 0.735396 0.125000 +vt 0.738075 0.077303 +vt 0.757120 0.009849 +vt 0.770588 0.000361 +vt 0.784055 0.009849 +vt 0.795473 0.036867 +vt 0.803101 0.077303 +vt 0.805780 0.125000 +vt 0.803101 0.172697 +vt 0.752718 0.656250 +vt 0.750199 0.677788 +vt 0.744118 0.686710 +vt 0.735517 0.656250 +vt 0.744117 0.625790 +vt 0.752718 0.656250 +vt 0.750199 0.677788 +vt 0.744118 0.686710 +vt 0.735517 0.656250 +vt 0.744118 0.625790 +vt 0.752718 0.656250 +vt 0.744118 0.686710 +vt 0.735517 0.656250 +vt 0.738036 0.634712 +vt 0.744118 0.625790 +vt 0.752718 0.656250 +vt 0.744118 0.686710 +vt 0.735517 0.656250 +vt 0.738036 0.634712 +vt 0.744117 0.625790 +vt 0.445274 0.785345 +vt 0.441176 0.791356 +vt 0.437079 0.785345 +vt 0.437079 0.756321 +vt 0.445274 0.756321 +vt 0.445274 0.785345 +vt 0.441176 0.791356 +vt 0.437079 0.785345 +vt 0.437079 0.756321 +vt 0.445274 0.756321 +vt 0.445274 0.785345 +vt 0.441176 0.791356 +vt 0.437079 0.785345 +vt 0.437079 0.756321 +vt 0.445274 0.756321 +vt 0.445274 0.785345 +vt 0.441176 0.791356 +vt 0.437079 0.785345 +vt 0.437079 0.756321 +vt 0.445274 0.756321 +vt 0.445274 0.785345 +vt 0.441176 0.791356 +vt 0.437079 0.785345 +vt 0.437079 0.756321 +vt 0.445274 0.756321 +vt 0.445274 0.785345 +vt 0.441176 0.791356 +vt 0.437079 0.785345 +vt 0.437079 0.756321 +vt 0.445274 0.756321 +vt 0.445274 0.785345 +vt 0.441176 0.791356 +vt 0.437079 0.785345 +vt 0.437079 0.756321 +vt 0.445274 0.756321 +vt 0.445274 0.785345 +vt 0.441176 0.791356 +vt 0.437079 0.785345 +vt 0.437079 0.756321 +vt 0.445274 0.756321 +vt 0.445274 0.785345 +vt 0.441176 0.791356 +vt 0.437079 0.785345 +vt 0.437079 0.756321 +vt 0.445274 0.756321 +vt 0.858824 0.041667 +vt 0.829412 0.125000 +vt 0.829412 0.583333 +vt 0.888235 0.937500 +vt 0.870588 0.645833 +vt 0.888235 0.562500 +vt 0.711765 0.312500 +vt 0.570588 0.375000 +vt 0.570588 0.312500 +vt 0.711765 0.875000 +vt 0.570588 0.937500 +vt 0.570588 0.875000 +vt 0.711765 0.375000 +vt 0.570588 0.437500 +vt 0.711765 0.937500 +vt 0.570588 1.000000 +vt 0.711765 0.500000 +vt 0.570588 0.562500 +vt 0.570588 0.500000 +vt 0.711765 0.437500 +vt 0.711765 0.000000 +vt 0.570588 0.062500 +vt 0.570588 0.000000 +vt 0.711765 0.562500 +vt 0.570588 0.625000 +vt 0.711765 0.062500 +vt 0.570588 0.125000 +vt 0.711765 0.625000 +vt 0.570588 0.687500 +vt 0.711765 0.125000 +vt 0.570588 0.187500 +vt 0.711765 0.687500 +vt 0.570588 0.750000 +vt 0.711765 0.187500 +vt 0.570588 0.250000 +vt 0.711765 0.750000 +vt 0.570588 0.812500 +vt 0.711765 0.250000 +vt 0.711765 0.812500 +vt 0.517647 0.333333 +vt 0.517647 0.895833 +vt 0.517647 0.395833 +vt 0.517647 0.958333 +vt 0.517647 0.541667 +vt 0.517647 0.520833 +vt 0.517647 0.479167 +vt 0.517647 0.458333 +vt 0.517647 0.020833 +vt 0.517647 0.583333 +vt 0.517647 0.083333 +vt 0.517647 0.645833 +vt 0.517647 0.166667 +vt 0.517647 0.145833 +vt 0.517647 0.708333 +vt 0.517647 0.208333 +vt 0.517647 0.770833 +vt 0.517647 0.270833 +vt 0.517647 0.833333 +vt 0.735294 0.250000 +vt 0.735294 0.312500 +vt 0.735294 0.875000 +vt 0.735294 0.375000 +vt 0.735294 0.937500 +vt 0.735294 0.437500 +vt 0.735294 1.000000 +vt 0.711765 1.000000 +vt 0.735294 0.562500 +vt 0.735294 0.500000 +vt 0.735294 0.062500 +vt 0.735294 0.625000 +vt 0.735294 0.125000 +vt 0.735294 0.687500 +vt 0.735294 0.187500 +vt 0.735294 0.750000 +vt 0.735294 0.812500 +vt 0.770588 0.291667 +vt 0.782353 0.250000 +vt 0.782353 0.291667 +vt 0.758824 0.458333 +vt 0.770588 0.458333 +vt 0.805882 0.458333 +vt 0.800000 0.625000 +vt 0.794118 0.458333 +vt 0.735294 0.291667 +vt 0.747059 0.250000 +vt 0.747059 0.291667 +vt 0.788235 0.625000 +vt 0.782353 0.458333 +vt 0.758824 0.250000 +vt 0.758824 0.291667 +vt 0.776471 0.625000 +vt 0.770588 0.250000 +vt 0.817647 0.458333 +vt 0.805882 0.291667 +vt 0.817647 0.291667 +vt 0.764706 0.625000 +vt 0.805882 0.250000 +vt 0.817647 0.250000 +vt 0.752941 0.625000 +vt 0.747059 0.458333 +vt 0.794118 0.250000 +vt 0.794118 0.291667 +vt 0.829412 0.291667 +vt 0.829412 0.250000 +vt 0.811765 0.625000 +vt 0.770588 0.291667 +vt 0.782353 0.250000 +vt 0.782353 0.291667 +vt 0.770588 0.458333 +vt 0.758824 0.291667 +vt 0.805882 0.458333 +vt 0.800000 0.625000 +vt 0.794118 0.458333 +vt 0.747059 0.291667 +vt 0.735294 0.250000 +vt 0.747059 0.250000 +vt 0.788235 0.625000 +vt 0.782353 0.458333 +vt 0.758824 0.250000 +vt 0.776471 0.625000 +vt 0.770588 0.250000 +vt 0.817647 0.458333 +vt 0.805882 0.291667 +vt 0.817647 0.291667 +vt 0.764706 0.625000 +vt 0.758824 0.458333 +vt 0.805882 0.250000 +vt 0.817647 0.250000 +vt 0.752941 0.625000 +vt 0.747059 0.458333 +vt 0.794118 0.250000 +vt 0.794118 0.291667 +vt 0.829412 0.291667 +vt 0.829412 0.250000 +vt 0.811765 0.625000 +vt 0.782353 0.291667 +vt 0.770588 0.250000 +vt 0.782353 0.250000 +vt 0.758824 0.458333 +vt 0.770588 0.291667 +vt 0.770588 0.458333 +vt 0.805882 0.458333 +vt 0.800000 0.625000 +vt 0.794118 0.458333 +vt 0.735294 0.291667 +vt 0.747059 0.250000 +vt 0.747059 0.291667 +vt 0.788235 0.625000 +vt 0.782353 0.458333 +vt 0.758824 0.291667 +vt 0.758824 0.250000 +vt 0.776471 0.625000 +vt 0.817647 0.458333 +vt 0.805882 0.291667 +vt 0.817647 0.291667 +vt 0.764706 0.625000 +vt 0.805882 0.250000 +vt 0.817647 0.250000 +vt 0.752941 0.625000 +vt 0.747059 0.458333 +vt 0.794118 0.291667 +vt 0.794118 0.250000 +vt 0.829412 0.250000 +vt 0.829412 0.291667 +vt 0.811765 0.625000 +vt 0.770588 0.291667 +vt 0.782353 0.250000 +vt 0.782353 0.291667 +vt 0.758824 0.458333 +vt 0.770588 0.458333 +vt 0.805882 0.458333 +vt 0.800000 0.625000 +vt 0.794118 0.458333 +vt 0.747059 0.291667 +vt 0.735294 0.250000 +vt 0.747059 0.250000 +vt 0.788235 0.625000 +vt 0.782353 0.458333 +vt 0.758824 0.250000 +vt 0.758824 0.291667 +vt 0.776471 0.625000 +vt 0.770588 0.250000 +vt 0.817647 0.291667 +vt 0.817647 0.458333 +vt 0.764706 0.625000 +vt 0.805882 0.250000 +vt 0.817647 0.250000 +vt 0.752941 0.625000 +vt 0.747059 0.458333 +vt 0.794118 0.250000 +vt 0.794118 0.291667 +vt 0.805882 0.291667 +vt 0.829412 0.250000 +vt 0.829412 0.291667 +vt 0.811765 0.625000 +vt 0.452941 0.854167 +vt 0.447059 0.833333 +vt 0.452941 0.833333 +vt 0.452941 0.875000 +vt 0.517647 0.854167 +vt 0.517647 0.875000 +vt 0.452941 0.770833 +vt 0.447059 0.791667 +vt 0.447059 0.770833 +vt 0.517647 0.833333 +vt 0.452941 0.895833 +vt 0.447059 0.875000 +vt 0.517647 0.812500 +vt 0.452941 0.812500 +vt 0.452941 0.791667 +vt 0.517647 0.791667 +vt 0.447059 0.916667 +vt 0.447059 0.895833 +vt 0.517647 0.770833 +vt 0.447059 0.812500 +vt 0.517647 0.750000 +vt 0.452941 0.750000 +vt 0.447059 0.750000 +vt 0.447059 0.854167 +vt 0.452941 0.916667 +vt 0.517647 0.895833 +vt 0.517647 0.916667 +vt 0.452941 0.854167 +vt 0.447059 0.833333 +vt 0.452941 0.833333 +vt 0.452941 0.875000 +vt 0.517647 0.854167 +vt 0.517647 0.875000 +vt 0.452941 0.791667 +vt 0.447059 0.770833 +vt 0.452941 0.770833 +vt 0.517647 0.833333 +vt 0.447059 0.895833 +vt 0.447059 0.875000 +vt 0.517647 0.812500 +vt 0.447059 0.812500 +vt 0.447059 0.791667 +vt 0.452941 0.812500 +vt 0.517647 0.791667 +vt 0.452941 0.895833 +vt 0.447059 0.916667 +vt 0.517647 0.770833 +vt 0.517647 0.750000 +vt 0.452941 0.750000 +vt 0.447059 0.750000 +vt 0.447059 0.854167 +vt 0.452941 0.916667 +vt 0.517647 0.895833 +vt 0.517647 0.916667 +vt 0.452941 0.854167 +vt 0.447059 0.833333 +vt 0.452941 0.833333 +vt 0.452941 0.875000 +vt 0.517647 0.854167 +vt 0.517647 0.875000 +vt 0.452941 0.791667 +vt 0.447059 0.770833 +vt 0.452941 0.770833 +vt 0.517647 0.833333 +vt 0.452941 0.895833 +vt 0.447059 0.875000 +vt 0.517647 0.812500 +vt 0.447059 0.812500 +vt 0.447059 0.791667 +vt 0.452941 0.812500 +vt 0.517647 0.791667 +vt 0.447059 0.916667 +vt 0.447059 0.895833 +vt 0.517647 0.770833 +vt 0.517647 0.750000 +vt 0.452941 0.750000 +vt 0.447059 0.750000 +vt 0.447059 0.854167 +vt 0.517647 0.916667 +vt 0.517647 0.895833 +vt 0.517647 0.895833 +vt 0.452941 0.875000 +vt 0.517647 0.875000 +vt 0.452941 0.916667 +vt 0.517647 0.916667 +vt 0.447059 0.854167 +vt 0.452941 0.854167 +vt 0.452941 0.750000 +vt 0.447059 0.770833 +vt 0.447059 0.750000 +vt 0.452941 0.770833 +vt 0.517647 0.750000 +vt 0.517647 0.770833 +vt 0.452941 0.833333 +vt 0.447059 0.812500 +vt 0.452941 0.812500 +vt 0.517647 0.791667 +vt 0.447059 0.895833 +vt 0.452941 0.895833 +vt 0.517647 0.812500 +vt 0.452941 0.791667 +vt 0.447059 0.791667 +vt 0.517647 0.833333 +vt 0.447059 0.875000 +vt 0.517647 0.854167 +vt 0.447059 0.833333 +vt 0.452941 0.854167 +vt 0.447059 0.833333 +vt 0.452941 0.833333 +vt 0.452941 0.875000 +vt 0.517647 0.854167 +vt 0.517647 0.875000 +vt 0.517647 0.895833 +vt 0.452941 0.875000 +vt 0.517647 0.875000 +vt 0.452941 0.791667 +vt 0.447059 0.770833 +vt 0.452941 0.770833 +vt 0.517647 0.833333 +vt 0.452941 0.916667 +vt 0.517647 0.916667 +vt 0.452941 0.895833 +vt 0.447059 0.875000 +vt 0.517647 0.812500 +vt 0.447059 0.854167 +vt 0.452941 0.854167 +vt 0.447059 0.812500 +vt 0.447059 0.791667 +vt 0.517647 0.791667 +vt 0.452941 0.750000 +vt 0.447059 0.770833 +vt 0.447059 0.750000 +vt 0.452941 0.916667 +vt 0.447059 0.895833 +vt 0.517647 0.770833 +vt 0.452941 0.770833 +vt 0.517647 0.750000 +vt 0.517647 0.770833 +vt 0.452941 0.812500 +vt 0.517647 0.750000 +vt 0.452941 0.750000 +vt 0.447059 0.750000 +vt 0.447059 0.854167 +vt 0.517647 0.895833 +vt 0.517647 0.916667 +vt 0.452941 0.833333 +vt 0.447059 0.812500 +vt 0.452941 0.812500 +vt 0.517647 0.791667 +vt 0.447059 0.895833 +vt 0.452941 0.895833 +vt 0.517647 0.812500 +vt 0.452941 0.791667 +vt 0.447059 0.791667 +vt 0.517647 0.833333 +vt 0.447059 0.875000 +vt 0.517647 0.854167 +vt 0.447059 0.833333 +vt 0.452941 0.854167 +vt 0.447059 0.833333 +vt 0.452941 0.833333 +vt 0.452941 0.875000 +vt 0.517647 0.854167 +vt 0.517647 0.875000 +vt 0.452941 0.791667 +vt 0.447059 0.770833 +vt 0.452941 0.770833 +vt 0.517647 0.833333 +vt 0.447059 0.895833 +vt 0.447059 0.875000 +vt 0.517647 0.812500 +vt 0.447059 0.812500 +vt 0.447059 0.791667 +vt 0.452941 0.812500 +vt 0.517647 0.791667 +vt 0.452941 0.916667 +vt 0.452941 0.895833 +vt 0.517647 0.770833 +vt 0.517647 0.750000 +vt 0.452941 0.750000 +vt 0.447059 0.750000 +vt 0.447059 0.854167 +vt 0.517647 0.895833 +vt 0.517647 0.916667 +vt 0.452941 0.895833 +vt 0.517647 0.875000 +vt 0.517647 0.895833 +vt 0.452941 0.916667 +vt 0.517647 0.916667 +vt 0.452941 0.854167 +vt 0.447059 0.875000 +vt 0.447059 0.854167 +vt 0.452941 0.750000 +vt 0.447059 0.770833 +vt 0.447059 0.750000 +vt 0.452941 0.770833 +vt 0.517647 0.750000 +vt 0.517647 0.770833 +vt 0.452941 0.833333 +vt 0.447059 0.812500 +vt 0.452941 0.812500 +vt 0.452941 0.791667 +vt 0.517647 0.791667 +vt 0.447059 0.916667 +vt 0.447059 0.895833 +vt 0.517647 0.812500 +vt 0.447059 0.791667 +vt 0.517647 0.833333 +vt 0.452941 0.875000 +vt 0.517647 0.854167 +vt 0.447059 0.833333 +vt 0.452941 0.895833 +vt 0.517647 0.875000 +vt 0.517647 0.895833 +vt 0.452941 0.916667 +vt 0.517647 0.916667 +vt 0.452941 0.875000 +vt 0.447059 0.854167 +vt 0.452941 0.854167 +vt 0.452941 0.750000 +vt 0.447059 0.770833 +vt 0.447059 0.750000 +vt 0.452941 0.770833 +vt 0.517647 0.750000 +vt 0.517647 0.770833 +vt 0.452941 0.833333 +vt 0.447059 0.812500 +vt 0.452941 0.812500 +vt 0.452941 0.791667 +vt 0.517647 0.791667 +vt 0.447059 0.895833 +vt 0.517647 0.812500 +vt 0.447059 0.791667 +vt 0.517647 0.833333 +vt 0.447059 0.875000 +vt 0.517647 0.854167 +vt 0.447059 0.833333 +vt 0.905882 0.687500 +vt 0.905882 0.937500 +vt 0.905882 0.645833 +vt 0.517647 0.354167 +vt 0.517647 0.916667 +vt 0.517647 0.416667 +vt 0.517647 0.979167 +vt 0.517647 0.041667 +vt 0.517647 0.604167 +vt 0.517647 0.104167 +vt 0.517647 0.666667 +vt 0.517647 0.729167 +vt 0.517647 0.229167 +vt 0.517647 0.791667 +vt 0.517647 0.291667 +vt 0.517647 0.854167 +vt 0.735294 0.000000 +vt 0.735294 0.250000 +vt 0.735294 0.291667 +vt 0.735294 0.250000 +vt 0.735294 0.291667 +vt 0.452941 0.916667 +vt 0.447059 0.916667 +vt 0.447059 0.916667 +vt 0.447059 0.916667 +vt 0.447059 0.916667 +vt 0.447059 0.916667 +vn 0.0000 0.0000 1.0000 +vn 0.0000 -1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.1961 -0.9806 +vn 0.0000 -0.1961 0.9806 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 1.0000 0.0000 +vn -0.7943 -0.1191 0.5957 +vn 0.7943 -0.1191 0.5957 +vn 0.9239 0.3827 0.0000 +vn 0.7071 0.7071 0.0000 +vn -0.7071 -0.7071 0.0000 +vn -0.3827 -0.9239 0.0000 +vn 0.3827 0.9239 0.0000 +vn -0.3827 0.9239 0.0000 +vn 0.3827 -0.9239 0.0000 +vn -0.7071 0.7071 0.0000 +vn 0.7071 -0.7071 0.0000 +vn -0.9239 0.3827 0.0000 +vn 0.9239 -0.3827 0.0000 +vn -0.9239 -0.3827 0.0000 +vn 0.5996 0.5996 0.5300 +vn 0.7834 0.3245 0.5300 +vn -0.3245 -0.7834 0.5300 +vn -0.5996 -0.5996 0.5300 +vn 0.3245 0.7834 0.5300 +vn -0.0000 -0.8480 0.5300 +vn 0.0000 0.8480 0.5300 +vn -0.3245 0.7834 0.5300 +vn 0.3245 -0.7834 0.5300 +vn -0.5996 0.5996 0.5300 +vn 0.5996 -0.5996 0.5300 +vn -0.7834 0.3245 0.5300 +vn 0.7834 -0.3245 0.5300 +vn -0.8480 -0.0000 0.5300 +vn 0.8480 -0.0000 0.5300 +vn -0.7834 -0.3245 0.5300 +vn 0.8263 0.3423 -0.4472 +vn 0.8944 0.0000 -0.4472 +vn -0.9830 0.1835 0.0000 +vn -0.9781 0.2082 0.0000 +vn -0.8263 -0.3423 -0.4472 +vn -0.6325 -0.6325 -0.4472 +vn 0.6325 0.6325 -0.4472 +vn -0.3423 -0.8263 -0.4472 +vn 0.3423 0.8263 -0.4472 +vn -0.0000 -0.8944 -0.4472 +vn 0.0000 0.8944 -0.4472 +vn -0.3423 0.8263 -0.4472 +vn 0.3423 -0.8263 -0.4472 +vn -0.6325 0.6325 -0.4472 +vn 0.6325 -0.6325 -0.4472 +vn -0.8263 0.3423 -0.4472 +vn 0.8263 -0.3423 -0.4472 +vn -0.8944 0.0000 -0.4472 +vn 0.0000 -0.8000 -0.6000 +vn 0.5657 -0.5657 -0.6000 +vn 0.6621 0.6621 0.3511 +vn 0.4698 -0.4698 0.7474 +vn 0.9363 0.0000 0.3511 +vn -0.5657 0.5657 -0.6000 +vn -0.8000 0.0000 -0.6000 +vn 0.6621 -0.6621 0.3511 +vn -0.5657 -0.5657 -0.6000 +vn -0.0000 -0.9363 0.3511 +vn -0.6621 -0.6621 0.3511 +vn -0.0000 0.8000 -0.6000 +vn 0.5657 0.5657 -0.6000 +vn -0.8730 -0.3616 0.3274 +vn 0.8000 -0.0000 -0.6000 +vn 0.3616 0.8730 0.3274 +vn -0.4698 -0.4698 0.7474 +vn -0.9363 0.0000 0.3511 +vn -0.6621 0.6621 0.3511 +vn -0.3616 0.8730 0.3274 +vn 0.8730 -0.3616 0.3274 +vn -0.4698 0.4698 0.7474 +vn 0.0000 0.9363 0.3511 +vn 0.8730 0.3616 0.3274 +vn -0.3616 -0.8730 0.3274 +vn 0.4698 0.4698 0.7474 +vn 0.3616 -0.8730 0.3274 +vn -0.8730 0.3616 0.3274 +vn 0.5657 0.5657 0.6000 +vn 0.8000 0.0000 0.6000 +vn -0.5657 -0.5657 0.6000 +vn -0.0000 -0.8000 0.6000 +vn -0.5657 0.5657 0.6000 +vn -0.0000 0.8000 0.6000 +vn 0.5657 -0.5657 0.6000 +vn -0.8000 0.0000 0.6000 +vn 0.0000 0.0985 -0.9951 +vn 0.0000 -0.0985 0.9951 +vn 0.0000 -0.2298 -0.9732 +vn 0.0000 -0.4472 -0.8944 +vn 0.0000 0.2298 0.9732 +vn 0.0000 0.4472 0.8944 +s off +f 89/100/19 93/101/19 81/102/19 +f 101/103/20 103/104/20 102/105/20 +f 285/106/21 288/107/21 286/108/21 +f 99/109/22 102/110/22 97/111/22 +f 104/112/23 99/113/23 100/114/23 +f 102/110/24 98/115/24 97/111/24 +f 109/116/20 111/117/20 110/118/20 +f 105/119/24 111/120/24 106/121/24 +f 108/122/23 109/116/23 107/123/23 +f 116/124/19 128/125/19 129/126/19 +f 128/125/19 105/119/19 106/121/19 +f 116/124/19 134/127/19 124/128/19 +f 124/128/19 133/129/19 123/130/19 +f 123/130/19 127/131/19 122/132/19 +f 121/133/19 127/131/19 135/134/19 +f 117/135/25 130/136/25 118/137/25 +f 130/136/25 119/138/25 118/137/25 +f 131/139/25 120/140/25 119/138/25 +f 132/141/25 113/142/25 120/140/25 +f 126/143/25 113/142/25 125/144/25 +f 107/123/25 126/143/25 108/122/25 +f 141/145/20 143/146/20 142/147/20 +f 137/148/24 143/149/24 138/150/24 +f 140/151/23 141/145/23 139/152/23 +f 148/153/19 160/154/19 161/155/19 +f 160/154/19 137/148/19 138/150/19 +f 148/153/19 166/156/19 156/157/19 +f 156/157/19 165/158/19 155/159/19 +f 155/159/19 159/160/19 154/161/19 +f 153/162/19 159/160/19 167/163/19 +f 149/164/25 162/165/25 150/166/25 +f 162/165/25 151/167/25 150/166/25 +f 163/168/25 152/169/25 151/167/25 +f 164/170/25 145/171/25 152/169/25 +f 158/172/25 145/171/25 157/173/25 +f 139/152/25 158/172/25 140/151/25 +f 171/174/25 183/175/25 179/176/25 +f 206/177/25 204/178/25 185/179/25 +f 230/180/25 228/181/25 209/182/25 +f 233/183/25 256/184/25 254/185/25 +f 257/186/25 280/187/25 278/188/25 +f 284/189/21 100/114/21 283/190/21 +f 281/191/21 103/104/21 282/192/21 +f 285/106/21 283/190/21 100/114/21 +f 104/112/21 284/189/21 286/108/21 +f 288/193/26 290/194/26 282/195/26 +f 286/196/23 294/197/23 285/198/23 +f 290/194/21 295/199/21 289/200/21 +f 292/201/21 293/202/21 291/203/21 +f 281/204/20 295/199/20 287/205/20 +f 287/206/24 296/207/24 288/208/24 +f 283/209/24 291/203/24 284/210/24 +f 284/211/26 293/202/26 286/212/26 +f 282/213/23 289/200/23 281/214/23 +f 285/215/20 292/201/20 283/216/20 +f 319/217/19 317/218/19 315/219/19 +f 343/220/19 341/221/19 339/222/19 +f 367/223/19 365/224/19 363/225/19 +f 370/226/19 372/227/19 374/228/19 +f 418/229/19 420/230/19 422/231/19 +f 415/232/19 413/233/19 411/234/19 +f 463/235/19 461/236/19 459/237/19 +f 466/238/19 468/239/19 470/240/19 +f 490/241/19 492/242/19 494/243/19 +f 529/244/19 532/245/19 530/246/19 +f 528/247/25 525/248/25 526/249/25 +f 519/250/20 521/251/20 520/252/20 +f 524/253/20 520/252/20 521/251/20 +f 513/254/27 523/255/27 517/256/27 +f 517/256/24 524/257/24 518/258/24 +f 516/259/21 521/251/21 522/260/21 +f 515/261/22 520/262/22 513/263/22 +f 514/264/28 524/257/28 521/251/28 +f 516/259/23 519/265/23 515/261/23 +f 526/266/21 532/245/21 528/247/21 +f 527/267/22 529/268/22 525/269/22 +f 528/247/20 531/270/20 527/267/20 +f 539/271/21 544/272/21 540/273/21 +f 536/274/21 539/271/21 540/273/21 +f 535/275/22 538/276/22 533/277/22 +f 537/278/22 542/279/22 538/276/22 +f 545/280/20 547/281/20 546/282/20 +f 543/283/21 548/284/21 544/272/21 +f 542/279/22 545/285/22 546/286/22 +f 81/102/19 82/287/19 83/288/19 +f 83/288/19 84/289/19 81/102/19 +f 84/289/19 85/290/19 81/102/19 +f 85/290/19 86/291/19 89/100/19 +f 86/291/19 87/292/19 89/100/19 +f 87/292/19 88/293/19 89/100/19 +f 89/100/19 90/294/19 91/295/19 +f 91/295/19 92/296/19 89/100/19 +f 92/296/19 93/101/19 89/100/19 +f 93/101/19 94/297/19 81/102/19 +f 94/297/19 95/298/19 81/102/19 +f 95/298/19 96/299/19 81/102/19 +f 81/102/19 85/290/19 89/100/19 +f 101/103/20 104/112/20 103/104/20 +f 285/106/21 287/300/21 288/107/21 +f 99/109/22 101/301/22 102/110/22 +f 104/112/23 101/302/23 99/113/23 +f 102/110/24 103/104/24 98/115/24 +f 109/116/20 112/303/20 111/117/20 +f 105/119/24 110/118/24 111/120/24 +f 108/122/23 112/304/23 109/116/23 +f 116/124/19 115/305/19 128/125/19 +f 128/125/19 115/305/19 105/119/19 +f 116/124/19 129/126/19 134/127/19 +f 124/128/19 134/127/19 133/129/19 +f 123/130/19 133/129/19 127/131/19 +f 121/133/19 122/132/19 127/131/19 +f 117/135/25 136/306/25 130/136/25 +f 130/136/25 131/139/25 119/138/25 +f 131/139/25 132/141/25 120/140/25 +f 132/141/25 125/144/25 113/142/25 +f 126/143/25 114/307/25 113/142/25 +f 107/123/25 114/307/25 126/143/25 +f 141/145/20 144/308/20 143/146/20 +f 137/148/24 142/147/24 143/149/24 +f 140/151/23 144/309/23 141/145/23 +f 148/153/19 147/310/19 160/154/19 +f 160/154/19 147/310/19 137/148/19 +f 148/153/19 161/155/19 166/156/19 +f 156/157/19 166/156/19 165/158/19 +f 155/159/19 165/158/19 159/160/19 +f 153/162/19 154/161/19 159/160/19 +f 149/164/25 168/311/25 162/165/25 +f 162/165/25 163/168/25 151/167/25 +f 163/168/25 164/170/25 152/169/25 +f 164/170/25 157/173/25 145/171/25 +f 158/172/25 146/312/25 145/171/25 +f 139/152/25 146/312/25 158/172/25 +f 171/174/25 170/313/25 169/314/25 +f 169/314/25 184/315/25 171/174/25 +f 184/315/25 183/175/25 171/174/25 +f 183/175/25 182/316/25 181/317/25 +f 181/317/25 180/318/25 183/175/25 +f 180/318/25 179/176/25 183/175/25 +f 179/176/25 178/319/25 177/320/25 +f 177/320/25 176/321/25 179/176/25 +f 176/321/25 175/322/25 179/176/25 +f 175/322/25 174/323/25 173/324/25 +f 173/324/25 172/325/25 171/174/25 +f 175/322/25 173/324/25 179/176/25 +f 173/324/25 171/174/25 179/176/25 +f 185/179/25 202/326/25 208/327/25 +f 208/327/25 207/328/25 206/177/25 +f 206/177/25 205/329/25 204/178/25 +f 204/178/25 203/330/25 185/179/25 +f 185/179/25 208/327/25 206/177/25 +f 209/182/25 226/331/25 232/332/25 +f 232/332/25 231/333/25 230/180/25 +f 230/180/25 229/334/25 228/181/25 +f 228/181/25 227/335/25 209/182/25 +f 209/182/25 232/332/25 230/180/25 +f 233/183/25 250/336/25 256/184/25 +f 256/184/25 255/337/25 254/185/25 +f 254/185/25 253/338/25 252/339/25 +f 252/339/25 251/340/25 254/185/25 +f 251/340/25 233/183/25 254/185/25 +f 257/186/25 274/341/25 280/187/25 +f 280/187/25 279/342/25 278/188/25 +f 278/188/25 277/343/25 257/186/25 +f 277/343/25 276/344/25 257/186/25 +f 276/344/25 275/345/25 257/186/25 +f 284/189/21 104/112/21 100/114/21 +f 281/191/21 98/115/21 103/104/21 +f 100/114/21 98/115/21 287/300/21 +f 98/115/21 281/191/21 287/300/21 +f 287/300/21 285/106/21 100/114/21 +f 282/192/21 103/104/21 288/107/21 +f 103/104/21 104/112/21 286/108/21 +f 288/107/21 103/104/21 286/108/21 +f 288/193/26 296/207/26 290/194/26 +f 286/196/23 293/202/23 294/197/23 +f 290/194/21 296/207/21 295/199/21 +f 292/201/21 294/197/21 293/202/21 +f 281/204/20 289/200/20 295/199/20 +f 287/206/24 295/199/24 296/207/24 +f 283/209/24 292/201/24 291/203/24 +f 284/211/26 291/203/26 293/202/26 +f 282/213/23 290/194/23 289/200/23 +f 285/215/20 294/197/20 292/201/20 +f 315/219/19 298/346/19 297/347/19 +f 297/347/19 320/348/19 319/217/19 +f 319/217/19 318/349/19 317/218/19 +f 317/218/19 316/350/19 315/219/19 +f 315/219/19 297/347/19 319/217/19 +f 339/222/19 322/351/19 321/352/19 +f 321/352/19 344/353/19 343/220/19 +f 343/220/19 342/354/19 341/221/19 +f 341/221/19 340/355/19 339/222/19 +f 339/222/19 321/352/19 343/220/19 +f 363/225/19 346/356/19 345/357/19 +f 345/357/19 368/358/19 367/223/19 +f 367/223/19 366/359/19 365/224/19 +f 365/224/19 364/360/19 363/225/19 +f 363/225/19 345/357/19 367/223/19 +f 374/228/19 391/361/19 392/362/19 +f 392/362/19 369/363/19 370/226/19 +f 370/226/19 371/364/19 372/227/19 +f 372/227/19 373/365/19 374/228/19 +f 374/228/19 392/362/19 370/226/19 +f 422/231/19 439/366/19 440/367/19 +f 440/367/19 417/368/19 418/229/19 +f 418/229/19 419/369/19 420/230/19 +f 420/230/19 421/370/19 422/231/19 +f 422/231/19 440/367/19 418/229/19 +f 411/234/19 394/371/19 393/372/19 +f 393/372/19 416/373/19 415/232/19 +f 415/232/19 414/374/19 413/233/19 +f 413/233/19 412/375/19 411/234/19 +f 411/234/19 393/372/19 415/232/19 +f 459/237/19 442/376/19 441/377/19 +f 441/377/19 464/378/19 463/235/19 +f 463/235/19 462/379/19 461/236/19 +f 461/236/19 460/380/19 459/237/19 +f 459/237/19 441/377/19 463/235/19 +f 470/240/19 487/381/19 488/382/19 +f 488/382/19 465/383/19 466/238/19 +f 466/238/19 467/384/19 468/239/19 +f 468/239/19 469/385/19 470/240/19 +f 470/240/19 488/382/19 466/238/19 +f 494/243/19 511/386/19 512/387/19 +f 512/387/19 489/388/19 490/241/19 +f 490/241/19 491/389/19 492/242/19 +f 492/242/19 493/390/19 494/243/19 +f 494/243/19 512/387/19 490/241/19 +f 529/244/19 531/270/19 532/245/19 +f 528/247/25 527/267/25 525/248/25 +f 519/250/20 522/260/20 521/251/20 +f 524/253/20 523/391/20 520/252/20 +f 513/254/27 520/392/27 523/255/27 +f 517/256/24 523/255/24 524/257/24 +f 516/259/21 514/264/21 521/251/21 +f 515/261/22 519/265/22 520/262/22 +f 514/264/28 518/258/28 524/257/28 +f 516/259/23 522/260/23 519/265/23 +f 526/266/21 530/393/21 532/245/21 +f 527/267/22 531/270/22 529/268/22 +f 528/247/20 532/245/20 531/270/20 +f 539/271/21 543/283/21 544/272/21 +f 536/274/21 534/394/21 539/271/21 +f 535/275/22 537/278/22 538/276/22 +f 537/278/22 541/395/22 542/279/22 +f 545/280/20 548/284/20 547/281/20 +f 543/283/21 547/396/21 548/284/21 +f 542/279/22 541/395/22 545/285/22 +s 1 +f 78/397/29 63/398/30 62/399/29 +f 71/400/31 56/401/32 55/402/31 +f 79/403/30 64/404/33 63/398/30 +f 72/405/32 57/406/20 56/401/32 +f 65/407/26 50/408/34 49/409/26 +f 80/410/33 49/409/26 64/404/33 +f 73/411/20 58/412/35 57/413/20 +f 66/414/34 51/415/36 50/408/34 +f 74/416/35 59/417/37 58/412/35 +f 67/418/36 52/419/38 51/415/36 +f 75/420/37 60/421/39 59/417/37 +f 68/422/38 53/423/22 52/419/38 +f 76/424/39 61/425/21 60/421/39 +f 69/426/22 54/427/40 53/423/22 +f 77/428/21 62/399/29 61/425/21 +f 70/429/40 55/402/31 54/427/40 +f 63/398/41 94/430/42 62/399/42 +f 56/401/43 87/431/44 55/402/44 +f 64/404/45 95/432/41 63/398/41 +f 57/406/46 88/433/43 56/401/43 +f 49/409/47 82/434/48 81/435/47 +f 64/404/45 81/436/47 96/437/45 +f 58/412/49 89/438/46 57/413/46 +f 51/415/50 82/439/48 50/408/48 +f 59/417/51 90/440/49 58/412/49 +f 52/419/52 83/441/50 51/415/50 +f 59/417/51 92/442/53 91/443/51 +f 53/423/54 84/444/52 52/419/52 +f 61/425/55 92/445/53 60/421/53 +f 54/427/56 85/446/54 53/423/54 +f 62/399/42 93/447/55 61/425/55 +f 55/402/44 86/448/56 54/427/56 +f 78/397/57 181/449/58 182/450/57 +f 107/123/59 110/118/22 105/119/60 +f 115/305/36 107/123/59 105/119/60 +f 114/307/36 116/124/26 113/142/26 +f 113/142/26 124/128/30 120/140/30 +f 120/140/30 123/130/21 119/138/21 +f 119/138/21 122/132/37 118/137/37 +f 121/133/35 118/137/37 122/132/37 +f 139/152/59 142/147/22 137/148/60 +f 147/310/36 139/152/59 137/148/60 +f 146/312/36 148/153/26 145/171/26 +f 145/171/26 156/157/30 152/169/30 +f 152/169/30 155/159/21 151/167/21 +f 151/167/21 154/161/37 150/166/37 +f 153/162/35 150/166/37 154/161/37 +f 70/429/61 175/451/62 71/400/62 +f 78/397/57 183/452/63 79/403/63 +f 72/405/64 175/451/62 176/453/64 +f 79/403/63 184/454/65 80/410/65 +f 72/405/64 177/455/66 73/456/66 +f 65/407/67 170/457/68 66/414/68 +f 80/410/65 169/458/67 65/407/67 +f 73/411/66 178/459/69 74/416/69 +f 66/414/68 171/460/70 67/418/70 +f 75/420/71 178/459/69 179/461/71 +f 68/422/72 171/460/70 172/462/72 +f 75/420/71 180/463/73 76/424/73 +f 69/426/74 172/462/72 173/464/74 +f 76/424/73 181/449/58 77/428/58 +f 69/426/74 174/465/61 70/429/61 +f 194/466/75 207/467/76 196/468/76 +f 195/469/31 194/466/20 193/470/20 +f 187/471/77 199/472/78 189/473/79 +f 188/474/80 204/475/81 190/476/81 +f 189/473/79 199/477/78 191/478/82 +f 190/476/81 205/479/83 192/480/83 +f 193/470/20 196/468/37 191/478/37 +f 191/478/82 199/481/78 193/470/84 +f 194/466/75 205/479/83 206/482/75 +f 200/483/33 201/484/30 186/485/33 +f 193/470/84 199/486/78 195/469/85 +f 186/485/86 202/487/87 185/488/86 +f 195/469/85 199/489/78 197/490/88 +f 196/468/76 208/491/89 198/492/89 +f 191/478/37 198/492/21 189/473/21 +f 189/473/21 201/484/30 187/471/30 +f 198/492/89 202/487/87 201/484/87 +f 188/493/80 185/488/86 203/494/80 +f 200/483/90 199/495/78 187/471/77 +f 197/490/40 192/480/31 195/469/31 +f 218/496/81 231/497/83 220/498/83 +f 217/499/22 216/500/36 218/496/22 +f 211/501/82 223/502/91 213/503/84 +f 214/504/86 227/505/87 228/506/86 +f 213/503/84 223/507/91 215/508/85 +f 214/504/86 229/509/80 216/500/80 +f 217/499/22 220/498/31 215/508/31 +f 215/508/85 223/510/91 217/499/92 +f 218/496/81 229/509/80 230/511/81 +f 224/512/39 225/513/37 210/514/39 +f 217/499/92 223/515/91 219/516/93 +f 210/514/89 226/517/76 209/518/89 +f 219/516/93 223/519/91 221/520/94 +f 220/498/83 232/521/75 222/522/75 +f 215/508/31 222/522/20 213/503/20 +f 213/503/20 225/513/37 211/501/37 +f 222/522/75 226/517/76 225/513/76 +f 212/523/87 209/518/89 227/524/87 +f 224/512/95 223/525/91 211/501/82 +f 221/520/34 216/500/36 219/516/36 +f 244/526/80 254/527/86 255/528/80 +f 243/529/30 242/530/26 241/531/26 +f 235/532/85 247/533/96 237/534/92 +f 236/535/76 252/536/89 238/537/89 +f 237/534/92 247/538/96 239/539/93 +f 240/540/87 252/536/89 253/541/87 +f 241/531/26 244/526/36 239/539/36 +f 239/539/93 247/542/96 241/531/97 +f 240/540/87 254/527/86 242/530/86 +f 248/543/32 249/544/31 234/545/32 +f 241/531/97 247/546/96 243/529/77 +f 234/545/75 250/547/83 233/548/75 +f 243/529/77 247/549/96 245/550/98 +f 246/551/81 255/528/80 256/552/81 +f 239/539/36 246/551/22 237/534/22 +f 237/534/22 249/544/31 235/532/31 +f 246/551/81 250/547/83 249/544/83 +f 234/545/75 251/553/76 236/554/76 +f 248/543/99 247/555/96 235/532/85 +f 245/550/29 240/540/30 243/529/30 +f 266/556/89 279/557/87 268/558/87 +f 267/559/37 266/556/21 265/560/21 +f 259/561/93 271/562/100 261/563/97 +f 262/564/75 275/565/83 276/566/75 +f 261/563/97 271/567/100 263/568/77 +f 262/564/75 277/569/76 264/570/76 +f 265/560/21 268/558/30 263/568/30 +f 263/568/77 271/571/100 265/560/79 +f 266/556/89 277/569/76 278/572/89 +f 259/561/36 258/573/38 272/574/38 +f 265/560/79 271/575/100 267/559/82 +f 258/573/81 274/576/80 257/577/81 +f 267/559/82 271/578/100 269/579/101 +f 268/558/87 280/580/86 270/581/86 +f 263/568/30 270/581/26 261/563/26 +f 261/563/26 273/582/36 259/561/36 +f 270/581/86 274/576/80 273/582/80 +f 258/573/81 275/583/83 260/584/83 +f 272/574/102 271/585/100 259/561/93 +f 269/579/35 264/570/37 267/559/37 +f 302/586/103 315/587/104 304/588/104 +f 300/589/26 301/590/30 299/591/26 +f 310/592/105 317/593/106 318/594/105 +f 302/586/30 303/595/21 301/590/30 +f 314/596/107 297/597/108 300/589/108 +f 304/588/21 305/598/37 303/595/21 +f 306/599/109 317/593/106 308/600/106 +f 306/599/37 307/601/20 305/598/37 +f 314/596/107 319/602/110 320/603/107 +f 308/600/20 309/604/31 307/601/20 +f 304/588/104 316/605/109 306/599/109 +f 310/592/31 311/606/22 309/604/31 +f 312/607/110 318/594/105 319/608/110 +f 300/589/108 298/609/103 302/586/103 +f 312/610/22 313/611/36 311/612/22 +f 314/596/36 299/591/26 313/611/36 +f 326/613/103 339/614/104 328/615/104 +f 324/616/26 325/617/30 323/618/26 +f 332/619/106 342/620/105 334/621/105 +f 325/617/30 328/615/21 327/622/21 +f 324/616/108 344/623/107 321/624/108 +f 328/615/21 329/625/37 327/622/21 +f 332/619/106 340/626/109 341/627/106 +f 330/628/37 331/629/20 329/625/37 +f 338/630/107 343/631/110 344/623/107 +f 332/619/20 333/632/31 331/629/20 +f 328/615/104 340/626/109 330/628/109 +f 334/621/31 335/633/22 333/632/31 +f 336/634/110 342/620/105 343/635/110 +f 324/616/108 322/636/103 326/613/103 +f 336/637/22 337/638/36 335/639/22 +f 338/630/36 323/618/26 337/638/36 +f 350/640/103 363/641/104 352/642/104 +f 348/643/26 349/644/30 347/645/26 +f 356/646/106 366/647/105 358/648/105 +f 350/640/30 351/649/21 349/644/30 +f 362/650/107 345/651/108 348/643/108 +f 352/642/21 353/652/37 351/649/21 +f 356/646/106 364/653/109 365/654/106 +f 354/655/37 355/656/20 353/652/37 +f 362/650/107 367/657/110 368/658/107 +f 356/646/20 357/659/31 355/656/20 +f 352/642/104 364/653/109 354/655/109 +f 358/648/31 359/660/22 357/659/31 +f 360/661/110 366/647/105 367/662/110 +f 348/643/108 346/663/103 350/640/103 +f 359/664/22 362/650/36 361/665/36 +f 361/665/36 348/643/26 347/645/26 +f 376/666/36 389/667/26 390/668/26 +f 377/669/22 376/666/36 378/670/22 +f 389/667/108 391/671/103 387/672/103 +f 377/673/110 371/674/105 370/675/110 +f 379/676/31 378/677/22 380/678/31 +f 385/679/104 373/680/109 383/681/109 +f 382/682/20 379/676/31 380/678/31 +f 377/669/110 369/683/107 375/684/107 +f 383/681/37 382/682/20 384/685/37 +f 381/686/106 373/680/109 372/687/106 +f 385/679/21 384/685/37 386/688/21 +f 375/684/107 392/689/108 389/667/108 +f 387/672/30 386/688/21 388/690/30 +f 381/686/106 371/674/105 379/676/105 +f 389/667/26 388/690/30 390/668/26 +f 387/672/103 374/691/104 385/679/104 +f 398/692/103 411/693/104 400/694/104 +f 396/695/26 397/696/30 395/697/26 +f 424/698/36 437/699/26 438/700/26 +f 404/701/106 414/702/105 406/703/105 +f 398/692/30 399/704/21 397/696/30 +f 425/705/22 424/698/36 426/706/22 +f 410/707/107 393/708/108 396/695/108 +f 400/694/21 401/709/37 399/704/21 +f 437/699/108 439/710/103 435/711/103 +f 404/701/106 412/712/109 413/713/106 +f 401/709/37 404/701/20 403/714/20 +f 425/715/110 419/716/105 418/717/110 +f 408/718/110 416/719/107 410/707/107 +f 404/701/20 405/720/31 403/714/20 +f 427/721/31 426/722/22 428/723/31 +f 400/694/104 412/712/109 402/724/109 +f 406/703/31 407/725/22 405/720/31 +f 408/726/110 414/702/105 415/727/110 +f 398/692/103 393/708/108 394/728/103 +f 408/718/22 409/729/36 407/730/22 +f 433/731/104 421/732/109 431/733/109 +f 430/734/20 427/721/31 428/723/31 +f 410/707/36 395/697/26 409/729/36 +f 425/705/110 417/735/107 423/736/107 +f 431/733/37 430/734/20 432/737/37 +f 429/738/106 421/732/109 420/739/106 +f 433/731/21 432/737/37 434/740/21 +f 437/699/108 417/735/107 440/741/108 +f 435/711/30 434/740/21 436/742/30 +f 429/738/106 419/716/105 427/721/105 +f 437/699/26 436/742/30 438/700/26 +f 435/711/103 422/743/104 433/731/104 +f 446/744/103 459/745/104 448/746/104 +f 444/747/26 445/748/30 443/749/26 +f 452/750/106 462/751/105 454/752/105 +f 446/744/30 447/753/21 445/748/30 +f 444/747/108 464/754/107 441/755/108 +f 448/746/21 449/756/37 447/753/21 +f 452/750/106 460/757/109 461/758/106 +f 450/759/37 451/760/20 449/756/37 +f 456/761/110 464/754/107 458/762/107 +f 452/750/20 453/763/31 451/760/20 +f 448/746/104 460/757/109 450/759/109 +f 454/752/31 455/764/22 453/763/31 +f 456/765/110 462/751/105 463/766/110 +f 444/747/108 442/767/103 446/744/103 +f 456/761/22 457/768/36 455/769/22 +f 458/762/36 443/749/26 457/768/36 +f 471/770/36 486/771/26 472/772/36 +f 473/773/22 472/772/36 474/774/22 +f 483/775/103 488/776/108 487/777/103 +f 473/778/110 467/779/105 466/780/110 +f 475/781/31 474/782/22 476/783/31 +f 481/784/104 469/785/109 479/786/109 +f 477/787/20 476/783/31 478/788/20 +f 471/770/107 466/789/110 465/790/107 +f 479/786/37 478/788/20 480/791/37 +f 477/787/106 469/785/109 468/792/106 +f 481/784/21 480/791/37 482/793/21 +f 471/770/107 488/776/108 485/794/108 +f 483/775/30 482/793/21 484/795/30 +f 477/787/106 467/779/105 475/781/105 +f 485/794/26 484/795/30 486/771/26 +f 483/775/103 470/796/104 481/784/104 +f 495/797/36 510/798/26 496/799/36 +f 497/800/22 496/799/36 498/801/22 +f 509/802/108 511/803/103 507/804/103 +f 497/805/110 491/806/105 490/807/110 +f 499/808/31 498/809/22 500/810/31 +f 505/811/104 493/812/109 503/813/109 +f 501/814/20 500/810/31 502/815/20 +f 497/800/110 489/816/107 495/797/107 +f 503/813/37 502/815/20 504/817/37 +f 501/814/106 493/812/109 492/818/106 +f 505/811/21 504/817/37 506/819/21 +f 509/802/108 489/816/107 512/820/108 +f 507/804/30 506/819/21 508/821/30 +f 501/814/106 491/806/105 499/808/105 +f 509/802/26 508/821/30 510/798/26 +f 505/811/104 511/803/103 494/822/104 +f 536/274/23 537/823/111 535/824/23 +f 533/277/24 539/271/112 534/394/24 +f 544/272/113 545/280/114 541/825/113 +f 540/273/111 541/825/113 537/823/111 +f 538/276/112 543/283/115 539/271/112 +f 542/279/115 547/396/116 543/283/115 +f 78/397/29 79/403/30 63/398/30 +f 71/400/31 72/405/32 56/401/32 +f 79/403/30 80/410/33 64/404/33 +f 72/405/32 73/456/20 57/406/20 +f 65/407/26 66/414/34 50/408/34 +f 80/410/33 65/407/26 49/409/26 +f 73/411/20 74/416/35 58/412/35 +f 66/414/34 67/418/36 51/415/36 +f 74/416/35 75/420/37 59/417/37 +f 67/418/36 68/422/38 52/419/38 +f 75/420/37 76/424/39 60/421/39 +f 68/422/38 69/426/22 53/423/22 +f 76/424/39 77/428/21 61/425/21 +f 69/426/22 70/429/40 54/427/40 +f 77/428/21 78/397/29 62/399/29 +f 70/429/40 71/400/31 55/402/31 +f 63/398/41 95/826/41 94/430/42 +f 56/401/43 88/827/43 87/431/44 +f 64/404/45 96/828/45 95/432/41 +f 57/406/46 89/829/46 88/433/43 +f 49/409/47 50/408/48 82/434/48 +f 64/404/45 49/409/47 81/436/47 +f 58/412/49 90/830/49 89/438/46 +f 51/415/50 83/831/50 82/439/48 +f 59/417/51 91/832/51 90/440/49 +f 52/419/52 84/833/52 83/441/50 +f 59/417/51 60/421/53 92/442/53 +f 53/423/54 85/834/54 84/444/52 +f 61/425/55 93/835/55 92/445/53 +f 54/427/56 86/836/56 85/446/54 +f 62/399/42 94/837/42 93/447/55 +f 55/402/44 87/838/44 86/448/56 +f 78/397/57 77/428/58 181/449/58 +f 107/123/59 109/116/22 110/118/22 +f 115/305/36 114/307/36 107/123/59 +f 114/307/36 115/305/36 116/124/26 +f 113/142/26 116/124/26 124/128/30 +f 120/140/30 124/128/30 123/130/21 +f 119/138/21 123/130/21 122/132/37 +f 121/133/35 117/135/35 118/137/37 +f 139/152/59 141/145/22 142/147/22 +f 147/310/36 146/312/36 139/152/59 +f 146/312/36 147/310/36 148/153/26 +f 145/171/26 148/153/26 156/157/30 +f 152/169/30 156/157/30 155/159/21 +f 151/167/21 155/159/21 154/161/37 +f 153/162/35 149/164/35 150/166/37 +f 70/429/61 174/465/61 175/451/62 +f 78/397/57 182/450/57 183/452/63 +f 72/405/64 71/400/62 175/451/62 +f 79/403/63 183/452/63 184/454/65 +f 72/405/64 176/453/64 177/455/66 +f 65/407/67 169/458/67 170/457/68 +f 80/410/65 184/454/65 169/458/67 +f 73/411/66 177/839/66 178/459/69 +f 66/414/68 170/457/68 171/460/70 +f 75/420/71 74/416/69 178/459/69 +f 68/422/72 67/418/70 171/460/70 +f 75/420/71 179/461/71 180/463/73 +f 69/426/74 68/422/72 172/462/72 +f 76/424/73 180/463/73 181/449/58 +f 69/426/74 173/464/74 174/465/61 +f 194/466/75 206/482/75 207/467/76 +f 195/469/31 192/480/31 194/466/20 +f 188/474/80 203/840/80 204/475/81 +f 190/476/81 204/475/81 205/479/83 +f 193/470/20 194/466/20 196/468/37 +f 194/466/75 192/480/83 205/479/83 +f 200/483/33 187/471/30 201/484/30 +f 186/485/86 201/484/87 202/487/87 +f 196/468/76 207/467/76 208/491/89 +f 191/478/37 196/468/37 198/492/21 +f 189/473/21 198/492/21 201/484/30 +f 198/492/89 208/491/89 202/487/87 +f 188/493/80 186/485/86 185/488/86 +f 197/490/40 190/476/40 192/480/31 +f 218/496/81 230/511/81 231/497/83 +f 217/499/22 219/516/36 216/500/36 +f 214/504/86 212/841/87 227/505/87 +f 214/504/86 228/506/86 229/509/80 +f 217/499/22 218/496/22 220/498/31 +f 218/496/81 216/500/80 229/509/80 +f 224/512/39 211/501/37 225/513/37 +f 210/514/89 225/513/76 226/517/76 +f 220/498/83 231/497/83 232/521/75 +f 215/508/31 220/498/31 222/522/20 +f 213/503/20 222/522/20 225/513/37 +f 222/522/75 232/521/75 226/517/76 +f 212/523/87 210/514/89 209/518/89 +f 221/520/34 214/504/34 216/500/36 +f 244/526/80 242/530/86 254/527/86 +f 243/529/30 240/540/30 242/530/26 +f 236/535/76 251/842/76 252/536/89 +f 240/540/87 238/537/89 252/536/89 +f 241/531/26 242/530/26 244/526/36 +f 240/540/87 253/541/87 254/527/86 +f 248/543/32 235/532/31 249/544/31 +f 234/545/75 249/544/83 250/547/83 +f 246/551/81 244/526/80 255/528/80 +f 239/539/36 244/526/36 246/551/22 +f 237/534/22 246/551/22 249/544/31 +f 246/551/81 256/552/81 250/547/83 +f 234/545/75 233/548/75 251/553/76 +f 245/550/29 238/537/29 240/540/30 +f 266/556/89 278/572/89 279/557/87 +f 267/559/37 264/570/37 266/556/21 +f 262/564/75 260/843/83 275/565/83 +f 262/564/75 276/566/75 277/569/76 +f 265/560/21 266/556/21 268/558/30 +f 266/556/89 264/570/76 277/569/76 +f 259/561/36 273/582/36 258/573/38 +f 258/573/81 273/582/80 274/576/80 +f 268/558/87 279/557/87 280/580/86 +f 263/568/30 268/558/30 270/581/26 +f 261/563/26 270/581/26 273/582/36 +f 270/581/86 280/580/86 274/576/80 +f 258/573/81 257/577/81 275/583/83 +f 269/579/35 262/564/35 264/570/37 +f 302/586/103 298/609/103 315/587/104 +f 300/589/26 302/586/30 301/590/30 +f 310/592/105 308/600/106 317/593/106 +f 302/586/30 304/588/21 303/595/21 +f 314/596/107 320/603/107 297/597/108 +f 304/588/21 306/599/37 305/598/37 +f 306/599/109 316/605/109 317/593/106 +f 306/599/37 308/600/20 307/601/20 +f 314/596/107 312/610/110 319/602/110 +f 308/600/20 310/592/31 309/604/31 +f 304/588/104 315/587/104 316/605/109 +f 310/592/31 312/607/22 311/606/22 +f 312/607/110 310/592/105 318/594/105 +f 300/589/108 297/597/108 298/609/103 +f 312/610/22 314/596/36 313/611/36 +f 314/596/36 300/589/26 299/591/26 +f 326/613/103 322/636/103 339/614/104 +f 324/616/26 326/613/30 325/617/30 +f 332/619/106 341/627/106 342/620/105 +f 325/617/30 326/613/30 328/615/21 +f 324/616/108 338/630/107 344/623/107 +f 328/615/21 330/628/37 329/625/37 +f 332/619/106 330/628/109 340/626/109 +f 330/628/37 332/619/20 331/629/20 +f 338/630/107 336/637/110 343/631/110 +f 332/619/20 334/621/31 333/632/31 +f 328/615/104 339/614/104 340/626/109 +f 334/621/31 336/634/22 335/633/22 +f 336/634/110 334/621/105 342/620/105 +f 324/616/108 321/624/108 322/636/103 +f 336/637/22 338/630/36 337/638/36 +f 338/630/36 324/616/26 323/618/26 +f 350/640/103 346/663/103 363/641/104 +f 348/643/26 350/640/30 349/644/30 +f 356/646/106 365/654/106 366/647/105 +f 350/640/30 352/642/21 351/649/21 +f 362/650/107 368/658/107 345/651/108 +f 352/642/21 354/655/37 353/652/37 +f 356/646/106 354/655/109 364/653/109 +f 354/655/37 356/646/20 355/656/20 +f 362/650/107 360/844/110 367/657/110 +f 356/646/20 358/648/31 357/659/31 +f 352/642/104 363/641/104 364/653/109 +f 358/648/31 360/661/22 359/660/22 +f 360/661/110 358/648/105 366/647/105 +f 348/643/108 345/651/108 346/663/103 +f 359/664/22 360/844/22 362/650/36 +f 361/665/36 362/650/36 348/643/26 +f 376/666/36 375/684/36 389/667/26 +f 377/669/22 375/684/36 376/666/36 +f 389/667/108 392/689/108 391/671/103 +f 377/673/110 379/676/105 371/674/105 +f 379/676/31 377/673/22 378/677/22 +f 385/679/104 374/691/104 373/680/109 +f 382/682/20 381/686/20 379/676/31 +f 377/669/110 370/845/110 369/683/107 +f 383/681/37 381/686/20 382/682/20 +f 381/686/106 383/681/109 373/680/109 +f 385/679/21 383/681/37 384/685/37 +f 375/684/107 369/683/107 392/689/108 +f 387/672/30 385/679/21 386/688/21 +f 381/686/106 372/687/106 371/674/105 +f 389/667/26 387/672/30 388/690/30 +f 387/672/103 391/671/103 374/691/104 +f 398/692/103 394/728/103 411/693/104 +f 396/695/26 398/692/30 397/696/30 +f 424/698/36 423/736/36 437/699/26 +f 404/701/106 413/713/106 414/702/105 +f 398/692/30 400/694/21 399/704/21 +f 425/705/22 423/736/36 424/698/36 +f 410/707/107 416/719/107 393/708/108 +f 400/694/21 402/724/37 401/709/37 +f 437/699/108 440/741/108 439/710/103 +f 404/701/106 402/724/109 412/712/109 +f 401/709/37 402/724/37 404/701/20 +f 425/715/110 427/721/105 419/716/105 +f 408/718/110 415/846/110 416/719/107 +f 404/701/20 406/703/31 405/720/31 +f 427/721/31 425/715/22 426/722/22 +f 400/694/104 411/693/104 412/712/109 +f 406/703/31 408/726/22 407/725/22 +f 408/726/110 406/703/105 414/702/105 +f 398/692/103 396/695/108 393/708/108 +f 408/718/22 410/707/36 409/729/36 +f 433/731/104 422/743/104 421/732/109 +f 430/734/20 429/738/20 427/721/31 +f 410/707/36 396/695/26 395/697/26 +f 425/705/110 418/847/110 417/735/107 +f 431/733/37 429/738/20 430/734/20 +f 429/738/106 431/733/109 421/732/109 +f 433/731/21 431/733/37 432/737/37 +f 437/699/108 423/736/107 417/735/107 +f 435/711/30 433/731/21 434/740/21 +f 429/738/106 420/739/106 419/716/105 +f 437/699/26 435/711/30 436/742/30 +f 435/711/103 439/710/103 422/743/104 +f 446/744/103 442/767/103 459/745/104 +f 444/747/26 446/744/30 445/748/30 +f 452/750/106 461/758/106 462/751/105 +f 446/744/30 448/746/21 447/753/21 +f 444/747/108 458/762/107 464/754/107 +f 448/746/21 450/759/37 449/756/37 +f 452/750/106 450/759/109 460/757/109 +f 450/759/37 452/750/20 451/760/20 +f 456/761/110 463/848/110 464/754/107 +f 452/750/20 454/752/31 453/763/31 +f 448/746/104 459/745/104 460/757/109 +f 454/752/31 456/765/22 455/764/22 +f 456/765/110 454/752/105 462/751/105 +f 444/747/108 441/755/108 442/767/103 +f 456/761/22 458/762/36 457/768/36 +f 458/762/36 444/747/26 443/749/26 +f 471/770/36 485/794/26 486/771/26 +f 473/773/22 471/770/36 472/772/36 +f 483/775/103 485/794/108 488/776/108 +f 473/778/110 475/781/105 467/779/105 +f 475/781/31 473/778/22 474/782/22 +f 481/784/104 470/796/104 469/785/109 +f 477/787/20 475/781/31 476/783/31 +f 471/770/107 473/773/110 466/789/110 +f 479/786/37 477/787/20 478/788/20 +f 477/787/106 479/786/109 469/785/109 +f 481/784/21 479/786/37 480/791/37 +f 471/770/107 465/790/107 488/776/108 +f 483/775/30 481/784/21 482/793/21 +f 477/787/106 468/792/106 467/779/105 +f 485/794/26 483/775/30 484/795/30 +f 483/775/103 487/777/103 470/796/104 +f 495/797/36 509/802/26 510/798/26 +f 497/800/22 495/797/36 496/799/36 +f 509/802/108 512/820/108 511/803/103 +f 497/805/110 499/808/105 491/806/105 +f 499/808/31 497/805/22 498/809/22 +f 505/811/104 494/822/104 493/812/109 +f 501/814/20 499/808/31 500/810/31 +f 497/800/110 490/849/110 489/816/107 +f 503/813/37 501/814/20 502/815/20 +f 501/814/106 503/813/109 493/812/109 +f 505/811/21 503/813/37 504/817/37 +f 509/802/108 495/797/107 489/816/107 +f 507/804/30 505/811/21 506/819/21 +f 501/814/106 492/818/106 491/806/105 +f 509/802/26 507/804/30 508/821/30 +f 505/811/104 507/804/103 511/803/103 +f 536/274/23 540/273/111 537/823/111 +f 533/277/24 538/276/112 539/271/112 +f 544/272/113 548/284/114 545/280/114 +f 540/273/111 544/272/113 541/825/113 +f 538/276/112 542/279/115 543/283/115 +f 542/279/115 546/286/116 547/396/116 diff --git a/src/main/resources/assets/hbm/textures/models/weapons/boltgun.png b/src/main/resources/assets/hbm/textures/models/weapons/boltgun.png new file mode 100644 index 0000000000000000000000000000000000000000..e3fd48d0cb81a826b355a2ba2e410e9b2a841b9b GIT binary patch literal 1069 zcmV+|1k(G7P)zi!(w5XQeN@&I{+Oh(6SSu^_uI(VpOqey|ifKIPa1fH{G z$X;mnnxSaMB2(U=c>{K^6ibvv>JQJNtos3hC5k%I_UGgAC@BO*6ayGv9Tx6`ZJz)V zZZbHZ#_oWkv_XZcOoEHCJ1`cRfqCR=*@}TBg&h{zTjTUYza)zUW|24e%0RLGYvAW9 zCRAqj#%34x>t1%u28N$IobbC>Gm6D*J?bOxJ*ZvggP#GuY2Oa3 zP=hdAq4tGu_F`>aKTw?^*!EN5_9U3CP*+^{peqI*J>OzikE%m|7$zrFX08S0MLg^} z7OZ^%kE-~YoKQm%Q;gc8*+JO$n-(ErUI?fN_4f9*_6Byl-O5xSB&iKW2zaS2_)0IQi?}wG3ug4-nb7cR0)Xo$#ldy z^h>t)nu4r&G>C9jr~(u#J}^^Br*~wzpY1;_`B0YSf-IK-cr7;W^W$0d_`zmFd5*@Y z0uXS%A{`0!s4kM^xZ0Sjug8w%+ed2DPwCXD?nv7|1u9e*X+sjb?Zwzc1fj{r+)$yq zuxIcEE{|$iKpNj2N^SF{P5bE&`99jHP+d?%ZmB6Gut`(mh%fV-5-L;|ePYxy`{{qs zF3lAcstb)#qd|r0B0!AFEn-x!m4VpyrQ4H0^QbO}=;&Wtnmn@78TF_xG)9dE6{?E> zF)Hh9v z<)%V)p?TD3P@%dw(-_sp{x!z<%Tl4bIMcO$dp|~D+DuNUuIHVGcou4cJHL(eU;g^t zQ}NCKBTkiD@^J%HF@Qvv`<q>vJug4w7 z7#?+W+ImtKK2JK3i}It-_0j0##Hbv!MZbON_9W1u-$ExpJt^+X7xJvL73z{enW>I; nO9GiT>8TFPM)==|B;(ZoSlezN+Hdx+00000NkvXXu0mjfp6mfy literal 0 HcmV?d00001 From 8574e86fdc5e2244ef80c5c8552fe72735ba49dc Mon Sep 17 00:00:00 2001 From: Boblet Date: Mon, 17 Apr 2023 07:56:56 +0200 Subject: [PATCH 2/9] uraninite changes uranium into uraninite if GT6 is installed, should hopefully fix some isotope oddities --- .../java/com/hbm/crafting/MineralRecipes.java | 32 +++++++++---------- .../com/hbm/inventory/OreDictManager.java | 3 +- .../inventory/recipes/CyclotronRecipes.java | 9 +++--- .../hbm/inventory/recipes/SILEXRecipes.java | 9 +++--- ...eEntityMachineSchrabidiumTransmutator.java | 5 +-- 5 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/hbm/crafting/MineralRecipes.java b/src/main/java/com/hbm/crafting/MineralRecipes.java index c35dedfb1..0f440dbe3 100644 --- a/src/main/java/com/hbm/crafting/MineralRecipes.java +++ b/src/main/java/com/hbm/crafting/MineralRecipes.java @@ -181,12 +181,12 @@ public class MineralRecipes { GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_pu238be, 6), new Object[] { ModItems.billet_pu238, ModItems.billet_pu238, ModItems.billet_pu238, ModItems.billet_beryllium, ModItems.billet_beryllium, ModItems.billet_beryllium })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_ra226be, 6), new Object[] { ModItems.billet_ra226, ModItems.billet_ra226, ModItems.billet_ra226, ModItems.billet_beryllium, ModItems.billet_beryllium, ModItems.billet_beryllium })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_bismuth, 1), new Object[] { "nuggetZirconium", "nuggetZirconium", "nuggetZirconium", "nuggetUranium", "nuggetPlutonium241", ModItems.nugget_bismuth })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_pu241, 1), new Object[] { "nuggetZirconium", "nuggetZirconium", "nuggetZirconium", "nuggetUranium235", "nuggetPlutonium240", "nuggetPlutonium241" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_am_mix, 1), new Object[] { "nuggetZirconium", "nuggetZirconium", "nuggetZirconium", "nuggetPlutonium241", "nuggetPlutonium241", "nuggetAmericiumRG" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_bismuth, 6), new Object[] { ModItems.billet_zirconium, ModItems.billet_zirconium, ModItems.billet_zirconium, ModItems.billet_uranium, ModItems.billet_pu241, ModItems.billet_bismuth })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_pu241, 6), new Object[] { ModItems.billet_zirconium, ModItems.billet_zirconium, ModItems.billet_zirconium, ModItems.billet_u235, ModItems.billet_pu240, ModItems.billet_pu241 })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_am_mix, 6), new Object[] { ModItems.billet_zirconium, ModItems.billet_zirconium, ModItems.billet_zirconium, ModItems.billet_pu241, ModItems.billet_pu241, ModItems.billet_am_mix })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_bismuth, 1), new Object[] { ZR.nugget(), ZR.nugget(), ZR.nugget(), U.nugget(), PU241.nugget(), BI.nugget() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_pu241, 1), new Object[] { ZR.nugget(), ZR.nugget(), ZR.nugget(), U235.nugget(), PU240.nugget(), PU241.nugget() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_am_mix, 1), new Object[] { ZR.nugget(), ZR.nugget(), ZR.nugget(), PU241.nugget(), PU241.nugget(), AMRG.nugget() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_bismuth, 6), new Object[] { ZR.billet(), ZR.billet(), ZR.billet(), U.billet(), PU241.billet(), BI.billet() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_pu241, 6), new Object[] { ZR.billet(), ZR.billet(), ZR.billet(), U235.billet(), PU240.billet(), PU241.billet() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_zfb_am_mix, 6), new Object[] { ZR.billet(), ZR.billet(), ZR.billet(), PU241.billet(), PU241.billet(), AMRG.billet() })); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_uranium, 2), new Object[] { ModItems.billet_uranium_fuel, ModItems.billet_u238 }); @@ -224,16 +224,16 @@ public class MineralRecipes { GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_balefire_gold, 1), new Object[] { ModItems.billet_au198, ModItems.cell_antimatter, ModItems.pellet_charged }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_flashlead, 2), new Object[] { ModItems.billet_balefire_gold, ModItems.billet_pb209, ModItems.cell_antimatter }); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg), new Object[] { ModItems.billet_pu238, ModItems.billet_pu238, ModItems.billet_pu238, "plateIron" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_radium), new Object[] { ModItems.billet_ra226, ModItems.billet_ra226, ModItems.billet_ra226, "plateIron" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_weak), new Object[] { ModItems.billet_u238, ModItems.billet_u238, ModItems.billet_pu238, "plateIron" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_strontium), new Object[] { ModItems.billet_sr90, ModItems.billet_sr90, ModItems.billet_sr90, "plateIron" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_cobalt), new Object[] { ModItems.billet_co60, ModItems.billet_co60, ModItems.billet_co60, "plateIron" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_actinium), new Object[] { ModItems.billet_actinium, ModItems.billet_actinium, ModItems.billet_actinium, "plateIron" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_polonium), new Object[] { ModItems.billet_polonium, ModItems.billet_polonium, ModItems.billet_polonium, "plateIron" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_lead), new Object[] { ModItems.billet_pb209, ModItems.billet_pb209, ModItems.billet_pb209, "plateIron" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_gold), new Object[] { ModItems.billet_au198, ModItems.billet_au198, ModItems.billet_au198, "plateIron" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_americium), new Object[] { ModItems.billet_am241, ModItems.billet_am241, ModItems.billet_am241, "plateIron" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg), new Object[] { ModItems.billet_pu238, ModItems.billet_pu238, ModItems.billet_pu238, IRON.plate() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_radium), new Object[] { ModItems.billet_ra226, ModItems.billet_ra226, ModItems.billet_ra226, IRON.plate() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_weak), new Object[] { ModItems.billet_u238, ModItems.billet_u238, ModItems.billet_pu238, IRON.plate() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_strontium), new Object[] { ModItems.billet_sr90, ModItems.billet_sr90, ModItems.billet_sr90, IRON.plate() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_cobalt), new Object[] { ModItems.billet_co60, ModItems.billet_co60, ModItems.billet_co60, IRON.plate() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_actinium), new Object[] { ModItems.billet_actinium, ModItems.billet_actinium, ModItems.billet_actinium, IRON.plate() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_polonium), new Object[] { ModItems.billet_polonium, ModItems.billet_polonium, ModItems.billet_polonium, IRON.plate() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_lead), new Object[] { ModItems.billet_pb209, ModItems.billet_pb209, ModItems.billet_pb209, IRON.plate() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_gold), new Object[] { ModItems.billet_au198, ModItems.billet_au198, ModItems.billet_au198, IRON.plate() })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_americium), new Object[] { ModItems.billet_am241, ModItems.billet_am241, ModItems.billet_am241, IRON.plate() })); //There's no need for anvil recycling recipes if you simply set the container item GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_bismuth, 3), new Object[] { new ItemStack(ModItems.pellet_rtg_depleted, 1, DepletedRTGMaterial.BISMUTH.ordinal()) }); diff --git a/src/main/java/com/hbm/inventory/OreDictManager.java b/src/main/java/com/hbm/inventory/OreDictManager.java index b557dda26..ca1ef53d8 100644 --- a/src/main/java/com/hbm/inventory/OreDictManager.java +++ b/src/main/java/com/hbm/inventory/OreDictManager.java @@ -28,6 +28,7 @@ import com.hbm.items.ItemEnums.EnumCokeType; import com.hbm.items.ItemEnums.EnumTarType; import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre; import com.hbm.main.MainRegistry; +import com.hbm.util.Compat; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; @@ -110,7 +111,7 @@ public class OreDictManager { /* * RADIOACTIVE */ - public static final DictFrame U = new DictFrame("Uranium"); + public static final DictFrame U = new DictFrame(Compat.isModLoaded(Compat.MOD_GT6) ? "Uraninite" : "Uranium"); public static final DictFrame U233 = new DictFrame("Uranium233", "U233"); public static final DictFrame U235 = new DictFrame("Uranium235", "U235"); public static final DictFrame U238 = new DictFrame("Uranium238", "U238"); diff --git a/src/main/java/com/hbm/inventory/recipes/CyclotronRecipes.java b/src/main/java/com/hbm/inventory/recipes/CyclotronRecipes.java index d552e73d6..f5030c34f 100644 --- a/src/main/java/com/hbm/inventory/recipes/CyclotronRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/CyclotronRecipes.java @@ -10,6 +10,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.stream.JsonWriter; +import static com.hbm.inventory.OreDictManager.*; import com.hbm.inventory.RecipesCommon.AStack; import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.inventory.RecipesCommon.OreDictStack; @@ -41,8 +42,8 @@ public class CyclotronRecipes extends SerializableRecipe { makeRecipe(new ComparableStack(ModItems.part_lithium), new OreDictStack("dustPolonium"), new ItemStack(ModItems.powder_astatine), liA); makeRecipe(new ComparableStack(ModItems.part_lithium), new OreDictStack("dustLanthanium"), new ItemStack(ModItems.powder_cerium), liA); makeRecipe(new ComparableStack(ModItems.part_lithium), new OreDictStack("dustActinium"), new ItemStack(ModItems.powder_thorium), liA); - makeRecipe(new ComparableStack(ModItems.part_lithium), new OreDictStack("dustUranium"), new ItemStack(ModItems.powder_neptunium), liA); - makeRecipe(new ComparableStack(ModItems.part_lithium), new OreDictStack("dustNeptunium"), new ItemStack(ModItems.powder_plutonium), liA); + makeRecipe(new ComparableStack(ModItems.part_lithium), new OreDictStack(U.dust()), new ItemStack(ModItems.powder_neptunium), liA); + makeRecipe(new ComparableStack(ModItems.part_lithium), new OreDictStack(NP237.dust()), new ItemStack(ModItems.powder_plutonium), liA); makeRecipe(new ComparableStack(ModItems.part_lithium), new ComparableStack(ModItems.powder_reiium), new ItemStack(ModItems.powder_weidanium), liA); /// LITHIUM END /// @@ -68,7 +69,7 @@ public class CyclotronRecipes extends SerializableRecipe { makeRecipe(new ComparableStack(ModItems.part_carbon), new ComparableStack(ModItems.powder_caesium), new ItemStack(ModItems.powder_lanthanium), caA); makeRecipe(new ComparableStack(ModItems.part_carbon), new ComparableStack(ModItems.powder_neodymium), new ItemStack(ModItems.powder_gold), caA); makeRecipe(new ComparableStack(ModItems.part_carbon), new ComparableStack(ModItems.ingot_mercury), new ItemStack(ModItems.powder_polonium), caA); - makeRecipe(new ComparableStack(ModItems.part_carbon), new ComparableStack(ModItems.powder_lead), new ItemStack(ModItems.powder_ra226),caA); + makeRecipe(new ComparableStack(ModItems.part_carbon), new OreDictStack(PB.dust()), new ItemStack(ModItems.powder_ra226),caA); makeRecipe(new ComparableStack(ModItems.part_carbon), new ComparableStack(ModItems.powder_astatine), new ItemStack(ModItems.powder_actinium), caA); makeRecipe(new ComparableStack(ModItems.part_carbon), new ComparableStack(ModItems.powder_australium), new ItemStack(ModItems.powder_verticium), caA); /// CARBON END /// @@ -93,7 +94,7 @@ public class CyclotronRecipes extends SerializableRecipe { int plA = 100; makeRecipe(new ComparableStack(ModItems.part_plutonium), new OreDictStack("dustPhosphorus"), new ItemStack(ModItems.powder_tennessine), plA); - makeRecipe(new ComparableStack(ModItems.part_plutonium), new OreDictStack("dustPlutonium"), new ItemStack(ModItems.powder_tennessine), plA); + makeRecipe(new ComparableStack(ModItems.part_plutonium), new OreDictStack(PU.dust()), new ItemStack(ModItems.powder_tennessine), plA); makeRecipe(new ComparableStack(ModItems.part_plutonium), new ComparableStack(ModItems.powder_tennessine), new ItemStack(ModItems.powder_reiium), plA); makeRecipe(new ComparableStack(ModItems.part_plutonium), new ComparableStack(ModItems.pellet_charged), new ItemStack(ModItems.nugget_schrabidium), 1000); makeRecipe(new ComparableStack(ModItems.part_plutonium), new ComparableStack(ModItems.powder_unobtainium), new ItemStack(ModItems.powder_daffergon), plA); diff --git a/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java b/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java index 6cdaa21ba..adb944df5 100644 --- a/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import static com.hbm.inventory.OreDictManager.*; import com.hbm.blocks.ModBlocks; import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.inventory.fluid.Fluids; @@ -29,8 +30,8 @@ public class SILEXRecipes { public static void register() { itemTranslation.put(new ComparableStack(ModItems.fluid_icon, 1, Fluids.UF6.getID()), new ComparableStack(ModItems.ingot_uranium)); - dictTranslation.put("dustUranium", "ingotUranium"); - recipes.put("ingotUranium", new SILEXRecipe(900, 100, EnumWavelengths.UV) + dictTranslation.put(U.dust(), U.ingot()); + recipes.put(U.ingot(), new SILEXRecipe(900, 100, EnumWavelengths.UV) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 11)) ); @@ -46,8 +47,8 @@ public class SILEXRecipes { ); itemTranslation.put(new ComparableStack(ModItems.fluid_icon, 1, Fluids.PUF6.getID()), new ComparableStack(ModItems.ingot_plutonium)); - dictTranslation.put("dustPlutonium", "ingotPlutonium"); - recipes.put("ingotPlutonium", new SILEXRecipe(900, 100, 2) + dictTranslation.put(PU.dust(), PU.ingot()); + recipes.put(PU.ingot(), new SILEXRecipe(900, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 3)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 4)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 2)) diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSchrabidiumTransmutator.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSchrabidiumTransmutator.java index 8a0bfc0ac..d6e7d9e1a 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSchrabidiumTransmutator.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSchrabidiumTransmutator.java @@ -1,6 +1,7 @@ package com.hbm.tileentity.machine; import com.hbm.config.VersatileConfig; +import com.hbm.inventory.OreDictManager; import com.hbm.inventory.container.ContainerMachineSchrabidiumTransmutator; import com.hbm.inventory.gui.GUIMachineSchrabidiumTransmutator; import com.hbm.inventory.recipes.MachineRecipes; @@ -50,7 +51,7 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntityMachineB public boolean isItemValidForSlot(int i, ItemStack stack) { switch (i) { case 0: - if (MachineRecipes.mODE(stack, "ingotUranium")) + if (MachineRecipes.mODE(stack, OreDictManager.U.ingot())) return true; break; case 2: @@ -113,7 +114,7 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntityMachineB } public boolean canProcess() { - if (power >= 4990000 && slots[0] != null && MachineRecipes.mODE(slots[0], "ingotUranium") && slots[2] != null + if (power >= 4990000 && slots[0] != null && MachineRecipes.mODE(slots[0], OreDictManager.U.ingot()) && slots[2] != null && slots[2].getItem() == ModItems.redcoil_capacitor && ItemCapacitor.getDura(slots[2]) > 0 && (slots[1] == null || (slots[1] != null && slots[1].getItem() == VersatileConfig.getTransmutatorItem() From 971ba04d24a16aa240dfeb8a91433268ed9a0131 Mon Sep 17 00:00:00 2001 From: Boblet Date: Mon, 17 Apr 2023 14:45:54 +0200 Subject: [PATCH 3/9] funny toxic fluids --- .../com/hbm/entity/effect/EntityMist.java | 11 +- .../java/com/hbm/inventory/fluid/Fluids.java | 12 +- .../hbm/inventory/fluid/trait/FT_Toxin.java | 126 ++++++++++++++++++ src/main/java/com/hbm/util/ArmorRegistry.java | 9 -- 4 files changed, 146 insertions(+), 12 deletions(-) create mode 100644 src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java diff --git a/src/main/java/com/hbm/entity/effect/EntityMist.java b/src/main/java/com/hbm/entity/effect/EntityMist.java index 0662a2d48..65e76e3c4 100644 --- a/src/main/java/com/hbm/entity/effect/EntityMist.java +++ b/src/main/java/com/hbm/entity/effect/EntityMist.java @@ -15,6 +15,7 @@ public class EntityMist extends Entity { public EntityMist(World world) { super(world); + this.noClip = true; } @Override @@ -30,15 +31,21 @@ public class EntityMist extends Entity { public FluidType getType() { return Fluids.fromID(this.dataWatcher.getWatchableObjectInt(10)); } + @Override - protected void readEntityFromNBT(NBTTagCompound nbt) { + public void onEntityUpdate() { } + @Override + protected void readEntityFromNBT(NBTTagCompound nbt) { + this.setFluid(Fluids.fromID(nbt.getInteger("type"))); + } + @Override protected void writeEntityToNBT(NBTTagCompound nbt) { - + nbt.setInteger("type", this.getType().getID()); } public static SprayStyle getStyleFromType(FluidType type) { diff --git a/src/main/java/com/hbm/inventory/fluid/Fluids.java b/src/main/java/com/hbm/inventory/fluid/Fluids.java index 299120abe..d8666118d 100644 --- a/src/main/java/com/hbm/inventory/fluid/Fluids.java +++ b/src/main/java/com/hbm/inventory/fluid/Fluids.java @@ -6,10 +6,16 @@ import java.util.List; import com.hbm.inventory.fluid.trait.*; import com.hbm.inventory.fluid.trait.FluidTraitSimple.*; +import com.hbm.lib.ModDamageSource; import com.hbm.inventory.fluid.trait.FT_Combustible.FuelGrade; import com.hbm.inventory.fluid.trait.FT_Coolable.CoolingType; import com.hbm.inventory.fluid.trait.FT_Heatable.HeatingType; +import com.hbm.inventory.fluid.trait.FT_Toxin.*; import com.hbm.render.util.EnumSymbol; +import com.hbm.util.ArmorRegistry.HazardClass; + +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; public class Fluids { @@ -253,7 +259,6 @@ public class Fluids { MUSTARDGAS = new FluidType("MUSTARDGAS", 0xBAB572, 4, 1, 1, EnumSymbol.NONE).addContainers(new CD_Gastank(0xBAB572, 0x361414)).addTraits(GASEOUS); IONGEL = new FluidType(103, "IONGEL", 0xB8FFFF, 1, 0, 4, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS); - // ^ ^ ^ ^ ^ ^ ^ ^ //ADD NEW FLUIDS HERE //AND DON'T FORGET THE META DOWN HERE @@ -377,6 +382,11 @@ public class Fluids { metaOrder.add(PLASMA_XM); metaOrder.add(PLASMA_BF); + CHLORINE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 2F, 20, HazardClass.GAS_CHLORINE, false))); + PHOSGENE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 4F, 20, HazardClass.GAS_CHLORINE, false))); + MUSTARDGAS.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 4F, 10, HazardClass.GAS_CORROSIVE, false)) + .addEntry(new ToxinEffects(HazardClass.GAS_CORROSIVE, true).add(new PotionEffect(Potion.wither.id, 100, 1), new PotionEffect(Potion.confusion.id, 100, 0)))); + double eff_steam_boil = 1.0D; double eff_steam_heatex = 0.25D; diff --git a/src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java b/src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java new file mode 100644 index 000000000..40fd8bbd3 --- /dev/null +++ b/src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java @@ -0,0 +1,126 @@ +package com.hbm.inventory.fluid.trait; + +import java.util.ArrayList; +import java.util.List; + +import com.hbm.util.ArmorRegistry; +import com.hbm.util.ArmorUtil; +import com.hbm.util.I18nUtil; +import com.hbm.util.ArmorRegistry.HazardClass; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.util.StringUtils; + +public class FT_Toxin extends FluidTrait { + + public List entries = new ArrayList(); + + public FT_Toxin addEntry(ToxinEntry entry) { + entries.add(entry); + return this; + } + + @Override + public void addInfoHidden(List info) { + info.add(EnumChatFormatting.LIGHT_PURPLE + "[Toxin]"); + + for(ToxinEntry entry : entries) { + entry.addInfo(info); + } + } + + public static abstract class ToxinEntry { + + public HazardClass clazz; + public boolean fullBody = false; + + public ToxinEntry(HazardClass clazz, boolean fullBody) { + this.clazz = clazz; + this.fullBody = fullBody; + } + + public boolean isProtected(EntityLivingBase entity) { + + boolean hasMask = clazz == null; + boolean hasSuit = !fullBody; + + if(clazz != null && ArmorRegistry.hasAllProtection(entity, 3, clazz)) { + ArmorUtil.damageGasMaskFilter(entity, 1); + hasMask = true; + } + + if(fullBody && ArmorUtil.checkForHazmat(entity)) { + hasSuit = true; + } + + return hasMask && hasSuit; + } + + public abstract void poison(EntityLivingBase entity); + public abstract void addInfo(List info); + } + + public static class ToxinDirectDamage extends ToxinEntry { + + public DamageSource damage; + public float amount; + public int delay; + + public ToxinDirectDamage(DamageSource damage, float amount, int delay, HazardClass clazz, boolean fullBody) { + super(clazz, fullBody); + this.damage = damage; + this.amount = amount; + this.delay = delay; + } + + @Override + public void poison(EntityLivingBase entity) { + + if(isProtected(entity)) return; + + if(delay == 0 || entity.worldObj.getTotalWorldTime() % delay == 0) { + entity.attackEntityFrom(damage, amount); + } + } + + @Override + public void addInfo(List info) { + info.add(EnumChatFormatting.YELLOW + "- " + I18nUtil.resolveKey(clazz.lang) + (fullBody ? EnumChatFormatting.RED + " (requires hazmat suit)" : "") + ": " + EnumChatFormatting.YELLOW + String.format("%,.1f", amount * 20 / delay) + " DPS"); + } + } + + public static class ToxinEffects extends ToxinEntry { + + public List effects = new ArrayList(); + + public ToxinEffects(HazardClass clazz, boolean fullBody) { + super(clazz, fullBody); + } + + public ToxinEffects add(PotionEffect... effs) { + for(PotionEffect eff : effs)this.effects.add(eff); + return this; + } + + @Override + public void poison(EntityLivingBase entity) { + + for(PotionEffect eff : effects) { + entity.addPotionEffect(new PotionEffect(eff)); + } + } + + @Override + public void addInfo(List info) { + info.add(EnumChatFormatting.YELLOW + "- " + I18nUtil.resolveKey(clazz.lang) + (fullBody ? EnumChatFormatting.RED + " (requires hazmat suit)" + EnumChatFormatting.YELLOW : "") + ":"); + + for(PotionEffect eff : effects) { + info.add(EnumChatFormatting.YELLOW + " - " + I18nUtil.resolveKey(eff.getEffectName()) + (eff.getAmplifier() > 0 ? " " + StatCollector.translateToLocal("potion.potency." + eff.getAmplifier()).trim() : "") + " " + StringUtils.ticksToElapsedTime(eff.getDuration())); + } + } + } +} diff --git a/src/main/java/com/hbm/util/ArmorRegistry.java b/src/main/java/com/hbm/util/ArmorRegistry.java index 06e69f8a9..fc1a20601 100644 --- a/src/main/java/com/hbm/util/ArmorRegistry.java +++ b/src/main/java/com/hbm/util/ArmorRegistry.java @@ -117,13 +117,4 @@ public class ArmorRegistry { this.lang = lang; } } - - /*public static enum ArmorClass { - MASK_FILTERED, - MASK_OXY, - GOGGLES, - HAZMAT_HEAT, - HAZMAT_RADIATION, - HAZMAT_BIO; - }*/ } From 68d28a214e31b2d40ff2eadf76f76898c004623f Mon Sep 17 00:00:00 2001 From: Boblet Date: Tue, 18 Apr 2023 16:50:00 +0200 Subject: [PATCH 4/9] more gas funnies --- .../hbm/blocks/generic/BlockStalagmite.java | 5 + .../com/hbm/entity/effect/EntityMist.java | 135 ++++++++++++++++++ .../hbm/entity/projectile/EntityChemical.java | 9 ++ .../hbm/inventory/fluid/trait/FT_Poison.java | 1 + .../hbm/inventory/fluid/trait/FT_Toxin.java | 16 ++- 5 files changed, 160 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/hbm/blocks/generic/BlockStalagmite.java b/src/main/java/com/hbm/blocks/generic/BlockStalagmite.java index c92ec4f06..f8beed00c 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockStalagmite.java +++ b/src/main/java/com/hbm/blocks/generic/BlockStalagmite.java @@ -45,6 +45,11 @@ public class BlockStalagmite extends BlockEnumMulti { return null; } + + @Override + public int damageDropped(int meta) { + return 0; + } public static int getMetaFromResource(int meta) { return meta; diff --git a/src/main/java/com/hbm/entity/effect/EntityMist.java b/src/main/java/com/hbm/entity/effect/EntityMist.java index 65e76e3c4..61b9833c5 100644 --- a/src/main/java/com/hbm/entity/effect/EntityMist.java +++ b/src/main/java/com/hbm/entity/effect/EntityMist.java @@ -1,14 +1,35 @@ package com.hbm.entity.effect; +import java.util.List; + +import com.hbm.extprop.HbmLivingProps; +import com.hbm.handler.radiation.ChunkRadiationManager; import com.hbm.inventory.fluid.FluidType; import com.hbm.inventory.fluid.Fluids; +import com.hbm.inventory.fluid.trait.FT_Corrosive; +import com.hbm.inventory.fluid.trait.FT_Flammable; +import com.hbm.inventory.fluid.trait.FT_Poison; +import com.hbm.inventory.fluid.trait.FT_Toxin; +import com.hbm.inventory.fluid.trait.FT_VentRadiation; import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Gaseous; import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Gaseous_ART; import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Liquid; import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Viscous; +import com.hbm.lib.ModDamageSource; +import com.hbm.util.ArmorUtil; +import com.hbm.util.ContaminationUtil; +import com.hbm.util.EntityDamageUtil; +import com.hbm.util.ContaminationUtil.ContaminationType; +import com.hbm.util.ContaminationUtil.HazardType; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.DamageSource; import net.minecraft.world.World; public class EntityMist extends Entity { @@ -16,6 +37,7 @@ public class EntityMist extends Entity { public EntityMist(World world) { super(world); this.noClip = true; + this.setSize(10F, 3F); } @Override @@ -36,6 +58,113 @@ public class EntityMist extends Entity { @Override public void onEntityUpdate() { + if(!worldObj.isRemote) { + + if(this.ticksExisted > this.getMaxAge()) { + this.setDead(); + } + + FluidType type = this.getType(); + + if(type.hasTrait(FT_VentRadiation.class)) { + FT_VentRadiation trait = type.getTrait(FT_VentRadiation.class); + ChunkRadiationManager.proxy.incrementRad(worldObj, (int) Math.floor(posX), (int) Math.floor(posY), (int) Math.floor(posZ), trait.getRadPerMB() * 2); + } + + double intensity = 1D - (double) this.ticksExisted / (double) this.getMaxAge(); + + if(type.hasTrait(FT_Flammable.class) && this.isBurning()) { + worldObj.createExplosion(this, posX, posY + height / 2, posZ, (float) intensity * 15F, true); + this.setDead(); + return; + } + + List affected = worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox); + + for(Entity e : affected) { + this.affect(e, intensity); + } + } + } + + /* can't reuse EntityChemical here, while similar or identical in some places, the actual effects are often different */ + protected void affect(Entity e, double intensity) { + + FluidType type = this.getType(); + EntityLivingBase living = e instanceof EntityLivingBase ? (EntityLivingBase) e : null; + + if(type.temperature >= 100) { + EntityDamageUtil.attackEntityFromIgnoreIFrame(e, new DamageSource(ModDamageSource.s_boil), 5F + (type.temperature - 100) * 0.02F); + + if(type.temperature >= 500) { + e.setFire(10); //afterburn for 10 seconds + } + } + if(type.temperature < -20) { + if(living != null) { //only living things are affected + EntityDamageUtil.attackEntityFromIgnoreIFrame(e, new DamageSource(ModDamageSource.s_cryolator), 5F + (type.temperature + 20) * -0.05F); //5 damage at -20°C with one extra damage every -20°C + living.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 2)); + living.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 100, 4)); + } + } + + if(type.hasTrait(Fluids.DELICIOUS.getClass())) { + if(living != null && living.isEntityAlive()) { + living.heal(2F * (float) intensity); + } + } + + if(type.hasTrait(FT_Flammable.class)) { + if(living != null) { + HbmLivingProps.setOil(living, 200); //doused in oil for 10 seconds + } + } + + if(this.isExtinguishing(type)) { + e.extinguish(); + } + + if(type.hasTrait(FT_Corrosive.class)) { + FT_Corrosive trait = type.getTrait(FT_Corrosive.class); + EntityDamageUtil.attackEntityFromIgnoreIFrame(e, new DamageSource(ModDamageSource.s_acid), trait.getRating() / 20F); + + if(living != null) { + for(int i = 0; i < 4; i++) { + ArmorUtil.damageSuit(living, i, trait.getRating() / 5); + } + } + } + + if(type.hasTrait(FT_VentRadiation.class)) { + FT_VentRadiation trait = type.getTrait(FT_VentRadiation.class); + if(living != null) { + ContaminationUtil.contaminate(living, HazardType.RADIATION, ContaminationType.CREATIVE, trait.getRadPerMB() * 5); + } + } + + if(type.hasTrait(FT_Poison.class)) { + FT_Poison trait = type.getTrait(FT_Poison.class); + + if(living != null) { + living.addPotionEffect(new PotionEffect(trait.isWithering() ? Potion.wither.id : Potion.poison.id, (int) (5 * 20 * intensity))); + } + } + + if(type.hasTrait(FT_Toxin.class)) { + FT_Toxin trait = type.getTrait(FT_Toxin.class); + + if(living != null) { + trait.affect(living, intensity); + } + } + } + + protected boolean isExtinguishing(FluidType type) { + return this.getStyleFromType(type) == SprayStyle.MIST && this.getType().temperature < 50 && !type.hasTrait(FT_Flammable.class); + } + + public int getMaxAge() { + return getStyleFromType(this.getType()) == SprayStyle.GAS ? 600 : 150; } @Override @@ -47,6 +176,12 @@ public class EntityMist extends Entity { protected void writeEntityToNBT(NBTTagCompound nbt) { nbt.setInteger("type", this.getType().getID()); } + + @Override + @SideOnly(Side.CLIENT) + public boolean canRenderOnFire() { + return false; + } public static SprayStyle getStyleFromType(FluidType type) { diff --git a/src/main/java/com/hbm/entity/projectile/EntityChemical.java b/src/main/java/com/hbm/entity/projectile/EntityChemical.java index 14c770d19..003414be6 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityChemical.java +++ b/src/main/java/com/hbm/entity/projectile/EntityChemical.java @@ -12,6 +12,7 @@ import com.hbm.inventory.fluid.trait.FT_Combustible; import com.hbm.inventory.fluid.trait.FT_Corrosive; import com.hbm.inventory.fluid.trait.FT_Flammable; import com.hbm.inventory.fluid.trait.FT_Poison; +import com.hbm.inventory.fluid.trait.FT_Toxin; import com.hbm.inventory.fluid.trait.FT_VentRadiation; import com.hbm.lib.ModDamageSource; import com.hbm.main.MainRegistry; @@ -253,6 +254,14 @@ public class EntityChemical extends EntityThrowableNT { } } + if(type.hasTrait(FT_Toxin.class)) { + FT_Toxin trait = type.getTrait(FT_Toxin.class); + + if(living != null) { + trait.affect(living, intensity); + } + } + if(type == Fluids.XPJUICE) { if(e instanceof EntityPlayer) { diff --git a/src/main/java/com/hbm/inventory/fluid/trait/FT_Poison.java b/src/main/java/com/hbm/inventory/fluid/trait/FT_Poison.java index a8154c1f5..2c176bc3e 100644 --- a/src/main/java/com/hbm/inventory/fluid/trait/FT_Poison.java +++ b/src/main/java/com/hbm/inventory/fluid/trait/FT_Poison.java @@ -4,6 +4,7 @@ import java.util.List; import net.minecraft.util.EnumChatFormatting; +@Deprecated //use FT_Toxin instead public class FT_Poison extends FluidTrait { protected boolean withering = false; diff --git a/src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java b/src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java index 40fd8bbd3..6e7d17fd9 100644 --- a/src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java +++ b/src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java @@ -32,6 +32,10 @@ public class FT_Toxin extends FluidTrait { entry.addInfo(info); } } + + public void affect(EntityLivingBase entity, double intensity) { + + } public static abstract class ToxinEntry { @@ -60,7 +64,7 @@ public class FT_Toxin extends FluidTrait { return hasMask && hasSuit; } - public abstract void poison(EntityLivingBase entity); + public abstract void poison(EntityLivingBase entity, double intensity); public abstract void addInfo(List info); } @@ -78,12 +82,12 @@ public class FT_Toxin extends FluidTrait { } @Override - public void poison(EntityLivingBase entity) { + public void poison(EntityLivingBase entity, double intensity) { if(isProtected(entity)) return; if(delay == 0 || entity.worldObj.getTotalWorldTime() % delay == 0) { - entity.attackEntityFrom(damage, amount); + entity.attackEntityFrom(damage, (float) (amount * intensity)); } } @@ -102,15 +106,15 @@ public class FT_Toxin extends FluidTrait { } public ToxinEffects add(PotionEffect... effs) { - for(PotionEffect eff : effs)this.effects.add(eff); + for(PotionEffect eff : effs) this.effects.add(eff); return this; } @Override - public void poison(EntityLivingBase entity) { + public void poison(EntityLivingBase entity, double intensity) { for(PotionEffect eff : effects) { - entity.addPotionEffect(new PotionEffect(eff)); + entity.addPotionEffect(new PotionEffect(eff.getPotionID(), (int) (eff.getDuration() * intensity), eff.getAmplifier())); } } From b86801dd143a40a6d3ac5831630bf0b4df03f78c Mon Sep 17 00:00:00 2001 From: Boblet Date: Wed, 19 Apr 2023 11:07:47 +0200 Subject: [PATCH 5/9] access transformer, creeper fun --- build.gradle | 7 + .../java/com/hbm/entity/EntityMappings.java | 2 +- .../hbm/entity/mob/EntityCreeperNuclear.java | 133 +++++++ .../com/hbm/entity/mob/EntityCyberCrab.java | 2 +- .../hbm/entity/mob/EntityNuclearCreeper.java | 349 ------------------ .../hbm/entity/mob/EntityTaintedCreeper.java | 268 ++------------ .../mob/ai/EntityAINuclearCreeperSwell.java | 71 ---- .../mob/ai/EntityAITaintedCreeperSwell.java | 71 ---- .../hbm/entity/projectile/EntityBullet.java | 6 +- src/main/java/com/hbm/main/ClientProxy.java | 2 +- .../java/com/hbm/main/ModEventHandler.java | 4 +- .../entity/mob/RenderNuclearCreeper.java | 255 +++++-------- .../tileentity/machine/TileEntityTesla.java | 5 - .../java/com/hbm/util/ContaminationUtil.java | 4 +- src/main/resources/META-INF/HBM_at.cfg | 3 + .../hbm/textures/entity/creeper_base.png | Bin 0 -> 2964 bytes .../hbm/textures/entity/creeper_mustard.png | Bin 0 -> 3104 bytes .../hbm/textures/entity/creeper_phosgene.png | Bin 0 -> 3864 bytes 18 files changed, 296 insertions(+), 886 deletions(-) create mode 100644 src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java delete mode 100644 src/main/java/com/hbm/entity/mob/EntityNuclearCreeper.java delete mode 100644 src/main/java/com/hbm/entity/mob/ai/EntityAINuclearCreeperSwell.java delete mode 100644 src/main/java/com/hbm/entity/mob/ai/EntityAITaintedCreeperSwell.java create mode 100644 src/main/resources/META-INF/HBM_at.cfg create mode 100644 src/main/resources/assets/hbm/textures/entity/creeper_base.png create mode 100644 src/main/resources/assets/hbm/textures/entity/creeper_mustard.png create mode 100644 src/main/resources/assets/hbm/textures/entity/creeper_phosgene.png diff --git a/build.gradle b/build.gradle index bd386126f..2817f3c3c 100644 --- a/build.gradle +++ b/build.gradle @@ -102,6 +102,13 @@ processResources { } } +// add AT to meta-inf +jar { + manifest { + attributes 'FMLAT': 'HBM_at.cfg' + } +} + task version { doFirst { println project.version diff --git a/src/main/java/com/hbm/entity/EntityMappings.java b/src/main/java/com/hbm/entity/EntityMappings.java index fc9352d8e..468b4a9bc 100644 --- a/src/main/java/com/hbm/entity/EntityMappings.java +++ b/src/main/java/com/hbm/entity/EntityMappings.java @@ -204,7 +204,7 @@ public class EntityMappings { addEntity(EntitySawblade.class, "entity_stray_saw", 1000); addEntity(EntityChemical.class, "entity_chemthrower_splash", 1000); - addMob(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", 0x204131, 0x75CE00); + addMob(EntityCreeperNuclear.class, "entity_mob_nuclear_creeper", 0x204131, 0x75CE00); addMob(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", 0x813b9b, 0xd71fdd); addMob(EntityHunterChopper.class, "entity_mob_hunter_chopper", 0x000020, 0x2D2D72); addMob(EntityCyberCrab.class, "entity_cyber_crab", 0xAAAAAA, 0x444444); diff --git a/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java b/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java new file mode 100644 index 000000000..23e8719f5 --- /dev/null +++ b/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java @@ -0,0 +1,133 @@ +package com.hbm.entity.mob; + +import java.util.List; + +import com.hbm.entity.logic.EntityNukeExplosionMK5; +import com.hbm.explosion.ExplosionNukeGeneric; +import com.hbm.explosion.ExplosionNukeSmall; +import com.hbm.items.ModItems; +import com.hbm.items.ItemAmmoEnums.AmmoFatman; +import com.hbm.lib.ModDamageSource; +import com.hbm.main.MainRegistry; +import com.hbm.packet.AuxParticlePacketNT; +import com.hbm.packet.PacketDispatcher; +import com.hbm.util.ContaminationUtil; +import com.hbm.util.ContaminationUtil.ContaminationType; +import com.hbm.util.ContaminationUtil.HazardType; + +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntitySkeleton; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; + +public class EntityCreeperNuclear extends EntityCreeper { + + public EntityCreeperNuclear(World world) { + super(world); + this.fuseTime = 75; + } + + @Override + protected void applyEntityAttributes() { + super.applyEntityAttributes(); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(50.0D); + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.3D); + } + + @Override + public boolean attackEntityFrom(DamageSource source, float amount) { + + if(source == ModDamageSource.radiation || source == ModDamageSource.mudPoisoning) { + this.heal(amount); + return false; + } + + return super.attackEntityFrom(source, amount); + } + + @Override + protected Item getDropItem() { + return Item.getItemFromBlock(Blocks.tnt); + } + + @Override + protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { + + super.dropFewItems(p_70628_1_, p_70628_2_); + + if(rand.nextInt(3) == 0) + this.dropItem(ModItems.coin_creeper, 1); + } + + @Override + public void onDeath(DamageSource p_70645_1_) { + super.onDeath(p_70645_1_); + + List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, this.boundingBox.expand(50, 50, 50)); + + for(EntityPlayer player : players) { + player.triggerAchievement(MainRegistry.bossCreeper); + } + + if(p_70645_1_.getEntity() instanceof EntitySkeleton || (p_70645_1_.isProjectile() && p_70645_1_.getEntity() instanceof EntityArrow && ((EntityArrow) (p_70645_1_.getEntity())).shootingEntity == null)) { + this.entityDropItem(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.STOCK), 1); + } + } + + @Override + public void onUpdate() { + + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(5, 5, 5)); + + for(Entity e : list) { + if(e instanceof EntityLivingBase) { + ContaminationUtil.contaminate((EntityLivingBase) e, HazardType.RADIATION, ContaminationType.CREATIVE, 0.25F); + } + } + + super.onUpdate(); + + if(this.getHealth() < this.getMaxHealth() && this.ticksExisted % 10 == 0) { + this.heal(1.0F); + } + } + + @Override + public void func_146077_cc() { + if(!this.worldObj.isRemote) { + boolean flag = this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"); + + if(this.getPowered()) { + + NBTTagCompound data = new NBTTagCompound(); + data.setString("type", "muke"); + PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY + 0.5, posZ), new TargetPoint(dimension, posX, posY, posZ, 250)); + worldObj.playSoundEffect(posX, posY + 0.5, posZ, "hbm:weapon.mukeExplosion", 15.0F, 1.0F); + + if(flag) { + worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, 50, posX, posY, posZ).mute()); + } else { + ExplosionNukeGeneric.dealDamage(worldObj, posX, posY + 0.5, posZ, 100); + } + } else { + + if(flag) { + ExplosionNukeSmall.explode(worldObj, posX, posY + 0.5, posZ, ExplosionNukeSmall.PARAMS_MEDIUM); + } else { + ExplosionNukeSmall.explode(worldObj, posX, posY + 0.5, posZ, ExplosionNukeSmall.PARAMS_SAFE); + } + } + + this.setDead(); + } + } +} diff --git a/src/main/java/com/hbm/entity/mob/EntityCyberCrab.java b/src/main/java/com/hbm/entity/mob/EntityCyberCrab.java index 4d6da1f3e..7af12022a 100644 --- a/src/main/java/com/hbm/entity/mob/EntityCyberCrab.java +++ b/src/main/java/com/hbm/entity/mob/EntityCyberCrab.java @@ -27,7 +27,7 @@ public class EntityCyberCrab extends EntityMob implements IRangedAttackMob, IRad private static final IEntitySelector selector = new IEntitySelector() { public boolean isEntityApplicable(Entity p_82704_1_) { - return !(p_82704_1_ instanceof EntityCyberCrab || p_82704_1_ instanceof EntityCreeper || p_82704_1_ instanceof EntityNuclearCreeper); + return !(p_82704_1_ instanceof EntityCyberCrab || p_82704_1_ instanceof EntityCreeper); } }; diff --git a/src/main/java/com/hbm/entity/mob/EntityNuclearCreeper.java b/src/main/java/com/hbm/entity/mob/EntityNuclearCreeper.java deleted file mode 100644 index fa5f8b85b..000000000 --- a/src/main/java/com/hbm/entity/mob/EntityNuclearCreeper.java +++ /dev/null @@ -1,349 +0,0 @@ -package com.hbm.entity.mob; - -import java.util.List; - -import com.hbm.entity.logic.EntityNukeExplosionMK5; -import com.hbm.entity.mob.ai.EntityAINuclearCreeperSwell; -import com.hbm.explosion.ExplosionNukeGeneric; -import com.hbm.explosion.ExplosionNukeSmall; -import com.hbm.items.ModItems; -import com.hbm.items.ItemAmmoEnums.AmmoFatman; -import com.hbm.lib.ModDamageSource; -import com.hbm.main.MainRegistry; -import com.hbm.packet.AuxParticlePacketNT; -import com.hbm.packet.PacketDispatcher; -import com.hbm.util.ContaminationUtil; -import com.hbm.util.ContaminationUtil.ContaminationType; -import com.hbm.util.ContaminationUtil.HazardType; - -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.passive.EntityOcelot; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; - -public class EntityNuclearCreeper extends EntityMob { - - private int lastActiveTime; - private int timeSinceIgnited; - private int fuseTime = 75; - - public EntityNuclearCreeper(World p_i1733_1_) { - super(p_i1733_1_); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, new EntityAINuclearCreeperSwell(this)); - this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, false)); - this.tasks.addTask(4, new EntityAIWander(this, 0.8D)); - this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(6, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); - this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false)); - this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityOcelot.class, 0, true)); - } - - @Override - protected void applyEntityAttributes() { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(50.0D); - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.3D); - } - - @Override - public boolean attackEntityFrom(DamageSource source, float amount) { - - if(source == ModDamageSource.radiation || source == ModDamageSource.mudPoisoning) { - this.heal(amount); - return false; - } - - return super.attackEntityFrom(source, amount); - } - - @Override - public boolean isAIEnabled() { - return true; - } - - @Override - public int getMaxSafePointTries() { - return this.getAttackTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F); - } - - @Override - protected void fall(float p_70069_1_) { - super.fall(p_70069_1_); - this.timeSinceIgnited = (int) (this.timeSinceIgnited + p_70069_1_ * 1.5F); - - if(this.timeSinceIgnited > this.fuseTime - 5) { - this.timeSinceIgnited = this.fuseTime - 5; - } - } - - @Override - protected void entityInit() { - super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) -1)); - this.dataWatcher.addObject(17, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(18, Byte.valueOf((byte) 0)); - } - - @Override - public void writeEntityToNBT(NBTTagCompound p_70014_1_) { - super.writeEntityToNBT(p_70014_1_); - - if(this.dataWatcher.getWatchableObjectByte(17) == 1) { - p_70014_1_.setBoolean("powered", true); - } - - p_70014_1_.setShort("Fuse", (short) this.fuseTime); - p_70014_1_.setBoolean("ignited", this.func_146078_ca()); - } - - @Override - public void readEntityFromNBT(NBTTagCompound p_70037_1_) { - super.readEntityFromNBT(p_70037_1_); - this.dataWatcher.updateObject(17, Byte.valueOf((byte) (p_70037_1_.getBoolean("powered") ? 1 : 0))); - - if(p_70037_1_.hasKey("Fuse", 99)) { - this.fuseTime = p_70037_1_.getShort("Fuse"); - } - - if(p_70037_1_.getBoolean("ignited")) { - this.func_146079_cb(); - } - } - - @Override - public void onUpdate() { - if(this.isDead) { - this.isDead = false; - this.heal(10.0F); - } - - if(this.isEntityAlive()) { - this.lastActiveTime = this.timeSinceIgnited; - - if(this.func_146078_ca()) { - this.setCreeperState(1); - } - - int i = this.getCreeperState(); - - if(i > 0 && this.timeSinceIgnited == 0) { - this.playSound("creeper.primed", 1.0F * 30 / 75, 0.5F); - } - - this.timeSinceIgnited += i; - - if(this.timeSinceIgnited < 0) { - this.timeSinceIgnited = 0; - } - - if(this.timeSinceIgnited >= this.fuseTime) { - this.timeSinceIgnited = this.fuseTime; - this.func_146077_cc(); - } - } - - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, AxisAlignedBB.getBoundingBox(posX - 5, posY - 5, posZ - 5, posX + 5, posY + 5, posZ + 5)); - - for(Entity e : list) - if(e instanceof EntityLivingBase) { - ContaminationUtil.contaminate((EntityLivingBase) e, HazardType.RADIATION, ContaminationType.CREATIVE, 0.25F); - } - - super.onUpdate(); - - if(this.getHealth() < this.getMaxHealth() && this.ticksExisted % 10 == 0) { - this.heal(1.0F); - } - } - - @Override - protected String getHurtSound() { - return "mob.creeper.say"; - } - - @Override - protected String getDeathSound() { - return "mob.creeper.death"; - } - - @Override - public void onDeath(DamageSource p_70645_1_) { - super.onDeath(p_70645_1_); - - List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, this.boundingBox.expand(50, 50, 50)); - - for(EntityPlayer player : players) { - player.triggerAchievement(MainRegistry.bossCreeper); - } - - if(p_70645_1_.getEntity() instanceof EntitySkeleton || (p_70645_1_.isProjectile() && p_70645_1_.getEntity() instanceof EntityArrow && ((EntityArrow) (p_70645_1_.getEntity())).shootingEntity == null)) { - int i = rand.nextInt(11); - int j = rand.nextInt(3); - if(i == 0) - this.dropItem(ModItems.nugget_u235, j); - if(i == 1) - this.dropItem(ModItems.nugget_pu238, j); - if(i == 2) - this.dropItem(ModItems.nugget_pu239, j); - if(i == 3) - this.dropItem(ModItems.nugget_neptunium, j); - if(i == 4) - this.dropItem(ModItems.man_core, 1); - if(i == 5) { - this.dropItem(ModItems.sulfur, j * 2); - this.dropItem(ModItems.niter, j * 2); - } - if(i == 6) - this.dropItem(ModItems.syringe_awesome, 1); - if(i == 7) - this.dropItem(ModItems.fusion_core, 1); - if(i == 8) - this.dropItem(ModItems.syringe_metal_stimpak, 1); - if(i == 9) { - switch(rand.nextInt(4)) { - case 0: - this.dropItem(ModItems.t45_helmet, 1); - break; - case 1: - this.dropItem(ModItems.t45_plate, 1); - break; - case 2: - this.dropItem(ModItems.t45_legs, 1); - break; - case 3: - this.dropItem(ModItems.t45_boots, 1); - break; - } - this.dropItem(ModItems.fusion_core, 1); - } - if(i == 10) - this.entityDropItem(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH), 1); - } - } - - @Override - public boolean attackEntityAsMob(Entity p_70652_1_) { - return true; - } - - public boolean getPowered() { - return this.dataWatcher.getWatchableObjectByte(17) == 1; - } - - @SideOnly(Side.CLIENT) - public float getCreeperFlashIntensity(float p_70831_1_) { - return (this.lastActiveTime + (this.timeSinceIgnited - this.lastActiveTime) * p_70831_1_) / (this.fuseTime - 2); - } - - @Override - protected Item getDropItem() { - return Item.getItemFromBlock(Blocks.tnt); - } - - @Override - protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { - - super.dropFewItems(p_70628_1_, p_70628_2_); - - if(rand.nextInt(3) == 0) - this.dropItem(ModItems.coin_creeper, 1); - } - - public int getCreeperState() { - return this.dataWatcher.getWatchableObjectByte(16); - } - - public void setCreeperState(int p_70829_1_) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) p_70829_1_)); - } - - @Override - public void onStruckByLightning(EntityLightningBolt p_70077_1_) { - super.onStruckByLightning(p_70077_1_); - this.dataWatcher.updateObject(17, Byte.valueOf((byte) 1)); - } - - @Override - protected boolean interact(EntityPlayer p_70085_1_) { - ItemStack itemstack = p_70085_1_.inventory.getCurrentItem(); - - if(itemstack != null && itemstack.getItem() == Items.flint_and_steel) { - this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.ignite", 1.0F, this.rand.nextFloat() * 0.4F + 0.8F); - p_70085_1_.swingItem(); - - if(!this.worldObj.isRemote) { - this.func_146079_cb(); - itemstack.damageItem(1, p_70085_1_); - return true; - } - } - - return super.interact(p_70085_1_); - } - - private void func_146077_cc() { - if(!this.worldObj.isRemote) { - boolean flag = this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"); - - if(this.getPowered()) { - - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "muke"); - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY + 0.5, posZ), new TargetPoint(dimension, posX, posY, posZ, 250)); - worldObj.playSoundEffect(posX, posY + 0.5, posZ, "hbm:weapon.mukeExplosion", 15.0F, 1.0F); - - if(flag) { - worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, 50, posX, posY, posZ).mute()); - } else { - ExplosionNukeGeneric.dealDamage(worldObj, posX, posY + 0.5, posZ, 100); - } - } else { - - if(flag) { - ExplosionNukeSmall.explode(worldObj, posX, posY + 0.5, posZ, ExplosionNukeSmall.PARAMS_MEDIUM); - } else { - ExplosionNukeSmall.explode(worldObj, posX, posY + 0.5, posZ, ExplosionNukeSmall.PARAMS_SAFE); - } - } - - this.setDead(); - } - } - - public boolean func_146078_ca() { - return this.dataWatcher.getWatchableObjectByte(18) != 0; - } - - public void func_146079_cb() { - this.dataWatcher.updateObject(18, Byte.valueOf((byte) 1)); - } - - public void setPowered(int power) { - this.dataWatcher.updateObject(17, power); - } -} diff --git a/src/main/java/com/hbm/entity/mob/EntityTaintedCreeper.java b/src/main/java/com/hbm/entity/mob/EntityTaintedCreeper.java index 12db53858..0190e025d 100644 --- a/src/main/java/com/hbm/entity/mob/EntityTaintedCreeper.java +++ b/src/main/java/com/hbm/entity/mob/EntityTaintedCreeper.java @@ -2,51 +2,19 @@ package com.hbm.entity.mob; import com.hbm.blocks.ModBlocks; import com.hbm.config.GeneralConfig; -import com.hbm.entity.mob.ai.EntityAITaintedCreeperSwell; import api.hbm.entity.IRadiationImmune; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; -import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.passive.EntityOcelot; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; import net.minecraft.world.World; -public class EntityTaintedCreeper extends EntityMob implements IRadiationImmune { +public class EntityTaintedCreeper extends EntityCreeper implements IRadiationImmune { - private int lastActiveTime; - private int timeSinceIgnited; - private int fuseTime = 30; - private int explosionRadius = 20; - - public EntityTaintedCreeper(World p_i1733_1_) { - super(p_i1733_1_); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, new EntityAITaintedCreeperSwell(this)); - this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, false)); - this.tasks.addTask(4, new EntityAIWander(this, 0.8D)); - this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(6, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); - this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false)); - this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityOcelot.class, 0, true)); + public EntityTaintedCreeper(World world) { + super(world); } @Override @@ -56,203 +24,61 @@ public class EntityTaintedCreeper extends EntityMob implements IRadiationImmune this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.35D); } - @Override - public boolean isAIEnabled() { - return true; - } - - @Override - public int getMaxSafePointTries() { - return this.getAttackTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F); - } - - @Override - protected void fall(float p_70069_1_) { - super.fall(p_70069_1_); - this.timeSinceIgnited = (int) (this.timeSinceIgnited + p_70069_1_ * 1.5F); - - if(this.timeSinceIgnited > this.fuseTime - 5) { - this.timeSinceIgnited = this.fuseTime - 5; - } - } - - @Override - protected void entityInit() { - super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) -1)); - this.dataWatcher.addObject(17, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(18, Byte.valueOf((byte) 0)); - } - - @Override - public void writeEntityToNBT(NBTTagCompound p_70014_1_) { - super.writeEntityToNBT(p_70014_1_); - - if(this.dataWatcher.getWatchableObjectByte(17) == 1) { - p_70014_1_.setBoolean("powered", true); - } - - p_70014_1_.setShort("Fuse", (short) this.fuseTime); - p_70014_1_.setByte("ExplosionRadius", (byte) this.explosionRadius); - p_70014_1_.setBoolean("ignited", this.func_146078_ca()); - } - - @Override - public void readEntityFromNBT(NBTTagCompound p_70037_1_) { - super.readEntityFromNBT(p_70037_1_); - this.dataWatcher.updateObject(17, Byte.valueOf((byte) (p_70037_1_.getBoolean("powered") ? 1 : 0))); - - if(p_70037_1_.hasKey("Fuse", 99)) { - this.fuseTime = p_70037_1_.getShort("Fuse"); - } - - if(p_70037_1_.hasKey("ExplosionRadius", 99)) { - this.explosionRadius = p_70037_1_.getByte("ExplosionRadius"); - } - - if(p_70037_1_.getBoolean("ignited")) { - this.func_146079_cb(); - } - } - @Override public void onUpdate() { - if(this.isEntityAlive()) { - this.lastActiveTime = this.timeSinceIgnited; - - if(this.func_146078_ca()) { - this.setCreeperState(1); - } - - int i = this.getCreeperState(); - - if(i > 0 && this.timeSinceIgnited == 0) { - this.playSound("creeper.primed", 1.0F * 30 / 75, 0.5F); - } - - this.timeSinceIgnited += i; - - if(this.timeSinceIgnited < 0) { - this.timeSinceIgnited = 0; - } - - if(this.timeSinceIgnited >= this.fuseTime) { - this.timeSinceIgnited = this.fuseTime; - this.func_146077_cc(); - } - } - super.onUpdate(); + + if(this.isEntityAlive()) { - if(this.getHealth() < this.getMaxHealth() && this.ticksExisted % 10 == 0) { - this.heal(1.0F); + if(this.getHealth() < this.getMaxHealth() && this.ticksExisted % 10 == 0) { + this.heal(1.0F); + } } } - @Override - protected String getHurtSound() { - return "mob.creeper.say"; - } - - @Override - protected String getDeathSound() { - return "mob.creeper.death"; - } - - @Override - public void onDeath(DamageSource p_70645_1_) { - super.onDeath(p_70645_1_); - } - - @Override - public boolean attackEntityAsMob(Entity p_70652_1_) { - return true; - } - - public boolean getPowered() { - return this.dataWatcher.getWatchableObjectByte(17) == 1; - } - - @SideOnly(Side.CLIENT) - public float getCreeperFlashIntensity(float p_70831_1_) { - return (this.lastActiveTime + (this.timeSinceIgnited - this.lastActiveTime) * p_70831_1_) / (this.fuseTime - 2); - } - @Override protected Item getDropItem() { return Item.getItemFromBlock(Blocks.tnt); } - public int getCreeperState() { - return this.dataWatcher.getWatchableObjectByte(16); - } - - public void setCreeperState(int p_70829_1_) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) p_70829_1_)); - } - @Override - public void onStruckByLightning(EntityLightningBolt p_70077_1_) { - super.onStruckByLightning(p_70077_1_); - this.dataWatcher.updateObject(17, Byte.valueOf((byte) 1)); - } - - @Override - protected boolean interact(EntityPlayer p_70085_1_) { - ItemStack itemstack = p_70085_1_.inventory.getCurrentItem(); - - if(itemstack != null && itemstack.getItem() == Items.flint_and_steel) { - this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.ignite", 1.0F, this.rand.nextFloat() * 0.4F + 0.8F); - p_70085_1_.swingItem(); - - if(!this.worldObj.isRemote) { - this.func_146079_cb(); - itemstack.damageItem(1, p_70085_1_); - return true; - } - } - - return super.interact(p_70085_1_); - } - - private void func_146077_cc() { + public void func_146077_cc() { if(!this.worldObj.isRemote) { - this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"); - - if(this.getPowered()) { - this.explosionRadius *= 3; - } + boolean griefing = this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"); worldObj.newExplosion(this, posX, posY, posZ, 5.0F, false, false); - if(this.getPowered()) { - - for(int i = 0; i < 255; i++) { - int a = rand.nextInt(15) + (int) posX - 7; - int b = rand.nextInt(15) + (int) posY - 7; - int c = rand.nextInt(15) + (int) posZ - 7; - if(worldObj.getBlock(a, b, c).isReplaceable(worldObj, a, b, c) && hasPosNeightbour(worldObj, a, b, c)) { - - if(!GeneralConfig.enableHardcoreTaint) - worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3) + 5, 2); - else - worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3), 2); + if(griefing) { + if(this.getPowered()) { + + for(int i = 0; i < 255; i++) { + int a = rand.nextInt(15) + (int) posX - 7; + int b = rand.nextInt(15) + (int) posY - 7; + int c = rand.nextInt(15) + (int) posZ - 7; + + if(worldObj.getBlock(a, b, c).isReplaceable(worldObj, a, b, c) && hasPosNeightbour(worldObj, a, b, c)) { + if(!GeneralConfig.enableHardcoreTaint) { + worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3) + 5, 2); + } else { + worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3), 2); + } + } } - } - - } else { - - for(int i = 0; i < 85; i++) { - int a = rand.nextInt(7) + (int) posX - 3; - int b = rand.nextInt(7) + (int) posY - 3; - int c = rand.nextInt(7) + (int) posZ - 3; - if(worldObj.getBlock(a, b, c).isReplaceable(worldObj, a, b, c) && hasPosNeightbour(worldObj, a, b, c)) { - - if(!GeneralConfig.enableHardcoreTaint) - - worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(6) + 10, 2); - else - worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3) + 4, 2); + + } else { + + for(int i = 0; i < 85; i++) { + int a = rand.nextInt(7) + (int) posX - 3; + int b = rand.nextInt(7) + (int) posY - 3; + int c = rand.nextInt(7) + (int) posZ - 3; + + if(worldObj.getBlock(a, b, c).isReplaceable(worldObj, a, b, c) && hasPosNeightbour(worldObj, a, b, c)) { + if(!GeneralConfig.enableHardcoreTaint) { + worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(6) + 10, 2); + } else { + worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3) + 4, 2); + } + } } } } @@ -271,16 +97,4 @@ public class EntityTaintedCreeper extends EntityMob implements IRadiationImmune boolean b = (b0.renderAsNormalBlock() && b0.getMaterial().isOpaque()) || (b1.renderAsNormalBlock() && b1.getMaterial().isOpaque()) || (b2.renderAsNormalBlock() && b2.getMaterial().isOpaque()) || (b3.renderAsNormalBlock() && b3.getMaterial().isOpaque()) || (b4.renderAsNormalBlock() && b4.getMaterial().isOpaque()) || (b5.renderAsNormalBlock() && b5.getMaterial().isOpaque()); return b; } - - public boolean func_146078_ca() { - return this.dataWatcher.getWatchableObjectByte(18) != 0; - } - - public void func_146079_cb() { - this.dataWatcher.updateObject(18, Byte.valueOf((byte) 1)); - } - - public void setPowered(int power) { - this.dataWatcher.updateObject(17, power); - } } diff --git a/src/main/java/com/hbm/entity/mob/ai/EntityAINuclearCreeperSwell.java b/src/main/java/com/hbm/entity/mob/ai/EntityAINuclearCreeperSwell.java deleted file mode 100644 index 665d9dd88..000000000 --- a/src/main/java/com/hbm/entity/mob/ai/EntityAINuclearCreeperSwell.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.hbm.entity.mob.ai; - -import com.hbm.entity.mob.EntityNuclearCreeper; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAIBase; - -public class EntityAINuclearCreeperSwell extends EntityAIBase { - /** The creeper that is swelling. */ - EntityNuclearCreeper swellingCreeper; - /** The creeper's attack target. This is used for the changing of the creeper's state. */ - EntityLivingBase creeperAttackTarget; - public EntityAINuclearCreeperSwell(EntityNuclearCreeper p_i1655_1_) - { - this.swellingCreeper = p_i1655_1_; - this.setMutexBits(1); - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - @Override - public boolean shouldExecute() - { - EntityLivingBase entitylivingbase = this.swellingCreeper.getAttackTarget(); - return this.swellingCreeper.getCreeperState() > 0 || entitylivingbase != null && this.swellingCreeper.getDistanceSqToEntity(entitylivingbase) < 9.0D; - } - - /** - * Execute a one shot task or start executing a continuous task - */ - @Override - public void startExecuting() - { - this.swellingCreeper.getNavigator().clearPathEntity(); - this.creeperAttackTarget = this.swellingCreeper.getAttackTarget(); - } - - /** - * Resets the task - */ - @Override - public void resetTask() - { - this.creeperAttackTarget = null; - } - - /** - * Updates the task - */ - @Override - public void updateTask() - { - if (this.creeperAttackTarget == null) - { - this.swellingCreeper.setCreeperState(-1); - } - else if (this.swellingCreeper.getDistanceSqToEntity(this.creeperAttackTarget) > 49.0D) - { - this.swellingCreeper.setCreeperState(-1); - } - else if (!this.swellingCreeper.getEntitySenses().canSee(this.creeperAttackTarget)) - { - this.swellingCreeper.setCreeperState(-1); - } - else - { - this.swellingCreeper.setCreeperState(1); - } - } -} diff --git a/src/main/java/com/hbm/entity/mob/ai/EntityAITaintedCreeperSwell.java b/src/main/java/com/hbm/entity/mob/ai/EntityAITaintedCreeperSwell.java deleted file mode 100644 index 44c749cbe..000000000 --- a/src/main/java/com/hbm/entity/mob/ai/EntityAITaintedCreeperSwell.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.hbm.entity.mob.ai; - -import com.hbm.entity.mob.EntityTaintedCreeper; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.EntityAIBase; - -public class EntityAITaintedCreeperSwell extends EntityAIBase { - /** The creeper that is swelling. */ - EntityTaintedCreeper swellingCreeper; - /** The creeper's attack target. This is used for the changing of the creeper's state. */ - EntityLivingBase creeperAttackTarget; - public EntityAITaintedCreeperSwell(EntityTaintedCreeper p_i1655_1_) - { - this.swellingCreeper = p_i1655_1_; - this.setMutexBits(1); - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - @Override - public boolean shouldExecute() - { - EntityLivingBase entitylivingbase = this.swellingCreeper.getAttackTarget(); - return this.swellingCreeper.getCreeperState() > 0 || entitylivingbase != null && this.swellingCreeper.getDistanceSqToEntity(entitylivingbase) < 9.0D; - } - - /** - * Execute a one shot task or start executing a continuous task - */ - @Override - public void startExecuting() - { - this.swellingCreeper.getNavigator().clearPathEntity(); - this.creeperAttackTarget = this.swellingCreeper.getAttackTarget(); - } - - /** - * Resets the task - */ - @Override - public void resetTask() - { - this.creeperAttackTarget = null; - } - - /** - * Updates the task - */ - @Override - public void updateTask() - { - if (this.creeperAttackTarget == null) - { - this.swellingCreeper.setCreeperState(-1); - } - else if (this.swellingCreeper.getDistanceSqToEntity(this.creeperAttackTarget) > 49.0D) - { - this.swellingCreeper.setCreeperState(-1); - } - else if (!this.swellingCreeper.getEntitySenses().canSee(this.creeperAttackTarget)) - { - this.swellingCreeper.setCreeperState(-1); - } - else - { - this.swellingCreeper.setCreeperState(1); - } - } -} diff --git a/src/main/java/com/hbm/entity/projectile/EntityBullet.java b/src/main/java/com/hbm/entity/projectile/EntityBullet.java index e4e4a19cc..3bbf98b02 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityBullet.java +++ b/src/main/java/com/hbm/entity/projectile/EntityBullet.java @@ -32,7 +32,7 @@ import net.minecraft.world.World; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.generic.RedBarrel; import com.hbm.entity.grenade.EntityGrenadeTau; -import com.hbm.entity.mob.EntityNuclearCreeper; +import com.hbm.entity.mob.EntityCreeperNuclear; import com.hbm.entity.particle.EntityBSmokeFX; import com.hbm.items.ModItems; import com.hbm.lib.ModDamageSource; @@ -494,7 +494,7 @@ public class EntityBullet extends Entity implements IProjectile { if (entitylivingbase instanceof EntityPlayer && ArmorUtil.checkForHazmat((EntityPlayer) entitylivingbase)) { } else if (entitylivingbase instanceof EntityCreeper) { - EntityNuclearCreeper creep = new EntityNuclearCreeper(this.worldObj); + EntityCreeperNuclear creep = new EntityCreeperNuclear(this.worldObj); creep.setLocationAndAngles(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ, entitylivingbase.rotationYaw, entitylivingbase.rotationPitch); if (!entitylivingbase.isDead) @@ -509,7 +509,7 @@ public class EntityBullet extends Entity implements IProjectile { if (!this.worldObj.isRemote) this.worldObj.spawnEntityInWorld(creep); } else if (entitylivingbase instanceof EntityLivingBase - && !(entitylivingbase instanceof EntityNuclearCreeper) + && !(entitylivingbase instanceof EntityCreeperNuclear) && !(entitylivingbase instanceof EntityMooshroom) && !(entitylivingbase instanceof EntityZombie)) { entitylivingbase.addPotionEffect(new PotionEffect(Potion.poison.getId(), 2 * 60 * 20, 2)); diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index 3360a132b..ba93c94a2 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -682,7 +682,7 @@ public class ClientProxy extends ServerProxy { RenderingRegistry.registerEntityRenderingHandler(EntityMovingPackage.class, new RenderMovingPackage()); RenderingRegistry.registerEntityRenderingHandler(EntityTNTPrimedBase.class, new RenderTNTPrimedBase()); //mobs - RenderingRegistry.registerEntityRenderingHandler(EntityNuclearCreeper.class, new RenderNuclearCreeper()); + RenderingRegistry.registerEntityRenderingHandler(EntityCreeperNuclear.class, new RenderNuclearCreeper()); RenderingRegistry.registerEntityRenderingHandler(EntityTaintedCreeper.class, new RenderTaintedCreeper()); RenderingRegistry.registerEntityRenderingHandler(EntityHunterChopper.class, new RenderHunterChopper()); RenderingRegistry.registerEntityRenderingHandler(EntityCyberCrab.class, new RenderCyberCrab()); diff --git a/src/main/java/com/hbm/main/ModEventHandler.java b/src/main/java/com/hbm/main/ModEventHandler.java index 74e150a55..1b8ab3236 100644 --- a/src/main/java/com/hbm/main/ModEventHandler.java +++ b/src/main/java/com/hbm/main/ModEventHandler.java @@ -22,7 +22,7 @@ import com.hbm.entity.missile.EntityMissileBaseAdvanced; import com.hbm.entity.missile.EntityMissileCustom; import com.hbm.entity.mob.EntityCyberCrab; import com.hbm.entity.mob.EntityDuck; -import com.hbm.entity.mob.EntityNuclearCreeper; +import com.hbm.entity.mob.EntityCreeperNuclear; import com.hbm.entity.mob.EntityQuackos; import com.hbm.entity.mob.EntityTaintedCreeper; import com.hbm.entity.projectile.EntityBulletBase; @@ -577,7 +577,7 @@ public class ModEventHandler { if(entity instanceof EntityCreeper && eRad >= 200 && entity.getHealth() > 0) { if(event.world.rand.nextInt(3) == 0 ) { - EntityNuclearCreeper creep = new EntityNuclearCreeper(event.world); + EntityCreeperNuclear creep = new EntityCreeperNuclear(event.world); creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch); if(!entity.isDead) diff --git a/src/main/java/com/hbm/render/entity/mob/RenderNuclearCreeper.java b/src/main/java/com/hbm/render/entity/mob/RenderNuclearCreeper.java index 54bba99bb..4ddce6f9b 100644 --- a/src/main/java/com/hbm/render/entity/mob/RenderNuclearCreeper.java +++ b/src/main/java/com/hbm/render/entity/mob/RenderNuclearCreeper.java @@ -2,7 +2,7 @@ package com.hbm.render.entity.mob; import org.lwjgl.opengl.GL11; -import com.hbm.entity.mob.EntityNuclearCreeper; +import com.hbm.entity.mob.EntityCreeperNuclear; import com.hbm.lib.RefStrings; import net.minecraft.client.model.ModelBase; @@ -13,177 +13,126 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; -public class RenderNuclearCreeper extends RenderLiving -{ - private static final ResourceLocation armoredCreeperTextures = new ResourceLocation(RefStrings.MODID + ":" + "textures/entity/creeper_armor.png"); - private static final ResourceLocation creeperTextures = new ResourceLocation(RefStrings.MODID + ":" + "textures/entity/creeper.png"); - /** The creeper model. */ - private ModelBase creeperModel = new ModelCreeper(2.0F); +public class RenderNuclearCreeper extends RenderLiving { + + private static final ResourceLocation armoredCreeperTextures = new ResourceLocation(RefStrings.MODID + ":" + "textures/entity/creeper_armor.png"); + private static final ResourceLocation creeperTextures = new ResourceLocation(RefStrings.MODID + ":" + "textures/entity/creeper.png"); + private ModelBase creeperModel = new ModelCreeper(2.0F); - public RenderNuclearCreeper() - { - super(new ModelCreeper(), 0.5F); - } + public RenderNuclearCreeper() { + super(new ModelCreeper(), 0.5F); + } - /** - * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: - * entityLiving, partialTickTime - */ - protected void preRenderCallback(EntityNuclearCreeper p_77041_1_, float p_77041_2_) - { - float f1 = p_77041_1_.getCreeperFlashIntensity(p_77041_2_); - float f2 = 1.0F + MathHelper.sin(f1 * 100.0F) * f1 * 0.01F; + protected void preRenderCallback(EntityCreeperNuclear p_77041_1_, float p_77041_2_) { + float f1 = p_77041_1_.getCreeperFlashIntensity(p_77041_2_); + float f2 = 1.0F + MathHelper.sin(f1 * 100.0F) * f1 * 0.01F; - if (f1 < 0.0F) - { - f1 = 0.0F; - } + if(f1 < 0.0F) { + f1 = 0.0F; + } - if (f1 > 1.0F) - { - f1 = 1.0F; - } + if(f1 > 1.0F) { + f1 = 1.0F; + } - f1 *= f1; - f1 *= f1; - float f3 = (1.0F + f1 * 0.4F) * f2; - float f4 = (1.0F + f1 * 0.1F) / f2; - GL11.glScalef(f3, f4, f3); - } + f1 *= f1; + f1 *= f1; + float f3 = (1.0F + f1 * 0.4F) * f2; + float f4 = (1.0F + f1 * 0.1F) / f2; + GL11.glScalef(f3, f4, f3); + } - /** - * Returns an ARGB int color back. Args: entityLiving, lightBrightness, partialTickTime - */ - protected int getColorMultiplier(EntityNuclearCreeper p_77030_1_, float p_77030_2_, float p_77030_3_) - { - float f2 = p_77030_1_.getCreeperFlashIntensity(p_77030_3_); + protected int getColorMultiplier(EntityCreeperNuclear p_77030_1_, float p_77030_2_, float p_77030_3_) { + float f2 = p_77030_1_.getCreeperFlashIntensity(p_77030_3_); - if ((int)(f2 * 10.0F) % 2 == 0) - { - return 0; - } - else - { - int i = (int)(f2 * 0.2F * 255.0F); + if((int) (f2 * 10.0F) % 2 == 0) { + return 0; + } else { + int i = (int) (f2 * 0.2F * 255.0F); - if (i < 0) - { - i = 0; - } + if(i < 0) { + i = 0; + } - if (i > 255) - { - i = 255; - } + if(i > 255) { + i = 255; + } - short short1 = 255; - short short2 = 255; - short short3 = 255; - return i << 24 | short1 << 16 | short2 << 8 | short3; - } - } + short short1 = 255; + short short2 = 255; + short short3 = 255; + return i << 24 | short1 << 16 | short2 << 8 | short3; + } + } - /** - * Queries whether should render the specified pass or not. - */ - protected int shouldRenderPass(EntityNuclearCreeper p_77032_1_, int p_77032_2_, float p_77032_3_) - { - if (p_77032_1_.getPowered()) - { - if (p_77032_1_.isInvisible()) - { - GL11.glDepthMask(false); - } - else - { - GL11.glDepthMask(true); - } + protected int shouldRenderPass(EntityCreeperNuclear p_77032_1_, int p_77032_2_, float p_77032_3_) { + if(p_77032_1_.getPowered()) { + if(p_77032_1_.isInvisible()) { + GL11.glDepthMask(false); + } else { + GL11.glDepthMask(true); + } - if (p_77032_2_ == 1) - { - float f1 = p_77032_1_.ticksExisted + p_77032_3_; - this.bindTexture(armoredCreeperTextures); - GL11.glMatrixMode(GL11.GL_TEXTURE); - GL11.glLoadIdentity(); - float f2 = f1 * 0.01F; - float f3 = f1 * 0.01F; - GL11.glTranslatef(f2, f3, 0.0F); - this.setRenderPassModel(this.creeperModel); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glEnable(GL11.GL_BLEND); - float f4 = 0.5F; - GL11.glColor4f(f4, f4, f4, 1.0F); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); - return 1; - } + if(p_77032_2_ == 1) { + float f1 = p_77032_1_.ticksExisted + p_77032_3_; + this.bindTexture(armoredCreeperTextures); + GL11.glMatrixMode(GL11.GL_TEXTURE); + GL11.glLoadIdentity(); + float f2 = f1 * 0.01F; + float f3 = f1 * 0.01F; + GL11.glTranslatef(f2, f3, 0.0F); + this.setRenderPassModel(this.creeperModel); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glEnable(GL11.GL_BLEND); + float f4 = 0.5F; + GL11.glColor4f(f4, f4, f4, 1.0F); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); + return 1; + } - if (p_77032_2_ == 2) - { - GL11.glMatrixMode(GL11.GL_TEXTURE); - GL11.glLoadIdentity(); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_BLEND); - } - } + if(p_77032_2_ == 2) { + GL11.glMatrixMode(GL11.GL_TEXTURE); + GL11.glLoadIdentity(); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_BLEND); + } + } - return -1; - } + return -1; + } - protected int inheritRenderPass(EntityNuclearCreeper p_77035_1_, int p_77035_2_, float p_77035_3_) - { - return -1; - } + protected int inheritRenderPass(EntityCreeperNuclear p_77035_1_, int p_77035_2_, float p_77035_3_) { + return -1; + } - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntityNuclearCreeper p_110775_1_) - { - return creeperTextures; - } + protected ResourceLocation getEntityTexture(EntityCreeperNuclear p_110775_1_) { + return creeperTextures; + } - /** - * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: - * entityLiving, partialTickTime - */ - @Override - protected void preRenderCallback(EntityLivingBase p_77041_1_, float p_77041_2_) - { - this.preRenderCallback((EntityNuclearCreeper)p_77041_1_, p_77041_2_); - } + @Override + protected void preRenderCallback(EntityLivingBase p_77041_1_, float p_77041_2_) { + this.preRenderCallback((EntityCreeperNuclear) p_77041_1_, p_77041_2_); + } - /** - * Returns an ARGB int color back. Args: entityLiving, lightBrightness, partialTickTime - */ - @Override - protected int getColorMultiplier(EntityLivingBase p_77030_1_, float p_77030_2_, float p_77030_3_) - { - return this.getColorMultiplier((EntityNuclearCreeper)p_77030_1_, p_77030_2_, p_77030_3_); - } + @Override + protected int getColorMultiplier(EntityLivingBase p_77030_1_, float p_77030_2_, float p_77030_3_) { + return this.getColorMultiplier((EntityCreeperNuclear) p_77030_1_, p_77030_2_, p_77030_3_); + } - /** - * Queries whether should render the specified pass or not. - */ - @Override - protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) - { - return this.shouldRenderPass((EntityNuclearCreeper)p_77032_1_, p_77032_2_, p_77032_3_); - } + @Override + protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) { + return this.shouldRenderPass((EntityCreeperNuclear) p_77032_1_, p_77032_2_, p_77032_3_); + } - @Override - protected int inheritRenderPass(EntityLivingBase p_77035_1_, int p_77035_2_, float p_77035_3_) - { - return this.inheritRenderPass((EntityNuclearCreeper)p_77035_1_, p_77035_2_, p_77035_3_); - } + @Override + protected int inheritRenderPass(EntityLivingBase p_77035_1_, int p_77035_2_, float p_77035_3_) { + return this.inheritRenderPass((EntityCreeperNuclear) p_77035_1_, p_77035_2_, p_77035_3_); + } - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) - { - return this.getEntityTexture((EntityNuclearCreeper)p_110775_1_); - } + @Override + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return this.getEntityTexture((EntityCreeperNuclear) p_110775_1_); + } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityTesla.java b/src/main/java/com/hbm/tileentity/machine/TileEntityTesla.java index c40358133..fcab378f7 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityTesla.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityTesla.java @@ -5,7 +5,6 @@ import java.util.List; import com.hbm.blocks.ModBlocks; import com.hbm.entity.mob.EntityCyberCrab; -import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.entity.mob.EntityTaintCrab; import com.hbm.entity.mob.EntityTeslaCrab; import com.hbm.lib.Library; @@ -134,10 +133,6 @@ public class TileEntityTesla extends TileEntityMachineBase implements IEnergyUse ((EntityCreeper)e).getDataWatcher().updateObject(17, Byte.valueOf((byte)1)); } - if(e instanceof EntityNuclearCreeper) { - ((EntityNuclearCreeper)e).getDataWatcher().updateObject(17, Byte.valueOf((byte)1)); - } - double offset = 0; if(source != null && e instanceof EntityPlayer && worldObj.isRemote) diff --git a/src/main/java/com/hbm/util/ContaminationUtil.java b/src/main/java/com/hbm/util/ContaminationUtil.java index 612d8b23b..c09b3ba4a 100644 --- a/src/main/java/com/hbm/util/ContaminationUtil.java +++ b/src/main/java/com/hbm/util/ContaminationUtil.java @@ -3,7 +3,7 @@ package com.hbm.util; import java.util.HashSet; import com.hbm.entity.mob.EntityDuck; -import com.hbm.entity.mob.EntityNuclearCreeper; +import com.hbm.entity.mob.EntityCreeperNuclear; import com.hbm.entity.mob.EntityQuackos; import com.hbm.extprop.HbmLivingProps; import com.hbm.handler.HazmatRegistry; @@ -65,7 +65,7 @@ public class ContaminationUtil { return true; if(immuneEntities.isEmpty()) { - immuneEntities.add(EntityNuclearCreeper.class); + immuneEntities.add(EntityCreeperNuclear.class); immuneEntities.add(EntityMooshroom.class); immuneEntities.add(EntityZombie.class); immuneEntities.add(EntitySkeleton.class); diff --git a/src/main/resources/META-INF/HBM_at.cfg b/src/main/resources/META-INF/HBM_at.cfg new file mode 100644 index 000000000..93dfb3d3a --- /dev/null +++ b/src/main/resources/META-INF/HBM_at.cfg @@ -0,0 +1,3 @@ +# EntityCreeper +public net.minecraft.entity.monster.EntityCreeper field_82225_f # fuseTime +public net.minecraft.entity.monster.EntityCreeper func_146077_cc()V # explode diff --git a/src/main/resources/assets/hbm/textures/entity/creeper_base.png b/src/main/resources/assets/hbm/textures/entity/creeper_base.png new file mode 100644 index 0000000000000000000000000000000000000000..abdb54008f1ebf4407886d16f3b05a1fe61bb5d8 GIT binary patch literal 2964 zcmV;F3v2X=P)pgDhO5Usw|))NaUhGv9&DLQdhYMAtDe#KrSZXXpF^JW>{x-cK>XD?e1)M=GpIj zZk^fwSUO`_^vs+|&N=zMeDCwU@B2LOdtTzra|B=B3eg7z_ddRIJduofJe-ie$JJq1Hv zA)_FrpC|cX*7D*5(02E8v^dU#*UE$RI)lmCF=(r`NUTnTvCarhbvzWk;jqt6LRqVT z&Xj<5whg%xi72?8_TmGexWORhmXZSS`i0l=aP9#GVAwT)*iRW4hh@l^Q9|9TgyeQG zb~&|(JFUQecN+HfXFUG^NbEt7Ul*d;Q48aU9NOL(BvxpVIT{bckQ}XdKEsl)-U8DV zhUT$m>gJ{H0(>&H8`A0+@_Ir zWyrj%T6_;k9*)IXvdAz~Fa=;q+pm#4Aw_7X4_arM@O!oqv1et}<++{b&Q{x@ksPWM_D-c>@69x7C?}6)RSZ>(nYT1B)EkidFcC_-5TmZ4#Rnj` zR)F(t4R%lNM8H`ARA=H4a&kPmTWp1mg__V$VszG)GepXt6ay zSse#MqaJ$(QZY9-hY9vJhDohpXwXAc5r+K!6ng(-;vE`u6ahoO_y8nN$fyCFz`5Y8 zLo-Q&%03aUI4&WoCW7wtv2XKf%-68LqxZQm*iq$&Y(jy`iEvzYw4jcJ2$w)PqxV~L zFgH#9g*@T>H}*0xOuHV5FSGaoU1Bo8h2kyMt11NLmh zkBBIpt%zCz@4`*kpk9Yn%!+vzxTBQx4{i%!7?xm~bs&RP!f;mtMIDjME&@Qm5Us8z zq>=mHW{)S#WAR4f0E6+lTl3Dp;P}|*#*z6zjdY^)uDUN`jr2XNj97-H-b=8Wp?ctd z9-Id#CPSbyi(w;k<=OSfA4)}76_MOiK}fnGL)T0j0XQ1VzFLB)0Wr#_kKza!$1%oy z^Z)G6xuPcBri9KWf$3fa-I3KD?;)XF11md#j|L53I)YGUE2JS2+2KcXgSbZkQI~+W z%7iz)As+Unzv1L_!p&&Jl#4OWjw0Z|Rv66+93=O-XPT}k$~v+eLKwOfG#6w{$I~Po;N)5&j2XoSrIsQuSSW6}l!Zrd@W#pH?Eznu2!s zmqf>}#vxlVq&3krM}&}usp4o9_=neFW9}-%9*eY}^b4Y7qsF=#>*U`Em?S3q!-d!iN;i20I{+{)a)<#os7aRblIvQ!D+~pSH zRl6DdbDroSyOP2xkas%?W3xka@$zN{tFEl1g^~9OPY9~E!=IdjlUpG+3+V3q9Oq-R z)&oTq1<+1JB62K%0vd3}2b(iJC=E6^PD5H34RyT|`np8OPf20ySD>h@0DSFcqAlc9 znHua2DX)VT9)SGYMtt&UC+^Ko!!Rwu!AChT)*G>BIvE8cnQ*Xn=*FXw?N-CPVk>oH z-xGXlaG;5}K5>7>7Dx*x)u<2&&S(hqzSwePBX)Fdfut`2D?8u8s>XN0*L$LlJq{6} zO0HWJ|EUtH2@wKH`OufDp_&pxeK+Ds7 zj-);rQU_JET0BeQQbr7pyzUQw;?mMPJ0QH~N8L4_RCiq0IHf8X+lo9O*u#HX0S5JK zgQ`RhISCo>5)beT*JGXLeRv&N4^QIqrDVLyDn^tgkdFD)XRlyeAz_JyKK9?rg1%Ny z0r(Hk|JNsXk1L2`yM=W3x%ULoqXLMp`JjaCI@d7uDd*D!rZ^*m&Mcu~C(bHD8R;>+ zTKg(q`}{SCyLQm=LQ@E&6Tyfy6R+W}x$!5q(7D2@gAmmbOj>Pv@XI&Sa9L>kpLu?N zlMgkXONyM7K0zwTprd~9Bl&?dN;2k;z|w6ftjMR&qUuFR?N{Oo+e*VGs765h4BQ+R zS2qq-evANB0CbHST$%mq`3Hc1_yZ&#)j)jAA2BC`@kz-cTIJCO3(5Gh$v|ZGYmryF z6aI(2puQeK=~Q$k4AQAkq&Vdmog0F3ER2RjW=S$SX1~T&_7W|}pLvHCdIC)sLt}Q6 zWi8Ys;boVk!SARiG$fgEy@2B+3=+)@+8nL$KjZ~|{s!chW@Ei(Ed<9r;l0-b#U~5k zMX1!Pa0B%W<81~CTNw4Kgm- zCHla#b`#YGq7HxLpWKQ3vR&w7%}8v}LRKw7Om_fHs9IYTVGbXJngXC~lu@8K;ACec z5Y~kvl!&4h_8jd;EcE)Hd49=gAd#=tG+xWd$?Y1~QNBc8rto!MIPfrwD7`qy>ljL- z+?ym-cLV{-2k~|h)DvP1xGb~*Q$@h}+W7?{dIj`aR2{P50Q?))El)p|(>NXg0000< KMNUMnLSTXdH;0-4 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/entity/creeper_mustard.png b/src/main/resources/assets/hbm/textures/entity/creeper_mustard.png new file mode 100644 index 0000000000000000000000000000000000000000..7d2016173365f35794459815bb3abde1d956914f GIT binary patch literal 3104 zcmV+*4BzvKP)()Nc-hCet2nG=i{(IptA;t}0UZI_` zIY!Q0Xai#kH+mH|ZTc0yzTLPNq*Gq?3f2TCet(#}!V3Pda|?BqdH8#OkE)sOg~Nmx zw?daI7daY5iL1z=0IH@z+(%5+2?Qcook65gjiLws5z%U8!-f)qo-G6<73ZkuUN}sM zabJLcc$mP*Am3R1eR2xFjVLA}D~ZTaBeA#zEYk>i8}Z+KA5~QmjXHNEKb@Xb9L|D! z;V>b_4WO-4!s*PS_u5f@@$0vd;??Zfv6;Nt-yx>TXmKBw1REEx4s-PAQQrLdcj>udhx${3E zBWW@7W}U%ch~Ui1C2;E?Qdq%eOCdOFrn+)9nfhTwqlKOW0t3S`F*U-KD_8XE=ifjh zg_4CYA&+(<4ecbV2%New$QwU9bYD{vq)-CwH;fPq(AGJEY6w$bH=jGBw@7x)M$44Q`Ll$DTSBpU+2o&nT6Ze~+pT;d0F(BK!Gd_byUXB4iiHR4s7f z>DW)|v`66PM;ML$NXjkJvzH)^blq=%Ocf>5vDvKjcK;DkG+|A6m^rgn(Ddgf`nvY8 zt}Z}HZYy@%ex_zP0TYT6#~6=ew@o1^rIV@ZX!0pMLvbvLd6*LlkfbvR=4=Y5 ztRkjb$V$xx%}Hjellv(TU~(jCNOB)7mwFM+5D0dYm03k9S<{P&MtpR5hAA%XBc{i> z+8-k=^-q)+>m+AA3;h0m`XjVn>BFd+saP}*HC~P!u0kU~#o|>YJ4}?6E+%*S43Zt0 zjD`e)Qk-N*CZb@awPYs&pDx zZ(JtRDF6bY$RHiPKHTLqiAMZHMz3NNWmc_dK(Nfm)Acn|F3U?|FL<4?p|6CLYzo=h<|x?D^Ay3&?A7%p~GkII=A0^ ztwDe6iMR22yGe8waHI7<$)B|nj3G2N4JCS;<`cVEx%_z|qx6i#z+z4s;<#@(Fx^z-9Xl_xRKdy0^fhPzCsqRh&PGhc!(AW25nHav+MX`wJr zAr!fSD8?Ba>SD3`^~rF&D_=8u=E?6Nnk8atDxz6IG+AkD_tDoI0B!sO*RFUF3})m= z6lbCiBp^pJh$%rrAs=W7V6qbo$^?P~FzwN=g+F9`^HHSbn*(S@eMR18U8?lHVIT9f=rIw=n#|hm21Cn$L4S}yt zzo-AtmS54^ALaE||A8gdKbX{>AOw8Jh{b$#_YDvYD*#AgKPfH~qB)JW&S6|B1-LTi za^md!^|V(;PF=8es?>Nh{KtP(P*LDqtbHr7HR1V zIQr*Cis!82Nb`OQOMZ+kAps0=M6&_^h{B1}!~AUXJH!+N%iMF3!`{hs2f#R^!2Wtx zMjAzPo}uyhZ!qW?G%Wu$PIEg!UmI05FOrm+%8_H+vDv*OSd-|!d6S<09>QZfx;92x zX$rOOwRHBJXJiD##0OYV7{Kq_hs}8bizSo2`;YMAv;RbREKE;-7rlKK@db6-+Rxxj zG}GxR=3?t{Dl3b5YSWK!TCNigck%I#t~Vw#0AW#S4w-3FaHPz@T~^4dn&lj6-h(J6 z17<>F7W%G#LdCpf1_x4cB;*26U%d)+BV}{UxKc$xrK&88mtQF6+_`3soakg^I81)d zaxydeDV`bT)i?hQfjH<253P9)ix{VJzD~=TYp78V&p(w<`5cu`8y};4;0!UvF`4cF zm~yf+=LhIsd#m+19|>C3kv zg$(@7!^L<9FAy1#0q_p{ICrjd(gP4YgQHyTz5~GKUmp5D@-_LtBsaxh|WnB(WKeK_LWJXmJK(MiDc?pU3 zD7DKnsH&X8Pk#6mWpmTXoMJ^)Vzk|mh{iPp!$yLETsA%V+@uFE;ST%SD;0XJdj$~3 zVV_Av9$@dG!&s~e_0{zR0xg_AC*w?6N^NBdC%!yMQEnP}h3g65xj^%m&8%#A96990 z>8hf!@i?biPEz+^9`(yNP`Y5_q)veeAO6w{CA!5{il%t5Sj`v{m#|^oN{9^-j{6z$ z96-^sX}w}2=xd>3aTZzG)ii(c8RexSc54cm`F}@8>suT<-Hpv&!M7h@iyVPSxQ&|n zHzqZJ3IDn&Us#04zlW^!d~Bwfv|aP_!M2xqXhklLj0T+PZah5~Sh>2MKYrN4k*1qu z||7hBLo&?jQGl=X}rm{=WO&_x;Y*?Arcj^x)oSNl7Xuue1qsdMUDVH=ap9 z`&wNEQ z`a{f}w@AYj^xRX|N54zHu=T?iDJs4Mt)LL}bh7^K-=PFuxW*k^d*j0lJN-28*^OW7 zK^i?wM6wZy3WzbWwD&l1xm@V=8X~Fze^AR+D{g1~`)hHzClJ)hspJmuo%4l?!s!6a zDqlfzY94xH9D;EcmGiH|Xf#q*kVZvu60JvUAjH!@K_g%Xb7nvjS~laMAORMgysUa#kdoAPmVug5hhlQQX;vH{;UUr5QY z(tGkKmW)ym1nL&whi77hjho*kqKxC3aN%-|vUJ%h@=BK?im?PE2K+%#!dk?*X-u3x zh`r+-R8>Vl#Xaewe^ewfIeW?meAj$I)FmPlI==8qIrUXKzEq6A&&4Y3^S9AewHZLD7X69!LvF{c?Z7-Oew zz^8m=vX>1T-k|RCAG3YyYiIGDt^kUnu=b7LqbRxy=4(zI-51@uV?EWS(`o+rIM!LI znBpyT_w+E}n53~`1&XTh)|-!GYu9166f-@;Kx%3tqNpPn3^K#4l99ih#~yzK5P0H;LMgN~j)DrZfjyL%gs{(}H?cJ^`ncozW6m)#0s zFJ-xLbT>U+4EZ8Fo0yn^}+ZbQ|8@!*maYv6dGh`TS(%)N^p}v!th#6K7J0L{t`5&BW2a z55KHnG{z$N1!@;uO2B`ZWK#wXmxy!1i=qTLapFYOw*S9SF=DN|6KSFkmwgvOB}$8} z4{M1LkC%V&y)xZHVJeFgQNkfCGio`w_gON`R`N=l@cLwy)RdjYFUYsDZTr(Cn=*(f zNf*o)B%hYfewj$nL;I-_BGCYi^;SF{2PtW}eA*`nLYQbo#^ZLNgxsI?31cpm)?+6@ z|Mw5hgfz_6SKWbD7f0P?53pg~b5vB{fG9>;^V+p+_}h~xVFNyYkcQfNE|mXeeack% z+Nz7opSbSEhtLTTre|hhnO?*zum6P+r;mjAM0BczKO~TqHIL@Khfu-_S6qHIN$Ioj z%POt5L)6rL53MkXPa1-#hC`n?@C7EBkuwLg(TU^qDbjK;q37flz)yn7j3v8_Nw=NO zzHz?DfA9VGnDi>-W@nS25Af%gw{fa3#Ns83Iqh)p(kt)Nb!viTD{jDc{17XyeGqAK z;2ZIE){;VuMgu3>wxtL@^qr8QMPQ_$31r}B*oxm$DS@KX9wuDt;JeoLKH>(qaTr%k@L0r zI)`(VEKfgZOdLG?J{iMy+zy$5Zv<5hqZN&WOXh@|nrw%2e#gdwdpoznrn!%9cY<^Z+CUQt3 z$$Swh8CLGPErHdmXY=@Dza|oak6ZTe-aF3|QO4=APh!gQlaic8|LO6s&DWXYbx6`M zEw(PS8gNb6$w)7zZb1R}{_t`XMdhQ`J(T9B@o!JQi9S}xL-*C8(?Nozj^W3^ByV$J0OQLk_8A733iYCg>e@QZ9`UiH7Mu?IA6BClxc}vE;8n^1Xc)-;y|; z(J?RC`O^p~DgzD|Z?1ch9ecY0coFP(6c$(Fa*tw8G_iSSD*{2Tylf$=8sSuL2TCMFRrM8E zQW81v@gcf8TZoO(Gq?UOBwq+I#>n7c7j133Nl&%VwEO`^?H!CdU3_xus@la4)^NsmBYgs;VspX_hn?*`e z0SGExM|WUMDrDQXH>e5qQ(Zcp6DK=}i;Y7g=~6z8+)2lY4-myzB;Qw_-=k+-=eqw!I?I4pUVes#1#|F> zb(5HyOHzW4{H#>E`+Goh{`2+5t=p-tn1;Q#4OvZ~x-@}{%gyX-IS499-U!RDxRK!G zaq^~%c>R57g$TnVebioh|M{l>;@dIhx8##F0FnU2= zFI{pef>y*IkTDqrAO<;XLJmksUKd352r)(^uMd~oK|#R+^789ROV34e+s`-slvev( z(tXmpH#*e)H`J&?V)|^>{N*;16D&A9ITTjJbN>&n!{r(zFK-T7(MZ?vUD2Yld31NS zfClnr&c!jP*C=rp49w!yP5bHM|V7|44hWc8F2u$>LAp2bS12PtK6~)C@ z;vC$D$KwD&;G;cjqW|;K3-sGP{NnMSQnToeGgn#jZJVHT4j)2M+}KAv6vY<-;Ptyn zN-RQeNTR)an6kob%$Y^3fB$J}YOiL`{zKGMSJ83o09!shh~Hz!Ed|NURycP2ICtKB zDW=4DL{U%wkPkuA!w;&PSi9y0u3B~rTXt?{>6LfWb8G_;MvT$oatG+L57657SCUOJ z)GeHY-|zZjykAWIvwNG(7Hw;51E8v^ii(Pg&uxz{8`tgGe~8MGOsZ>E@ZS1A5hG@^ zr0Jh=4sN6O*jwCq^SuP+QMP{g4)JjUl4l5?-QG0FaeYiX4t%{f5mb0VjX> z-M=#E@X()=jN}V*$CZ^hhB}blJ^&nJPL3Q6eJumNN@s3~ii(QQo(uM27hMBm06g>j zTc1n5zNU}|?paAzemP$61aiQ|h7D_xgJG0Vn8vzB9AiGZdd49NM>_gYf^Hh>7Sgz| znA>l^5nn(cqQ-y_!;*$7jBzUU3k#WFozK7g==)TZW?`|Ih=ju&JLM#(M9>@Sk)&j9 zx#iAp&44e{lMxkyRBh%F!PVBdkgG%PHksp%?aS6zNqj5eF?oR#3y zm9^Py=Nda_u2VMP{yXcU@kujLu7Izh2{gtF(sF=^5$#s2Ne91JuJH7N9X$3MPGgO)vw&| zXR4v0fmN$kv1-+-v*yxG)c~ut4ExAFGV*dT>dkcYdU)lQ439?1Fi+61pqjVWwXtU1LGHf$BGhn*&c0zXX7o^PokeH=1P$|2u@=w6GGjjN zN48RSaV=ZqlVqjGAc`uWFg)y{z;teARaMnFOWps=7FhlB>Zqy)m|eD%*28TO)svl( zh{J6mqQdg!%h|qtEq=d`tYnpi+=y7Db7DWGnvw0000 Date: Wed, 19 Apr 2023 16:17:48 +0200 Subject: [PATCH 6/9] faster cracking, more gas funnies --- .../java/com/hbm/blocks/bomb/BlockTaint.java | 4 +- .../java/com/hbm/entity/EntityMappings.java | 4 +- .../com/hbm/entity/effect/EntityMist.java | 19 +- .../hbm/entity/mob/EntityCreeperNuclear.java | 12 +- .../hbm/entity/mob/EntityCreeperPhosgene.java | 42 ++++ ...Creeper.java => EntityCreeperTainted.java} | 4 +- src/main/java/com/hbm/main/ClientProxy.java | 44 ++-- .../java/com/hbm/main/ModEventHandler.java | 4 +- src/main/java/com/hbm/potion/HbmPotion.java | 4 +- .../entity/mob/RenderCreeperUniversal.java | 92 +++++++++ .../entity/mob/RenderNuclearCreeper.java | 138 ------------- .../entity/mob/RenderTaintedCreeper.java | 189 ------------------ .../TileEntityMachineCatalyticCracker.java | 109 +--------- src/main/resources/META-INF/HBM_at.cfg | 11 +- 14 files changed, 207 insertions(+), 469 deletions(-) create mode 100644 src/main/java/com/hbm/entity/mob/EntityCreeperPhosgene.java rename src/main/java/com/hbm/entity/mob/{EntityTaintedCreeper.java => EntityCreeperTainted.java} (96%) create mode 100644 src/main/java/com/hbm/render/entity/mob/RenderCreeperUniversal.java delete mode 100644 src/main/java/com/hbm/render/entity/mob/RenderNuclearCreeper.java delete mode 100644 src/main/java/com/hbm/render/entity/mob/RenderTaintedCreeper.java diff --git a/src/main/java/com/hbm/blocks/bomb/BlockTaint.java b/src/main/java/com/hbm/blocks/bomb/BlockTaint.java index 469bd6430..3d24353aa 100644 --- a/src/main/java/com/hbm/blocks/bomb/BlockTaint.java +++ b/src/main/java/com/hbm/blocks/bomb/BlockTaint.java @@ -6,7 +6,7 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.entity.mob.EntityTaintCrab; -import com.hbm.entity.mob.EntityTaintedCreeper; +import com.hbm.entity.mob.EntityCreeperTainted; import com.hbm.entity.mob.EntityTeslaCrab; import com.hbm.potion.HbmPotion; @@ -186,7 +186,7 @@ public class BlockTaint extends Block/*Container*/ { } if(entity instanceof EntityCreeper) { - EntityTaintedCreeper creep = new EntityTaintedCreeper(world); + EntityCreeperTainted creep = new EntityCreeperTainted(world); creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch); if(!world.isRemote) { diff --git a/src/main/java/com/hbm/entity/EntityMappings.java b/src/main/java/com/hbm/entity/EntityMappings.java index 468b4a9bc..d3a450e87 100644 --- a/src/main/java/com/hbm/entity/EntityMappings.java +++ b/src/main/java/com/hbm/entity/EntityMappings.java @@ -203,9 +203,11 @@ public class EntityMappings { addEntity(EntityCog.class, "entity_stray_cog", 1000); addEntity(EntitySawblade.class, "entity_stray_saw", 1000); addEntity(EntityChemical.class, "entity_chemthrower_splash", 1000); + addEntity(EntityMist.class, "entity_mist", 1000); addMob(EntityCreeperNuclear.class, "entity_mob_nuclear_creeper", 0x204131, 0x75CE00); - addMob(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", 0x813b9b, 0xd71fdd); + addMob(EntityCreeperTainted.class, "entity_mob_tainted_creeper", 0x813b9b, 0xd71fdd); + addMob(EntityCreeperPhosgene.class, "entity_mob_tainted_phosgene", 0xE3D398, 0xB8A06B); addMob(EntityHunterChopper.class, "entity_mob_hunter_chopper", 0x000020, 0x2D2D72); addMob(EntityCyberCrab.class, "entity_cyber_crab", 0xAAAAAA, 0x444444); addMob(EntityTeslaCrab.class, "entity_tesla_crab", 0xAAAAAA, 0x440000); diff --git a/src/main/java/com/hbm/entity/effect/EntityMist.java b/src/main/java/com/hbm/entity/effect/EntityMist.java index 61b9833c5..9931c0287 100644 --- a/src/main/java/com/hbm/entity/effect/EntityMist.java +++ b/src/main/java/com/hbm/entity/effect/EntityMist.java @@ -37,15 +37,22 @@ public class EntityMist extends Entity { public EntityMist(World world) { super(world); this.noClip = true; - this.setSize(10F, 3F); + } + + public EntityMist setArea(float width, float height) { + this.dataWatcher.updateObject(11, width); + this.dataWatcher.updateObject(12, height); + return this; } @Override protected void entityInit() { this.dataWatcher.addObject(10, new Integer(0)); + this.dataWatcher.addObject(11, new Float(0)); + this.dataWatcher.addObject(12, new Float(0)); } - public EntityMist setFluid(FluidType fluid) { + public EntityMist setType(FluidType fluid) { this.dataWatcher.updateObject(10, fluid.getID()); return this; } @@ -58,6 +65,10 @@ public class EntityMist extends Entity { @Override public void onEntityUpdate() { + float height = this.dataWatcher.getWatchableObjectFloat(12); + this.yOffset = height / 2F; + this.setSize(this.dataWatcher.getWatchableObjectFloat(11), height); + if(!worldObj.isRemote) { if(this.ticksExisted > this.getMaxAge()) { @@ -114,7 +125,7 @@ public class EntityMist extends Entity { } } - if(type.hasTrait(FT_Flammable.class)) { + if(type.hasTrait(FT_Flammable.class) && type.hasTrait(FT_Liquid.class)) { if(living != null) { HbmLivingProps.setOil(living, 200); //doused in oil for 10 seconds } @@ -169,7 +180,7 @@ public class EntityMist extends Entity { @Override protected void readEntityFromNBT(NBTTagCompound nbt) { - this.setFluid(Fluids.fromID(nbt.getInteger("type"))); + this.setType(Fluids.fromID(nbt.getInteger("type"))); } @Override diff --git a/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java b/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java index 23e8719f5..3be14d073 100644 --- a/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java +++ b/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java @@ -45,9 +45,12 @@ public class EntityCreeperNuclear extends EntityCreeper { @Override public boolean attackEntityFrom(DamageSource source, float amount) { + + // for some reason the nuclear explosion would damage the already dead entity, reviving it and forcing it to play the death animation + if(this.isDead) return false; if(source == ModDamageSource.radiation || source == ModDamageSource.mudPoisoning) { - this.heal(amount); + if(this.isEntityAlive()) this.heal(amount); return false; } @@ -96,7 +99,7 @@ public class EntityCreeperNuclear extends EntityCreeper { super.onUpdate(); - if(this.getHealth() < this.getMaxHealth() && this.ticksExisted % 10 == 0) { + if(this.isEntityAlive() && this.getHealth() < this.getMaxHealth() && this.ticksExisted % 10 == 0) { this.heal(1.0F); } } @@ -104,6 +107,9 @@ public class EntityCreeperNuclear extends EntityCreeper { @Override public void func_146077_cc() { if(!this.worldObj.isRemote) { + + this.setDead(); + boolean flag = this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"); if(this.getPowered()) { @@ -126,8 +132,6 @@ public class EntityCreeperNuclear extends EntityCreeper { ExplosionNukeSmall.explode(worldObj, posX, posY + 0.5, posZ, ExplosionNukeSmall.PARAMS_SAFE); } } - - this.setDead(); } } } diff --git a/src/main/java/com/hbm/entity/mob/EntityCreeperPhosgene.java b/src/main/java/com/hbm/entity/mob/EntityCreeperPhosgene.java new file mode 100644 index 000000000..53cfbe7f7 --- /dev/null +++ b/src/main/java/com/hbm/entity/mob/EntityCreeperPhosgene.java @@ -0,0 +1,42 @@ +package com.hbm.entity.mob; + +import com.hbm.entity.effect.EntityMist; +import com.hbm.inventory.fluid.Fluids; + +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; + +public class EntityCreeperPhosgene extends EntityCreeper { + + public EntityCreeperPhosgene(World world) { + super(world); + this.fuseTime = 20; //ehehehehehe + } + + @Override + public boolean attackEntityFrom(DamageSource source, float amount) { + + if(!source.isDamageAbsolute() && !source.isUnblockable()) { + amount -= 4F; + } + + if(amount < 0) return false; + + return super.attackEntityFrom(source, amount); + } + + @Override + public void func_146077_cc() { + + if(!this.worldObj.isRemote) { + this.setDead(); + + EntityMist mist = new EntityMist(worldObj); + mist.setType(Fluids.PHOSGENE); + mist.setPosition(posX, posY, posZ); + mist.setArea(10, 5); + worldObj.spawnEntityInWorld(mist); + } + } +} diff --git a/src/main/java/com/hbm/entity/mob/EntityTaintedCreeper.java b/src/main/java/com/hbm/entity/mob/EntityCreeperTainted.java similarity index 96% rename from src/main/java/com/hbm/entity/mob/EntityTaintedCreeper.java rename to src/main/java/com/hbm/entity/mob/EntityCreeperTainted.java index 0190e025d..807e6c543 100644 --- a/src/main/java/com/hbm/entity/mob/EntityTaintedCreeper.java +++ b/src/main/java/com/hbm/entity/mob/EntityCreeperTainted.java @@ -11,9 +11,9 @@ import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.world.World; -public class EntityTaintedCreeper extends EntityCreeper implements IRadiationImmune { +public class EntityCreeperTainted extends EntityCreeper implements IRadiationImmune { - public EntityTaintedCreeper(World world) { + public EntityCreeperTainted(World world) { super(world); } diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index ba93c94a2..0b230bf6b 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -66,6 +66,7 @@ import com.hbm.handler.ImpactWorldHandler; import com.hbm.handler.HbmKeybinds.EnumKeybind; import com.hbm.items.IAnimatedItem; import com.hbm.items.ModItems; +import com.hbm.lib.RefStrings; import com.hbm.particle.*; import com.hbm.particle.psys.engine.EventHandlerParticleEngine; import com.hbm.render.anim.*; @@ -682,27 +683,28 @@ public class ClientProxy extends ServerProxy { RenderingRegistry.registerEntityRenderingHandler(EntityMovingPackage.class, new RenderMovingPackage()); RenderingRegistry.registerEntityRenderingHandler(EntityTNTPrimedBase.class, new RenderTNTPrimedBase()); //mobs - RenderingRegistry.registerEntityRenderingHandler(EntityCreeperNuclear.class, new RenderNuclearCreeper()); - RenderingRegistry.registerEntityRenderingHandler(EntityTaintedCreeper.class, new RenderTaintedCreeper()); - RenderingRegistry.registerEntityRenderingHandler(EntityHunterChopper.class, new RenderHunterChopper()); - RenderingRegistry.registerEntityRenderingHandler(EntityCyberCrab.class, new RenderCyberCrab()); - RenderingRegistry.registerEntityRenderingHandler(EntityTeslaCrab.class, new RenderTeslaCrab()); - RenderingRegistry.registerEntityRenderingHandler(EntityTaintCrab.class, new RenderTaintCrab()); - RenderingRegistry.registerEntityRenderingHandler(EntityMaskMan.class, new RenderMaskMan()); - RenderingRegistry.registerEntityRenderingHandler(EntityBOTPrimeHead.class, new RenderWormHead()); - RenderingRegistry.registerEntityRenderingHandler(EntityBOTPrimeBody.class, new RenderWormBody()); - RenderingRegistry.registerEntityRenderingHandler(EntityDuck.class, new RenderDuck(new ModelChicken(), 0.3F)); - RenderingRegistry.registerEntityRenderingHandler(EntityQuackos.class, new RenderQuacc(new ModelChicken(), 7.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityFBI.class, new RenderFBI()); - RenderingRegistry.registerEntityRenderingHandler(EntityRADBeast.class, new RenderRADBeast()); - RenderingRegistry.registerEntityRenderingHandler(EntityBlockSpider.class, new RenderBlockSpider()); - RenderingRegistry.registerEntityRenderingHandler(EntityUFO.class, new RenderUFO()); - RenderingRegistry.registerEntityRenderingHandler(EntitySiegeZombie.class, new RenderSiegeZombie()); - RenderingRegistry.registerEntityRenderingHandler(EntitySiegeUFO.class, new RenderSiegeUFO()); - RenderingRegistry.registerEntityRenderingHandler(EntitySiegeCraft.class, new RenderSiegeCraft()); - RenderingRegistry.registerEntityRenderingHandler(EntitySiegeSkeleton.class, new RenderSiegeSkeleton()); - RenderingRegistry.registerEntityRenderingHandler(EntitySiegeTunneler.class, new RenderSiegeTunneler()); - RenderingRegistry.registerEntityRenderingHandler(EntityGhost.class, new RenderGhost()); + RenderingRegistry.registerEntityRenderingHandler(EntityCreeperNuclear.class, new RenderCreeperUniversal(RefStrings.MODID + ":" + "textures/entity/creeper.png", RefStrings.MODID + ":" + "textures/entity/creeper_armor.png").setSwellMod(5F)); + RenderingRegistry.registerEntityRenderingHandler(EntityCreeperTainted.class, new RenderCreeperUniversal(RefStrings.MODID + ":" + "textures/entity/creeper_tainted.png", RefStrings.MODID + ":" + "textures/entity/creeper_armor_taint.png")); + RenderingRegistry.registerEntityRenderingHandler(EntityCreeperPhosgene.class, new RenderCreeperUniversal(RefStrings.MODID + ":" + "textures/entity/creeper_phosgene.png", "textures/entity/creeper/creeper_armor.png")); + RenderingRegistry.registerEntityRenderingHandler(EntityHunterChopper.class, new RenderHunterChopper()); + RenderingRegistry.registerEntityRenderingHandler(EntityCyberCrab.class, new RenderCyberCrab()); + RenderingRegistry.registerEntityRenderingHandler(EntityTeslaCrab.class, new RenderTeslaCrab()); + RenderingRegistry.registerEntityRenderingHandler(EntityTaintCrab.class, new RenderTaintCrab()); + RenderingRegistry.registerEntityRenderingHandler(EntityMaskMan.class, new RenderMaskMan()); + RenderingRegistry.registerEntityRenderingHandler(EntityBOTPrimeHead.class, new RenderWormHead()); + RenderingRegistry.registerEntityRenderingHandler(EntityBOTPrimeBody.class, new RenderWormBody()); + RenderingRegistry.registerEntityRenderingHandler(EntityDuck.class, new RenderDuck(new ModelChicken(), 0.3F)); + RenderingRegistry.registerEntityRenderingHandler(EntityQuackos.class, new RenderQuacc(new ModelChicken(), 7.5F)); + RenderingRegistry.registerEntityRenderingHandler(EntityFBI.class, new RenderFBI()); + RenderingRegistry.registerEntityRenderingHandler(EntityRADBeast.class, new RenderRADBeast()); + RenderingRegistry.registerEntityRenderingHandler(EntityBlockSpider.class, new RenderBlockSpider()); + RenderingRegistry.registerEntityRenderingHandler(EntityUFO.class, new RenderUFO()); + RenderingRegistry.registerEntityRenderingHandler(EntitySiegeZombie.class, new RenderSiegeZombie()); + RenderingRegistry.registerEntityRenderingHandler(EntitySiegeUFO.class, new RenderSiegeUFO()); + RenderingRegistry.registerEntityRenderingHandler(EntitySiegeCraft.class, new RenderSiegeCraft()); + RenderingRegistry.registerEntityRenderingHandler(EntitySiegeSkeleton.class, new RenderSiegeSkeleton()); + RenderingRegistry.registerEntityRenderingHandler(EntitySiegeTunneler.class, new RenderSiegeTunneler()); + RenderingRegistry.registerEntityRenderingHandler(EntityGhost.class, new RenderGhost()); //"particles" RenderingRegistry.registerEntityRenderingHandler(EntitySmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.smoke1, ModItems.smoke2, ModItems.smoke3, ModItems.smoke4, ModItems.smoke5, ModItems.smoke6, ModItems.smoke7, ModItems.smoke8 })); RenderingRegistry.registerEntityRenderingHandler(EntityBSmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.b_smoke1, ModItems.b_smoke2, ModItems.b_smoke3, ModItems.b_smoke4, ModItems.b_smoke5, ModItems.b_smoke6, ModItems.b_smoke7, ModItems.b_smoke8 })); diff --git a/src/main/java/com/hbm/main/ModEventHandler.java b/src/main/java/com/hbm/main/ModEventHandler.java index 1b8ab3236..c78c63b76 100644 --- a/src/main/java/com/hbm/main/ModEventHandler.java +++ b/src/main/java/com/hbm/main/ModEventHandler.java @@ -24,7 +24,7 @@ import com.hbm.entity.mob.EntityCyberCrab; import com.hbm.entity.mob.EntityDuck; import com.hbm.entity.mob.EntityCreeperNuclear; import com.hbm.entity.mob.EntityQuackos; -import com.hbm.entity.mob.EntityTaintedCreeper; +import com.hbm.entity.mob.EntityCreeperTainted; import com.hbm.entity.projectile.EntityBulletBase; import com.hbm.entity.projectile.EntityBurningFOEQ; import com.hbm.extprop.HbmLivingProps; @@ -284,7 +284,7 @@ public class ModEventHandler { event.entity.dropItem(ModItems.book_of_, 1); } - if(event.entity instanceof EntityTaintedCreeper && event.source == ModDamageSource.boxcar) { + if(event.entity instanceof EntityCreeperTainted && event.source == ModDamageSource.boxcar) { for(Object o : event.entity.worldObj.getEntitiesWithinAABB(EntityPlayer.class, event.entity.boundingBox.expand(50, 50, 50))) { EntityPlayer player = (EntityPlayer)o; diff --git a/src/main/java/com/hbm/potion/HbmPotion.java b/src/main/java/com/hbm/potion/HbmPotion.java index 084826705..48031fddf 100644 --- a/src/main/java/com/hbm/potion/HbmPotion.java +++ b/src/main/java/com/hbm/potion/HbmPotion.java @@ -7,7 +7,7 @@ import com.hbm.blocks.bomb.BlockTaint; import com.hbm.config.GeneralConfig; import com.hbm.config.PotionConfig; import com.hbm.entity.mob.EntityTaintCrab; -import com.hbm.entity.mob.EntityTaintedCreeper; +import com.hbm.entity.mob.EntityCreeperTainted; import com.hbm.explosion.ExplosionLarge; import com.hbm.extprop.HbmLivingProps; import com.hbm.items.ModItems; @@ -102,7 +102,7 @@ public class HbmPotion extends Potion { if(this == taint) { - if(!(entity instanceof EntityTaintedCreeper) && !(entity instanceof EntityTaintCrab) && entity.worldObj.rand.nextInt(40) == 0) + if(!(entity instanceof EntityCreeperTainted) && !(entity instanceof EntityTaintCrab) && entity.worldObj.rand.nextInt(40) == 0) entity.attackEntityFrom(ModDamageSource.taint, (level + 1)); if(GeneralConfig.enableHardcoreTaint && !entity.worldObj.isRemote) { diff --git a/src/main/java/com/hbm/render/entity/mob/RenderCreeperUniversal.java b/src/main/java/com/hbm/render/entity/mob/RenderCreeperUniversal.java new file mode 100644 index 000000000..198be27b0 --- /dev/null +++ b/src/main/java/com/hbm/render/entity/mob/RenderCreeperUniversal.java @@ -0,0 +1,92 @@ +package com.hbm.render.entity.mob; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.client.renderer.entity.RenderCreeper; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; + +public class RenderCreeperUniversal extends RenderCreeper { + + private final ResourceLocation creeperTextures; + private final ResourceLocation armoredCreeperTextures; + private float swellMod = 1.0F; + + public RenderCreeperUniversal(String texture, String overlay) { + super(); + + creeperTextures = new ResourceLocation(texture); + armoredCreeperTextures = new ResourceLocation(overlay); + } + + public RenderCreeperUniversal setSwellMod(float mod) { + this.swellMod = mod; + return this; + } + + @Override + protected void preRenderCallback(EntityCreeper creeper, float interp) { + float swell = creeper.getCreeperFlashIntensity(interp); + float flash = 1.0F + MathHelper.sin(swell * 100.0F) * swell * 0.01F; + + if(swell < 0.0F) { + swell = 0.0F; + } + + if(swell > 1.0F) { + swell = 1.0F; + } + + swell *= swell; + swell *= swell; + swell *= swellMod; + float scaleHorizontal = (1.0F + swell * 0.4F) * flash; + float scaleVertical = (1.0F + swell * 0.1F) / flash; + GL11.glScalef(scaleHorizontal, scaleVertical, scaleHorizontal); + } + + @Override + protected int shouldRenderPass(EntityCreeper creeper, int pass, float interp) { + if(creeper.getPowered()) { + if(creeper.isInvisible()) { + GL11.glDepthMask(false); + } else { + GL11.glDepthMask(true); + } + + if(pass == 1) { + float time = (float) creeper.ticksExisted + interp; + this.bindTexture(armoredCreeperTextures); + GL11.glMatrixMode(GL11.GL_TEXTURE); + GL11.glLoadIdentity(); + float x = time * 0.01F; + float y = time * 0.01F; + GL11.glTranslatef(x, y, 0.0F); + this.setRenderPassModel(this.creeperModel); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glEnable(GL11.GL_BLEND); + float flashColor = 0.5F; + GL11.glColor4f(flashColor, flashColor, flashColor, 1.0F); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); + return 1; + } + + if(pass == 2) { + GL11.glMatrixMode(GL11.GL_TEXTURE); + GL11.glLoadIdentity(); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_BLEND); + } + } + + return -1; + } + + @Override + protected ResourceLocation getEntityTexture(EntityCreeper p_110775_1_) { + return creeperTextures; + } +} diff --git a/src/main/java/com/hbm/render/entity/mob/RenderNuclearCreeper.java b/src/main/java/com/hbm/render/entity/mob/RenderNuclearCreeper.java deleted file mode 100644 index 4ddce6f9b..000000000 --- a/src/main/java/com/hbm/render/entity/mob/RenderNuclearCreeper.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.hbm.render.entity.mob; - -import org.lwjgl.opengl.GL11; - -import com.hbm.entity.mob.EntityCreeperNuclear; -import com.hbm.lib.RefStrings; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelCreeper; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; - -public class RenderNuclearCreeper extends RenderLiving { - - private static final ResourceLocation armoredCreeperTextures = new ResourceLocation(RefStrings.MODID + ":" + "textures/entity/creeper_armor.png"); - private static final ResourceLocation creeperTextures = new ResourceLocation(RefStrings.MODID + ":" + "textures/entity/creeper.png"); - private ModelBase creeperModel = new ModelCreeper(2.0F); - - public RenderNuclearCreeper() { - super(new ModelCreeper(), 0.5F); - } - - protected void preRenderCallback(EntityCreeperNuclear p_77041_1_, float p_77041_2_) { - float f1 = p_77041_1_.getCreeperFlashIntensity(p_77041_2_); - float f2 = 1.0F + MathHelper.sin(f1 * 100.0F) * f1 * 0.01F; - - if(f1 < 0.0F) { - f1 = 0.0F; - } - - if(f1 > 1.0F) { - f1 = 1.0F; - } - - f1 *= f1; - f1 *= f1; - float f3 = (1.0F + f1 * 0.4F) * f2; - float f4 = (1.0F + f1 * 0.1F) / f2; - GL11.glScalef(f3, f4, f3); - } - - protected int getColorMultiplier(EntityCreeperNuclear p_77030_1_, float p_77030_2_, float p_77030_3_) { - float f2 = p_77030_1_.getCreeperFlashIntensity(p_77030_3_); - - if((int) (f2 * 10.0F) % 2 == 0) { - return 0; - } else { - int i = (int) (f2 * 0.2F * 255.0F); - - if(i < 0) { - i = 0; - } - - if(i > 255) { - i = 255; - } - - short short1 = 255; - short short2 = 255; - short short3 = 255; - return i << 24 | short1 << 16 | short2 << 8 | short3; - } - } - - protected int shouldRenderPass(EntityCreeperNuclear p_77032_1_, int p_77032_2_, float p_77032_3_) { - if(p_77032_1_.getPowered()) { - if(p_77032_1_.isInvisible()) { - GL11.glDepthMask(false); - } else { - GL11.glDepthMask(true); - } - - if(p_77032_2_ == 1) { - float f1 = p_77032_1_.ticksExisted + p_77032_3_; - this.bindTexture(armoredCreeperTextures); - GL11.glMatrixMode(GL11.GL_TEXTURE); - GL11.glLoadIdentity(); - float f2 = f1 * 0.01F; - float f3 = f1 * 0.01F; - GL11.glTranslatef(f2, f3, 0.0F); - this.setRenderPassModel(this.creeperModel); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glEnable(GL11.GL_BLEND); - float f4 = 0.5F; - GL11.glColor4f(f4, f4, f4, 1.0F); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); - return 1; - } - - if(p_77032_2_ == 2) { - GL11.glMatrixMode(GL11.GL_TEXTURE); - GL11.glLoadIdentity(); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_BLEND); - } - } - - return -1; - } - - protected int inheritRenderPass(EntityCreeperNuclear p_77035_1_, int p_77035_2_, float p_77035_3_) { - return -1; - } - - protected ResourceLocation getEntityTexture(EntityCreeperNuclear p_110775_1_) { - return creeperTextures; - } - - @Override - protected void preRenderCallback(EntityLivingBase p_77041_1_, float p_77041_2_) { - this.preRenderCallback((EntityCreeperNuclear) p_77041_1_, p_77041_2_); - } - - @Override - protected int getColorMultiplier(EntityLivingBase p_77030_1_, float p_77030_2_, float p_77030_3_) { - return this.getColorMultiplier((EntityCreeperNuclear) p_77030_1_, p_77030_2_, p_77030_3_); - } - - @Override - protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) { - return this.shouldRenderPass((EntityCreeperNuclear) p_77032_1_, p_77032_2_, p_77032_3_); - } - - @Override - protected int inheritRenderPass(EntityLivingBase p_77035_1_, int p_77035_2_, float p_77035_3_) { - return this.inheritRenderPass((EntityCreeperNuclear) p_77035_1_, p_77035_2_, p_77035_3_); - } - - @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - return this.getEntityTexture((EntityCreeperNuclear) p_110775_1_); - } -} diff --git a/src/main/java/com/hbm/render/entity/mob/RenderTaintedCreeper.java b/src/main/java/com/hbm/render/entity/mob/RenderTaintedCreeper.java deleted file mode 100644 index ecdd0f3e4..000000000 --- a/src/main/java/com/hbm/render/entity/mob/RenderTaintedCreeper.java +++ /dev/null @@ -1,189 +0,0 @@ -package com.hbm.render.entity.mob; - -import org.lwjgl.opengl.GL11; - -import com.hbm.entity.mob.EntityTaintedCreeper; -import com.hbm.lib.RefStrings; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelCreeper; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; - -public class RenderTaintedCreeper extends RenderLiving -{ - private static final ResourceLocation armoredCreeperTextures = new ResourceLocation(RefStrings.MODID + ":" + "textures/entity/creeper_armor_taint.png"); - private static final ResourceLocation creeperTextures = new ResourceLocation(RefStrings.MODID + ":" + "textures/entity/creeper_tainted.png"); - /** The creeper model. */ - private ModelBase creeperModel = new ModelCreeper(2.0F); - - public RenderTaintedCreeper() - { - super(new ModelCreeper(), 0.5F); - } - - /** - * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: - * entityLiving, partialTickTime - */ - protected void preRenderCallback(EntityTaintedCreeper p_77041_1_, float p_77041_2_) - { - float f1 = p_77041_1_.getCreeperFlashIntensity(p_77041_2_); - float f2 = 1.0F + MathHelper.sin(f1 * 100.0F) * f1 * 0.01F; - - if (f1 < 0.0F) - { - f1 = 0.0F; - } - - if (f1 > 1.0F) - { - f1 = 1.0F; - } - - f1 *= f1; - f1 *= f1; - float f3 = (1.0F + f1 * 0.4F) * f2; - float f4 = (1.0F + f1 * 0.1F) / f2; - GL11.glScalef(f3, f4, f3); - } - - /** - * Returns an ARGB int color back. Args: entityLiving, lightBrightness, partialTickTime - */ - protected int getColorMultiplier(EntityTaintedCreeper p_77030_1_, float p_77030_2_, float p_77030_3_) - { - float f2 = p_77030_1_.getCreeperFlashIntensity(p_77030_3_); - - if ((int)(f2 * 10.0F) % 2 == 0) - { - return 0; - } - else - { - int i = (int)(f2 * 0.2F * 255.0F); - - if (i < 0) - { - i = 0; - } - - if (i > 255) - { - i = 255; - } - - short short1 = 255; - short short2 = 255; - short short3 = 255; - return i << 24 | short1 << 16 | short2 << 8 | short3; - } - } - - /** - * Queries whether should render the specified pass or not. - */ - protected int shouldRenderPass(EntityTaintedCreeper p_77032_1_, int p_77032_2_, float p_77032_3_) - { - if (p_77032_1_.getPowered()) - { - if (p_77032_1_.isInvisible()) - { - GL11.glDepthMask(false); - } - else - { - GL11.glDepthMask(true); - } - - if (p_77032_2_ == 1) - { - float f1 = p_77032_1_.ticksExisted + p_77032_3_; - this.bindTexture(armoredCreeperTextures); - GL11.glMatrixMode(GL11.GL_TEXTURE); - GL11.glLoadIdentity(); - float f2 = f1 * 0.01F; - float f3 = f1 * 0.01F; - GL11.glTranslatef(f2, f3, 0.0F); - this.setRenderPassModel(this.creeperModel); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glEnable(GL11.GL_BLEND); - float f4 = 0.5F; - GL11.glColor4f(f4, f4, f4, 1.0F); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); - return 1; - } - - if (p_77032_2_ == 2) - { - GL11.glMatrixMode(GL11.GL_TEXTURE); - GL11.glLoadIdentity(); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_BLEND); - } - } - - return -1; - } - - protected int inheritRenderPass(EntityTaintedCreeper p_77035_1_, int p_77035_2_, float p_77035_3_) - { - return -1; - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntityTaintedCreeper p_110775_1_) - { - return creeperTextures; - } - - /** - * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: - * entityLiving, partialTickTime - */ - @Override - protected void preRenderCallback(EntityLivingBase p_77041_1_, float p_77041_2_) - { - this.preRenderCallback((EntityTaintedCreeper)p_77041_1_, p_77041_2_); - } - - /** - * Returns an ARGB int color back. Args: entityLiving, lightBrightness, partialTickTime - */ - @Override - protected int getColorMultiplier(EntityLivingBase p_77030_1_, float p_77030_2_, float p_77030_3_) - { - return this.getColorMultiplier((EntityTaintedCreeper)p_77030_1_, p_77030_2_, p_77030_3_); - } - - /** - * Queries whether should render the specified pass or not. - */ - @Override - protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) - { - return this.shouldRenderPass((EntityTaintedCreeper)p_77032_1_, p_77032_2_, p_77032_3_); - } - - @Override - protected int inheritRenderPass(EntityLivingBase p_77035_1_, int p_77035_2_, float p_77035_3_) - { - return this.inheritRenderPass((EntityTaintedCreeper)p_77035_1_, p_77035_2_, p_77035_3_); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) - { - return this.getEntityTexture((EntityTaintedCreeper)p_110775_1_); - } -} diff --git a/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineCatalyticCracker.java b/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineCatalyticCracker.java index 980717cce..e04bef058 100644 --- a/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineCatalyticCracker.java +++ b/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineCatalyticCracker.java @@ -1,17 +1,10 @@ package com.hbm.tileentity.machine.oil; -import java.util.ArrayList; -import java.util.List; - import com.hbm.blocks.BlockDummyable; -import com.hbm.interfaces.IFluidAcceptor; -import com.hbm.interfaces.IFluidSource; import com.hbm.inventory.FluidStack; -import com.hbm.inventory.fluid.FluidType; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.recipes.CrackingRecipes; -import com.hbm.lib.Library; import com.hbm.tileentity.INBTPacketReceiver; import com.hbm.tileentity.TileEntityLoadedBase; import com.hbm.util.Tuple.Pair; @@ -24,20 +17,17 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.util.ForgeDirection; -public class TileEntityMachineCatalyticCracker extends TileEntityLoadedBase implements IFluidSource, IFluidAcceptor, INBTPacketReceiver, IFluidStandardTransceiver { +public class TileEntityMachineCatalyticCracker extends TileEntityLoadedBase implements INBTPacketReceiver, IFluidStandardTransceiver { public FluidTank[] tanks; - public List list1 = new ArrayList(); - public List list2 = new ArrayList(); - public List list3 = new ArrayList(); public TileEntityMachineCatalyticCracker() { tanks = new FluidTank[5]; - tanks[0] = new FluidTank(Fluids.BITUMEN, 4000, 0); - tanks[1] = new FluidTank(Fluids.STEAM, 8000, 1); - tanks[2] = new FluidTank(Fluids.OIL, 4000, 2); - tanks[3] = new FluidTank(Fluids.PETROLEUM, 4000, 3); - tanks[4] = new FluidTank(Fluids.SPENTSTEAM, 800, 4); + tanks[0] = new FluidTank(Fluids.BITUMEN, 4000); + tanks[1] = new FluidTank(Fluids.STEAM, 8000); + tanks[2] = new FluidTank(Fluids.OIL, 4000); + tanks[3] = new FluidTank(Fluids.PETROLEUM, 4000); + tanks[4] = new FluidTank(Fluids.SPENTSTEAM, 800); } @Override @@ -51,14 +41,11 @@ public class TileEntityMachineCatalyticCracker extends TileEntityLoadedBase impl updateConnections(); this.worldObj.theProfiler.endStartSection("catalyticCracker_do_recipe"); - if(worldObj.getTotalWorldTime() % 20 == 0) + if(worldObj.getTotalWorldTime() % 5 == 0) crack(); this.worldObj.theProfiler.endStartSection("catalyticCracker_send_fluid"); if(worldObj.getTotalWorldTime() % 10 == 0) { - fillFluidInit(tanks[2].getTankType()); - fillFluidInit(tanks[3].getTankType()); - fillFluidInit(tanks[4].getTankType()); for(DirPos pos : getConPos()) { for(int i = 2; i <= 4; i++) { @@ -149,63 +136,6 @@ public class TileEntityMachineCatalyticCracker extends TileEntityLoadedBase impl for(int i = 0; i < 5; i++) tanks[i].writeToNBT(nbt, "tank" + i); } - - @Override - public void setFillForSync(int fill, int index) { - if(index < 5 && tanks[index] != null) - tanks[index].setFill(fill); - } - - @Override - public void setFluidFill(int fill, FluidType type) { - for(FluidTank tank : tanks) { - if(tank.getTankType() == type) { - tank.setFill(fill); - } - } - } - - @Override - public void setTypeForSync(FluidType type, int index) { - this.tanks[index].setTankType(type); - } - - @Override - public int getFluidFill(FluidType type) { - for(FluidTank tank : tanks) { - if(tank.getTankType() == type) { - return tank.getFill(); - } - } - return 0; - } - - @Override - public int getMaxFluidFill(FluidType type) { - if(type == tanks[0].getTankType()) - return tanks[0].getMaxFill(); - else if(type == tanks[1].getTankType()) - return tanks[1].getMaxFill(); - else - return 0; - } - - @Override - public void fillFluidInit(FluidType type) { - - ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); - ForgeDirection rot = dir.getRotation(ForgeDirection.UP); - - fillFluid(xCoord + dir.offsetX * 4 + rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 4 + rot.offsetZ * 1, this.getTact(), type); - fillFluid(xCoord + dir.offsetX * 4 - rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 4 - rot.offsetZ * 2, this.getTact(), type); - fillFluid(xCoord - dir.offsetX * 4 + rot.offsetX * 1, yCoord, zCoord - dir.offsetZ * 4 + rot.offsetZ * 1, this.getTact(), type); - fillFluid(xCoord - dir.offsetX * 4 - rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 4 - rot.offsetZ * 2, this.getTact(), type); - - fillFluid(xCoord + dir.offsetX * 2 + rot.offsetX * 3, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * 3, this.getTact(), type); - fillFluid(xCoord + dir.offsetX * 2 - rot.offsetX * 4, yCoord, zCoord + dir.offsetZ * 2 - rot.offsetZ * 4, this.getTact(), type); - fillFluid(xCoord - dir.offsetX * 2 + rot.offsetX * 3, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ * 3, this.getTact(), type); - fillFluid(xCoord - dir.offsetX * 2 - rot.offsetX * 4, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ * 4, this.getTact(), type); - } protected DirPos[] getConPos() { @@ -223,31 +153,6 @@ public class TileEntityMachineCatalyticCracker extends TileEntityLoadedBase impl new DirPos(xCoord - dir.offsetX * 2 - rot.offsetX * 4, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ * 4, rot.getOpposite()) }; } - - @Override - public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) { - Library.transmitFluid(x, y, z, newTact, this, worldObj, type); - } - - @Override - public boolean getTact() { - return worldObj.getTotalWorldTime() % 20 < 10; - } - - @Override - public List getFluidList(FluidType type) { - if(type == tanks[2].getTankType()) return list1; - if(type == tanks[3].getTankType()) return list2; - if(type == tanks[4].getTankType()) return list3; - return new ArrayList(); - } - - @Override - public void clearFluidList(FluidType type) { - if(type == tanks[2].getTankType()) list1.clear(); - if(type == tanks[3].getTankType()) list2.clear(); - if(type == tanks[4].getTankType()) list3.clear(); - } AxisAlignedBB bb = null; diff --git a/src/main/resources/META-INF/HBM_at.cfg b/src/main/resources/META-INF/HBM_at.cfg index 93dfb3d3a..1cc05d2b5 100644 --- a/src/main/resources/META-INF/HBM_at.cfg +++ b/src/main/resources/META-INF/HBM_at.cfg @@ -1,3 +1,10 @@ +# It's access transformer time, baby! +# Cracks open stupid as shit keywords that are being used wrong because Mojang shouldn't be entrusted with computers. +# After changing anything here, run `./gradlew clean setupDecompWorkspace`, this should scrap all the cached nonsense and patch the src to reflect changes made. + # EntityCreeper -public net.minecraft.entity.monster.EntityCreeper field_82225_f # fuseTime -public net.minecraft.entity.monster.EntityCreeper func_146077_cc()V # explode +public net.minecraft.entity.monster.EntityCreeper field_82225_f # fuseTime +public net.minecraft.entity.monster.EntityCreeper func_146077_cc()V # explode + +# RenderCreeper +public net.minecraft.client.renderer.entity.RenderCreeper field_77064_a # creeperModel From ce5435f07dccd6e73e8812cc6c6797549cfd7301 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 19 Apr 2023 22:18:06 +0200 Subject: [PATCH 7/9] mist --- .../java/com/hbm/entity/EntityMappings.java | 2 +- .../java/com/hbm/entity/effect/EntityMist.java | 2 +- .../hbm/inventory/fluid/trait/FT_Toxin.java | 3 +++ src/main/java/com/hbm/main/ClientProxy.java | 1 + .../hbm/render/entity/effect/RenderMist.java | 18 ++++++++++++++++++ .../com/hbm/render/item/ItemRenderBoltgun.java | 11 ++++++----- src/main/resources/assets/hbm/lang/de_DE.lang | 1 + src/main/resources/assets/hbm/lang/en_US.lang | 1 + 8 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 src/main/java/com/hbm/render/entity/effect/RenderMist.java diff --git a/src/main/java/com/hbm/entity/EntityMappings.java b/src/main/java/com/hbm/entity/EntityMappings.java index d3a450e87..4d56ebc9b 100644 --- a/src/main/java/com/hbm/entity/EntityMappings.java +++ b/src/main/java/com/hbm/entity/EntityMappings.java @@ -207,7 +207,7 @@ public class EntityMappings { addMob(EntityCreeperNuclear.class, "entity_mob_nuclear_creeper", 0x204131, 0x75CE00); addMob(EntityCreeperTainted.class, "entity_mob_tainted_creeper", 0x813b9b, 0xd71fdd); - addMob(EntityCreeperPhosgene.class, "entity_mob_tainted_phosgene", 0xE3D398, 0xB8A06B); + addMob(EntityCreeperPhosgene.class, "entity_mob_phosgene_creeper", 0xE3D398, 0xB8A06B); addMob(EntityHunterChopper.class, "entity_mob_hunter_chopper", 0x000020, 0x2D2D72); addMob(EntityCyberCrab.class, "entity_cyber_crab", 0xAAAAAA, 0x444444); addMob(EntityTeslaCrab.class, "entity_tesla_crab", 0xAAAAAA, 0x440000); diff --git a/src/main/java/com/hbm/entity/effect/EntityMist.java b/src/main/java/com/hbm/entity/effect/EntityMist.java index 9931c0287..06de19176 100644 --- a/src/main/java/com/hbm/entity/effect/EntityMist.java +++ b/src/main/java/com/hbm/entity/effect/EntityMist.java @@ -66,7 +66,7 @@ public class EntityMist extends Entity { public void onEntityUpdate() { float height = this.dataWatcher.getWatchableObjectFloat(12); - this.yOffset = height / 2F; + this.yOffset = -height / 2F; this.setSize(this.dataWatcher.getWatchableObjectFloat(11), height); if(!worldObj.isRemote) { diff --git a/src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java b/src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java index 6e7d17fd9..456b8e0a8 100644 --- a/src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java +++ b/src/main/java/com/hbm/inventory/fluid/trait/FT_Toxin.java @@ -35,6 +35,9 @@ public class FT_Toxin extends FluidTrait { public void affect(EntityLivingBase entity, double intensity) { + for(ToxinEntry entry : entries) { + entry.poison(entity, intensity); + } } public static abstract class ToxinEntry { diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index 0b230bf6b..3115a9386 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -578,6 +578,7 @@ public class ClientProxy extends ServerProxy { RenderingRegistry.registerEntityRenderingHandler(EntityCog.class, new RenderCog()); RenderingRegistry.registerEntityRenderingHandler(EntitySawblade.class, new RenderSawblade()); RenderingRegistry.registerEntityRenderingHandler(EntityChemical.class, new RenderChemical()); + RenderingRegistry.registerEntityRenderingHandler(EntityMist.class, new RenderMist()); //grenades RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeGeneric.class, new RenderSnowball(ModItems.grenade_generic)); RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeStrong.class, new RenderSnowball(ModItems.grenade_strong)); diff --git a/src/main/java/com/hbm/render/entity/effect/RenderMist.java b/src/main/java/com/hbm/render/entity/effect/RenderMist.java new file mode 100644 index 000000000..89230a555 --- /dev/null +++ b/src/main/java/com/hbm/render/entity/effect/RenderMist.java @@ -0,0 +1,18 @@ +package com.hbm.render.entity.effect; + +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + +public class RenderMist extends Render { + + @Override + public void doRender(Entity entity, double x, double y, double z, float f0, float f1) { + + } + + @Override + protected ResourceLocation getEntityTexture(Entity entity) { + return null; + } +} diff --git a/src/main/java/com/hbm/render/item/ItemRenderBoltgun.java b/src/main/java/com/hbm/render/item/ItemRenderBoltgun.java index 15fe471f6..6ab331111 100644 --- a/src/main/java/com/hbm/render/item/ItemRenderBoltgun.java +++ b/src/main/java/com/hbm/render/item/ItemRenderBoltgun.java @@ -34,6 +34,7 @@ public class ItemRenderBoltgun implements IItemRenderer { GL11.glPushMatrix(); GL11.glEnable(GL11.GL_CULL_FACE); + GL11.glShadeModel(GL11.GL_SMOOTH); Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.boltgun_tex); switch(type) { @@ -56,11 +57,12 @@ public class ItemRenderBoltgun implements IItemRenderer { case EQUIPPED: - double scale = -0.375D; + double scale = 0.25D; GL11.glScaled(scale, scale, scale); - GL11.glRotated(85, 0, 1, 0); - GL11.glRotated(135D, 1.0D, 0.0D, 0.0D); - GL11.glTranslated(-0.125, -2.0, 1.75); + GL11.glRotated(10, 0, 1, 0); + GL11.glRotated(10, 0, 0, 1); + GL11.glRotated(10, 1, 0, 0); + GL11.glTranslated(1.5, -0.25, 1); break; @@ -86,7 +88,6 @@ public class ItemRenderBoltgun implements IItemRenderer { default: break; } - GL11.glShadeModel(GL11.GL_SMOOTH); ResourceManager.boltgun.renderPart("Gun"); if(type != type.EQUIPPED_FIRST_PERSON) { ResourceManager.boltgun.renderPart("Barrel"); diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index e4200079a..bc3b244fb 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -503,6 +503,7 @@ entity.hbm.entity_ntm_ufo.name=Marsianisches Invasionsschiff entity.entity_mob_hunter_chopper.name=Jagdschrauber entity.entity_mob_mask_man.name=Maskenmann entity.entity_mob_nuclear_creeper.name=Nuklearer Creeper +entity.entity_mob_phosgene_creeper.name=Phosgen-Creeper entity.entity_mob_tainted_creeper.name=Verseuchter Creeper entity.entity_taint_crab.name=Verseuchte Krabbe entity.entity_tesla_crab.name=Tesla-Krabbe diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 74c6282fc..e8656695b 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -948,6 +948,7 @@ entity.hbm.entity_ntm_ufo.name=Martian Invasion Ship entity.entity_mob_hunter_chopper.name=Hunter Chopper entity.entity_mob_mask_man.name=Mask Man entity.entity_mob_nuclear_creeper.name=Nuclear Creeper +entity.entity_mob_phosgene_creeper.name=Phosgene Creeper entity.entity_mob_tainted_creeper.name=Tainted Creeper entity.entity_taint_crab.name=Taint Crab entity.entity_tesla_crab.name=Tesla Crab From ed829fc7ec2ac953c00a4952b7a15356faa3b87e Mon Sep 17 00:00:00 2001 From: Boblet Date: Thu, 20 Apr 2023 16:41:17 +0200 Subject: [PATCH 8/9] riveting, block tooling crafting handler --- src/main/java/api/hbm/block/IToolable.java | 31 ++- src/main/java/com/hbm/blocks/ModBlocks.java | 3 +- .../com/hbm/blocks/generic/BlockBoltable.java | 72 ------- .../blocks/generic/BlockToolConversion.java | 176 ++++++++++++++++++ .../hbm/handler/nei/NEIUniversalHandler.java | 29 ++- .../com/hbm/handler/nei/ToolingHandler.java | 15 ++ .../java/com/hbm/inventory/RecipesCommon.java | 36 +++- .../com/hbm/items/tool/ItemBlowtorch.java | 2 + .../java/com/hbm/items/tool/ItemBoltgun.java | 2 + .../java/com/hbm/items/tool/ItemTooling.java | 2 + src/main/java/com/hbm/main/MainRegistry.java | 2 + src/main/java/com/hbm/main/NEIConfig.java | 1 + .../tileentity/RenderWatzMultiblock.java | 16 +- .../machine/TileEntityWatzStruct.java | 24 ++- .../textures/blocks/watz_casing_bolted.png | Bin 0 -> 410 bytes 15 files changed, 309 insertions(+), 102 deletions(-) delete mode 100644 src/main/java/com/hbm/blocks/generic/BlockBoltable.java create mode 100644 src/main/java/com/hbm/blocks/generic/BlockToolConversion.java create mode 100644 src/main/java/com/hbm/handler/nei/ToolingHandler.java create mode 100644 src/main/resources/assets/hbm/textures/blocks/watz_casing_bolted.png diff --git a/src/main/java/api/hbm/block/IToolable.java b/src/main/java/api/hbm/block/IToolable.java index 429a14d59..64c57adb7 100644 --- a/src/main/java/api/hbm/block/IToolable.java +++ b/src/main/java/api/hbm/block/IToolable.java @@ -1,6 +1,13 @@ package api.hbm.block; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import com.hbm.inventory.RecipesCommon.ComparableStack; + import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; import net.minecraft.world.World; public interface IToolable { @@ -13,6 +20,28 @@ public interface IToolable { DEFUSER, WRENCH, TORCH, - BOLT + BOLT; + + public List stacksForDisplay = new ArrayList(); + private static HashMap map = new HashMap(); + + public void register(ItemStack stack) { + stacksForDisplay.add(stack); + } + + public static ToolType getType(ItemStack stack) { + + if(!map.isEmpty()) { + return map.get(new ComparableStack(stack)); + } + + for(ToolType type : ToolType.values()) { + for(ItemStack tool : type.stacksForDisplay) { + map.put(new ComparableStack(tool), type); + } + } + + return map.get(new ComparableStack(stack)); + } } } diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index b3b3d3e51..08312db55 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -23,6 +23,7 @@ import com.hbm.main.MainRegistry; import com.hbm.tileentity.DoorDecl; import com.hbm.tileentity.machine.storage.TileEntityFileCabinet; +import api.hbm.block.IToolable.ToolType; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.block.BlockFalling; @@ -1981,7 +1982,7 @@ public class ModBlocks { watz_element = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_element_top").setBlockName("watz_element").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_element_side"); watz_control = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_control_top").setBlockName("watz_control").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_control_side"); watz_cooler = new BlockGeneric(Material.iron).setBlockName("watz_cooler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_cooler"); - watz_end = new BlockBoltable(Material.iron).setBlockName("watz_end").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_casing"); + watz_end = new BlockToolConversion(Material.iron).addVariant("_bolted").setBlockName("watz_end").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_casing"); watz_hatch = new WatzHatch(Material.iron).setBlockName("watz_hatch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_hatch"); watz_conductor = new BlockCableConnect(Material.iron).setBlockName("watz_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_conductor_top"); watz_core = new WatzCore(Material.iron).setBlockName("watz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_computer"); diff --git a/src/main/java/com/hbm/blocks/generic/BlockBoltable.java b/src/main/java/com/hbm/blocks/generic/BlockBoltable.java deleted file mode 100644 index 87ff806ed..000000000 --- a/src/main/java/com/hbm/blocks/generic/BlockBoltable.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.hbm.blocks.generic; - -import java.util.ArrayList; -import java.util.List; - -import com.hbm.blocks.BlockBase; -import com.hbm.blocks.IBlockMulti; -import com.hbm.blocks.ILookOverlay; -import com.hbm.inventory.RecipesCommon.AStack; -import com.hbm.items.ModItems; -import com.hbm.util.I18nUtil; - -import api.hbm.block.IToolable; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.material.Material; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; -import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; - -public class BlockBoltable extends BlockBase implements IToolable, ILookOverlay, IBlockMulti { - - public BlockBoltable(Material mat) { - super(mat); - } - - @Override - public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) { - if(tool != ToolType.BOLT) return false; - - return true; - } - - public List getMaterials(int meta) { - List list = new ArrayList(); - - return list; - } - - @Override - @SideOnly(Side.CLIENT) - public void printHook(Pre event, World world, int x, int y, int z) { - - ItemStack held = Minecraft.getMinecraft().thePlayer.getHeldItem(); - if(held == null || held.getItem() != ModItems.boltgun) return; - - List text = new ArrayList(); - text.add(EnumChatFormatting.GOLD + "Requires:"); - List materials = getMaterials(world.getBlockMetadata(x, y, z)); - - for(AStack stack : materials) { - try { - ItemStack display = stack.extractForCyclingDisplay(20); - text.add("- " + display.getDisplayName() + " x" + display.stackSize); - } catch(Exception ex) { - text.add(EnumChatFormatting.RED + "- ERROR"); - } - } - - if(!materials.isEmpty()) { - ILookOverlay.printGeneric(event, I18nUtil.resolveKey(this.getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text); - } - } - - @Override - public int getSubCount() { - return 1; - } -} diff --git a/src/main/java/com/hbm/blocks/generic/BlockToolConversion.java b/src/main/java/com/hbm/blocks/generic/BlockToolConversion.java new file mode 100644 index 000000000..5f7314d28 --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockToolConversion.java @@ -0,0 +1,176 @@ +package com.hbm.blocks.generic; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; + +import com.hbm.blocks.BlockBase; +import com.hbm.blocks.IBlockMulti; +import com.hbm.blocks.ILookOverlay; +import com.hbm.blocks.ModBlocks; +import com.hbm.inventory.RecipesCommon.AStack; +import com.hbm.inventory.RecipesCommon.ComparableStack; +import com.hbm.inventory.RecipesCommon.MetaBlock; +import com.hbm.items.ModItems; +import com.hbm.util.I18nUtil; +import com.hbm.util.InventoryUtil; +import com.hbm.util.Tuple.Pair; + +import api.hbm.block.IToolable; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.material.Material; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; + +public class BlockToolConversion extends BlockBase implements IToolable, ILookOverlay, IBlockMulti { + + public IIcon[] icons; + public String[] names; + + public BlockToolConversion(Material mat) { + super(mat); + } + + public BlockToolConversion addVariant(String... name) { + this.names = name; + return this; + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, List list) { + for(int i = 0; i < getSubCount(); ++i) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { + super.registerBlockIcons(iconRegister); + + if(names != null) { + icons = new IIcon[names.length]; + for(int i = 0; i < names.length; i++) { + icons[i] = iconRegister.registerIcon(getTextureName() + names[i]); + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int metadata) { + + metadata -= 1; + + if(metadata == -1 || icons == null || metadata >= icons.length) { + return super.getIcon(side, metadata); + } + + return icons[metadata]; + } + + @Override + public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) { + + if(world.isRemote) return false; + + Pair result = conversions.get(new Pair(tool, new MetaBlock(this, world.getBlockMetadata(x, y, z)))); + + if(result == null) return false; + + List list = new ArrayList(); + for(AStack stack : result.key) list.add(stack); + + if(list == null || list.isEmpty() || InventoryUtil.doesPlayerHaveAStacks(player, list, true)) { + world.setBlock(x, y, z, result.value.block, result.value.meta, 3); + } + + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public void printHook(Pre event, World world, int x, int y, int z) { + + ItemStack held = Minecraft.getMinecraft().thePlayer.getHeldItem(); + if(held == null) return; + ToolType tool = this.quickLookup(held); + if(tool == null) return; + + Pair result = conversions.get(new Pair(tool, new MetaBlock(this, world.getBlockMetadata(x, y, z)))); + + if(result == null) return; + + List text = new ArrayList(); + text.add(EnumChatFormatting.GOLD + "Requires:"); + List materials = new ArrayList(); + for(AStack stack : result.key) materials.add(stack); + + List tools = tool.stacksForDisplay; + ItemStack displayTool = tools.get((int) (Math.abs(System.currentTimeMillis() / 1000) % tools.size())); + text.add(EnumChatFormatting.BLUE + "- " + displayTool.getDisplayName()); + + for(AStack stack : materials) { + try { + ItemStack display = stack.extractForCyclingDisplay(20); + text.add("- " + display.getDisplayName() + " x" + display.stackSize); + } catch(Exception ex) { + text.add(EnumChatFormatting.RED + "- ERROR"); + } + } + + if(!materials.isEmpty()) { + ILookOverlay.printGeneric(event, I18nUtil.resolveKey(this.getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text); + } + } + + @Override + public int getSubCount() { + return names != null ? names.length + 1 : 1; + } + + public static ToolType quickLookup(ItemStack stack) { + return ToolType.getType(stack); + } + + public static HashMap, Pair> conversions = new HashMap(); + + public static void registerRecipes() { + conversions.put(new Pair(ToolType.BOLT, new MetaBlock(ModBlocks.watz_end, 0)), new Pair(new AStack[] {new ComparableStack(ModItems.bolt_dura_steel, 4)}, new MetaBlock(ModBlocks.watz_end, 1))); + } + + public static HashMap bufferedRecipes = new HashMap(); + public static HashMap bufferedTools = new HashMap(); + + public static HashMap getRecipes(boolean recipes) { + + if(!bufferedRecipes.isEmpty()) return recipes ? bufferedRecipes : bufferedTools; + + for(Entry, Pair> entry : conversions.entrySet()) { + + List list = new ArrayList(); + + for(AStack stack : entry.getValue().getKey()) { + list.add(stack); + } + list.add(new ComparableStack(entry.getKey().getValue().block, 1, entry.getKey().getValue().meta)); + + Object[] inputInstance = list.toArray(new AStack[0]); // the instance has to match for the machine lookup to succeed + bufferedRecipes.put(inputInstance, new ItemStack(entry.getValue().getValue().block, 1, entry.getValue().getValue().meta)); + bufferedTools.put(inputInstance, entry.getKey().getKey().stacksForDisplay.toArray(new ItemStack[0])); + } + + return recipes ? bufferedRecipes : bufferedTools; + } +} diff --git a/src/main/java/com/hbm/handler/nei/NEIUniversalHandler.java b/src/main/java/com/hbm/handler/nei/NEIUniversalHandler.java index b7424e12e..73dca100b 100644 --- a/src/main/java/com/hbm/handler/nei/NEIUniversalHandler.java +++ b/src/main/java/com/hbm/handler/nei/NEIUniversalHandler.java @@ -32,12 +32,19 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler { public final String display; public final ItemStack[] machine; public final HashMap recipes; + public HashMap machineOverrides; /// SETUP /// - + public NEIUniversalHandler(String display, ItemStack machine[], HashMap recipes) { this.display = display; this.machine = machine; this.recipes = recipes; + this.machineOverrides = null; + } + + public NEIUniversalHandler(String display, HashMap recipes, HashMap machines) { + this(display, (ItemStack[]) null, recipes); + this.machineOverrides = machines; } public NEIUniversalHandler(String display, ItemStack machine, HashMap recipes) { this(display, new ItemStack[]{machine}, recipes); } @@ -50,7 +57,7 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler { PositionedStack[] output; PositionedStack machinePositioned; - public RecipeSet(ItemStack[][] in, ItemStack[][] out) { + public RecipeSet(ItemStack[][] in, ItemStack[][] out, Object originalInputInstance /* for custom machine lookup */) { input = new PositionedStack[in.length]; for(int i = 0; i < in.length; i++) { @@ -65,7 +72,17 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler { this.output[i] = new PositionedStack(sub, 102 + i * 18 - ((twos && i > 1) ? 36 : 0), 24 + (twos ? (i < 2 ? -9 : 9) : 0)); } - this.machinePositioned = new PositionedStack(machine, 75, 31); + ItemStack[] m = machine; + + if(NEIUniversalHandler.this.machineOverrides != null) { + Object key = NEIUniversalHandler.this.machineOverrides.get(originalInputInstance); + + if(key != null) { + this.machinePositioned = new PositionedStack(key, 75, 31); + } + } + + if(machinePositioned == null) this.machinePositioned = new PositionedStack(m, 75, 31); } @Override @@ -123,7 +140,7 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler { for(Entry recipe : recipes.entrySet()) { ItemStack[][] ins = InventoryUtil.extractObject(recipe.getKey()); ItemStack[][] outs = InventoryUtil.extractObject(recipe.getValue()); - this.arecipes.add(new RecipeSet(ins, outs)); + this.arecipes.add(new RecipeSet(ins, outs, recipe.getKey())); } } else { @@ -142,7 +159,7 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler { for(ItemStack[] array : outs) { for(ItemStack stack : array) { if(NEIServerUtils.areStacksSameTypeCrafting(stack, result)) { - this.arecipes.add(new RecipeSet(ins, outs)); + this.arecipes.add(new RecipeSet(ins, outs, recipe.getKey())); break match; } } @@ -170,7 +187,7 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler { for(ItemStack[] array : ins) { for(ItemStack stack : array) { if(NEIServerUtils.areStacksSameTypeCrafting(stack, ingredient)) { - this.arecipes.add(new RecipeSet(ins, outs)); + this.arecipes.add(new RecipeSet(ins, outs, recipe.getKey())); break match; } } diff --git a/src/main/java/com/hbm/handler/nei/ToolingHandler.java b/src/main/java/com/hbm/handler/nei/ToolingHandler.java new file mode 100644 index 000000000..c50074f1e --- /dev/null +++ b/src/main/java/com/hbm/handler/nei/ToolingHandler.java @@ -0,0 +1,15 @@ +package com.hbm.handler.nei; + +import com.hbm.blocks.generic.BlockToolConversion; + +public class ToolingHandler extends NEIUniversalHandler { + + public ToolingHandler() { + super("Tooling", BlockToolConversion.getRecipes(true), BlockToolConversion.getRecipes(false)); + } + + @Override + public String getKey() { + return "ntmTooling"; + } +} diff --git a/src/main/java/com/hbm/inventory/RecipesCommon.java b/src/main/java/com/hbm/inventory/RecipesCommon.java index f26af74e1..2b1191f55 100644 --- a/src/main/java/com/hbm/inventory/RecipesCommon.java +++ b/src/main/java/com/hbm/inventory/RecipesCommon.java @@ -455,17 +455,41 @@ public class RecipesCommon { this.block = block; this.meta = meta; } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + Block.blockRegistry.getNameForObject(block).hashCode(); + result = prime * result + meta; + return result; + } + + @Override + public boolean equals(Object obj) { + if(this == obj) + return true; + if(obj == null) + return false; + if(getClass() != obj.getClass()) + return false; + MetaBlock other = (MetaBlock) obj; + if(block == null) { + if(other.block != null) + return false; + } else if(!block.equals(other.block)) + return false; + if(meta != other.meta) + return false; + return true; + } public MetaBlock(Block block) { this(block, 0); } - public int getID() { - final int prime = 31; - int result = 1; - result = prime * result + Block.getIdFromBlock(block); - result = prime * result + meta; - return result; + @Deprecated public int getID() { + return hashCode(); } } diff --git a/src/main/java/com/hbm/items/tool/ItemBlowtorch.java b/src/main/java/com/hbm/items/tool/ItemBlowtorch.java index cb200d6ec..172e0fa4a 100644 --- a/src/main/java/com/hbm/items/tool/ItemBlowtorch.java +++ b/src/main/java/com/hbm/items/tool/ItemBlowtorch.java @@ -31,6 +31,8 @@ public class ItemBlowtorch extends Item implements IFillableItem { this.setMaxStackSize(1); this.setFull3D(); this.setCreativeTab(MainRegistry.controlTab); + + ToolType.TORCH.register(new ItemStack(this)); } @Override diff --git a/src/main/java/com/hbm/items/tool/ItemBoltgun.java b/src/main/java/com/hbm/items/tool/ItemBoltgun.java index e0c1e0999..3a1605028 100644 --- a/src/main/java/com/hbm/items/tool/ItemBoltgun.java +++ b/src/main/java/com/hbm/items/tool/ItemBoltgun.java @@ -26,6 +26,8 @@ public class ItemBoltgun extends Item implements IAnimatedItem { public ItemBoltgun() { this.setMaxStackSize(1); + + ToolType.BOLT.register(new ItemStack(this)); } @Override diff --git a/src/main/java/com/hbm/items/tool/ItemTooling.java b/src/main/java/com/hbm/items/tool/ItemTooling.java index f0c4119da..58bfd687a 100644 --- a/src/main/java/com/hbm/items/tool/ItemTooling.java +++ b/src/main/java/com/hbm/items/tool/ItemTooling.java @@ -18,6 +18,8 @@ public class ItemTooling extends ItemCraftingDegradation { this.type = type; this.setFull3D(); this.setCreativeTab(MainRegistry.controlTab); + + type.register(new ItemStack(this)); } @Override diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index 17d3dae1f..e9908af75 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -46,6 +46,7 @@ import com.google.common.collect.ImmutableList; import com.hbm.blocks.BlockEnums.EnumStoneType; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.generic.BlockMotherOfAllOres; +import com.hbm.blocks.generic.BlockToolConversion; import com.hbm.commands.CommandReloadRecipes; import com.hbm.config.*; import com.hbm.creativetabs.*; @@ -829,6 +830,7 @@ public class MainRegistry { HazmatRegistry.registerHazmats(); FluidContainerRegistry.register(); TileEntityMachineReactorLarge.registerAll(); + BlockToolConversion.registerRecipes(); proxy.registerMissileItems(); diff --git a/src/main/java/com/hbm/main/NEIConfig.java b/src/main/java/com/hbm/main/NEIConfig.java index 29e4cc9de..161af3bea 100644 --- a/src/main/java/com/hbm/main/NEIConfig.java +++ b/src/main/java/com/hbm/main/NEIConfig.java @@ -53,6 +53,7 @@ public class NEIConfig implements IConfigureNEI { registerHandler(new CrucibleSmeltingHandler()); registerHandler(new CrucibleAlloyingHandler()); registerHandler(new CrucibleCastingHandler()); + registerHandler(new ToolingHandler()); //universal boyes registerHandler(new ZirnoxRecipeHandler()); diff --git a/src/main/java/com/hbm/render/tileentity/RenderWatzMultiblock.java b/src/main/java/com/hbm/render/tileentity/RenderWatzMultiblock.java index 973029bf9..51159d7bc 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderWatzMultiblock.java +++ b/src/main/java/com/hbm/render/tileentity/RenderWatzMultiblock.java @@ -44,15 +44,15 @@ public class RenderWatzMultiblock extends TileEntitySpecialRenderer { SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, 1F, i, -2F); SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, -1F, i, -2F); for(int j = -1; j < 2; j++) { - SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, 3F, i, j); - SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, j, i, 3F); - SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, -3F, i, j); - SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, j, i, -3F); + SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 1, 3F, i, j); + SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 1, j, i, 3F); + SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 1, -3F, i, j); + SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 1, j, i, -3F); } - SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, 2F, i, 2F); - SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, 2F, i, -2F); - SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, -2F, i, 2F); - SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, -2F, i, -2F); + SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 1, 2F, i, 2F); + SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 1, 2F, i, -2F); + SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 1, -2F, i, 2F); + SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 1, -2F, i, -2F); } SmallBlockPronter.draw(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityWatzStruct.java b/src/main/java/com/hbm/tileentity/machine/TileEntityWatzStruct.java index f363b5945..10ba21058 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityWatzStruct.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityWatzStruct.java @@ -49,15 +49,15 @@ public class TileEntityWatzStruct extends TileEntity { if(!cbr(ModBlocks.watz_cooler, -1, i, -2)) return; for(int j = -1; j < 2; j++) { - if(!cbr(ModBlocks.watz_end, 3, i, j)) return; - if(!cbr(ModBlocks.watz_end, j, i, 3)) return; - if(!cbr(ModBlocks.watz_end, -3, i, j)) return; - if(!cbr(ModBlocks.watz_end, j, i, -3)) return; + if(!cbr(ModBlocks.watz_end, 1, 3, i, j)) return; + if(!cbr(ModBlocks.watz_end, 1, j, i, 3)) return; + if(!cbr(ModBlocks.watz_end, 1, -3, i, j)) return; + if(!cbr(ModBlocks.watz_end, 1, j, i, -3)) return; } - if(!cbr(ModBlocks.watz_end, 2, i, 2)) return; - if(!cbr(ModBlocks.watz_end, 2, i, -2)) return; - if(!cbr(ModBlocks.watz_end, -2, i, 2)) return; - if(!cbr(ModBlocks.watz_end, -2, i, -2)) return; + if(!cbr(ModBlocks.watz_end, 1, 2, i, 2)) return; + if(!cbr(ModBlocks.watz_end, 1, 2, i, -2)) return; + if(!cbr(ModBlocks.watz_end, 1, -2, i, 2)) return; + if(!cbr(ModBlocks.watz_end, 1, -2, i, -2)) return; } Watz watz = (Watz)ModBlocks.watz; @@ -72,10 +72,18 @@ public class TileEntityWatzStruct extends TileEntity { return worldObj.getBlock(xCoord + x, yCoord + y, zCoord + z); } + /** [G]et [M]eta at [R]elative position */ + private int gmr(int x, int y, int z) { + return worldObj.getBlockMetadata(xCoord + x, yCoord + y, zCoord + z); + } + /** [C]heck [B]lock at [R]elative position */ private boolean cbr(Block b, int x, int y, int z) { return b == gbr(x, y, z); } + private boolean cbr(Block b, int meta, int x, int y, int z) { + return b == gbr(x, y, z) && meta == gmr(x, y, z); + } AxisAlignedBB bb = null; diff --git a/src/main/resources/assets/hbm/textures/blocks/watz_casing_bolted.png b/src/main/resources/assets/hbm/textures/blocks/watz_casing_bolted.png new file mode 100644 index 0000000000000000000000000000000000000000..a52fac3c7ff74fb5497ec382ee1cd17d541608f0 GIT binary patch literal 410 zcmV;L0cHM)P)S(2>_YBz5>t9t!<_rw|4~&{cOpC0H2}A^7_`<;exqHU-)GY)r@HR!`ma0a^U*HP@BJOi&>Cx5FP9vO;%Uv! zd+hoAJH)=Y-+x~$TS|Zc-`8uZrU_G)eq-KPi%L_R_h_vjcOV(!Jxh=w9w+EjFd2{e zSgnGC);hFtxn4VWA{J&KqWDOp1?f3vVk+MAko|WjKL->@;0S+y#{d8T07*qoM6N<$ Ef__-C8vp Date: Fri, 21 Apr 2023 14:39:33 +0200 Subject: [PATCH 9/9] multiblock construction NEI handler (wow!), better bolting --- .../java/com/hbm/blocks/BlockEnumMulti.java | 13 ++ src/main/java/com/hbm/blocks/BlockMulti.java | 4 + src/main/java/com/hbm/blocks/ModBlocks.java | 3 +- .../blocks/generic/BlockToolConversion.java | 27 ++-- .../java/com/hbm/blocks/machine/Watz.java | 22 ++++ .../hbm/handler/nei/ConstructionHandler.java | 59 +++++++++ .../hbm/handler/nei/NEIUniversalHandler.java | 119 ++++++++++++++++-- .../com/hbm/items/block/ItemBlockBase.java | 9 +- .../java/com/hbm/items/tool/ItemBoltgun.java | 47 +++++++ src/main/java/com/hbm/main/NEIConfig.java | 1 + .../hbm/render/item/ItemRenderBoltgun.java | 4 + .../machine/TileEntityWatzStruct.java | 2 +- src/main/resources/assets/hbm/lang/de_DE.lang | 3 + src/main/resources/assets/hbm/lang/en_US.lang | 3 + .../hbm/textures/blocks/watz_cooler_side.png | Bin 0 -> 128 bytes .../hbm/textures/blocks/watz_cooler_top.png | Bin 0 -> 460 bytes .../hbm/textures/models/weapons/boltgun.png | Bin 1069 -> 1148 bytes 17 files changed, 284 insertions(+), 32 deletions(-) create mode 100644 src/main/java/com/hbm/handler/nei/ConstructionHandler.java create mode 100644 src/main/resources/assets/hbm/textures/blocks/watz_cooler_side.png create mode 100644 src/main/resources/assets/hbm/textures/blocks/watz_cooler_top.png diff --git a/src/main/java/com/hbm/blocks/BlockEnumMulti.java b/src/main/java/com/hbm/blocks/BlockEnumMulti.java index bca10f87e..5ee6e4660 100644 --- a/src/main/java/com/hbm/blocks/BlockEnumMulti.java +++ b/src/main/java/com/hbm/blocks/BlockEnumMulti.java @@ -1,9 +1,12 @@ package com.hbm.blocks; +import com.hbm.util.EnumUtil; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; public class BlockEnumMulti extends BlockMulti { @@ -38,6 +41,16 @@ public class BlockEnumMulti extends BlockMulti { } } + public String getUnlocalizedName(ItemStack stack) { + + if(this.multiName) { + Enum num = EnumUtil.grabEnumSafely(this.theEnum, stack.getItemDamage()); + return super.getUnlocalizedName() + "." + num.name().toLowerCase(); + } + + return this.getUnlocalizedName(); + } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta) { diff --git a/src/main/java/com/hbm/blocks/BlockMulti.java b/src/main/java/com/hbm/blocks/BlockMulti.java index 21930f6ff..1741d9316 100644 --- a/src/main/java/com/hbm/blocks/BlockMulti.java +++ b/src/main/java/com/hbm/blocks/BlockMulti.java @@ -31,4 +31,8 @@ public abstract class BlockMulti extends BlockBase implements IBlockMulti { list.add(new ItemStack(item, 1, i)); } } + + public String getUnlocalizedName(ItemStack stack) { + return this.getUnlocalizedName(); + } } diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 08312db55..4e7c82139 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -23,7 +23,6 @@ import com.hbm.main.MainRegistry; import com.hbm.tileentity.DoorDecl; import com.hbm.tileentity.machine.storage.TileEntityFileCabinet; -import api.hbm.block.IToolable.ToolType; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.block.BlockFalling; @@ -1981,7 +1980,7 @@ public class ModBlocks { watz_element = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_element_top").setBlockName("watz_element").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_element_side"); watz_control = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_control_top").setBlockName("watz_control").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_control_side"); - watz_cooler = new BlockGeneric(Material.iron).setBlockName("watz_cooler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_cooler"); + watz_cooler = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_cooler_top").setBlockName("watz_cooler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_cooler_side"); watz_end = new BlockToolConversion(Material.iron).addVariant("_bolted").setBlockName("watz_end").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_casing"); watz_hatch = new WatzHatch(Material.iron).setBlockName("watz_hatch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_hatch"); watz_conductor = new BlockCableConnect(Material.iron).setBlockName("watz_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_conductor_top"); diff --git a/src/main/java/com/hbm/blocks/generic/BlockToolConversion.java b/src/main/java/com/hbm/blocks/generic/BlockToolConversion.java index 5f7314d28..ddb34f66e 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockToolConversion.java +++ b/src/main/java/com/hbm/blocks/generic/BlockToolConversion.java @@ -5,8 +5,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map.Entry; -import com.hbm.blocks.BlockBase; -import com.hbm.blocks.IBlockMulti; +import com.hbm.blocks.BlockMulti; import com.hbm.blocks.ILookOverlay; import com.hbm.blocks.ModBlocks; import com.hbm.inventory.RecipesCommon.AStack; @@ -23,16 +22,14 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; -public class BlockToolConversion extends BlockBase implements IToolable, ILookOverlay, IBlockMulti { +public class BlockToolConversion extends BlockMulti implements IToolable, ILookOverlay { public IIcon[] icons; public String[] names; @@ -45,14 +42,6 @@ public class BlockToolConversion extends BlockBase implements IToolable, ILookOv this.names = name; return this; } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item item, CreativeTabs tab, List list) { - for(int i = 0; i < getSubCount(); ++i) { - list.add(new ItemStack(item, 1, i)); - } - } @Override @SideOnly(Side.CLIENT) @@ -66,6 +55,18 @@ public class BlockToolConversion extends BlockBase implements IToolable, ILookOv } } } + + @Override + public String getUnlocalizedName(ItemStack stack) { + + int meta = stack.getItemDamage() - 1; + + if(meta == -1 || names == null || meta >= names.length) { + return this.getUnlocalizedName(); + } + + return this.getUnlocalizedName() + names[meta]; + } @Override @SideOnly(Side.CLIENT) diff --git a/src/main/java/com/hbm/blocks/machine/Watz.java b/src/main/java/com/hbm/blocks/machine/Watz.java index 46de57e92..8a975bbc2 100644 --- a/src/main/java/com/hbm/blocks/machine/Watz.java +++ b/src/main/java/com/hbm/blocks/machine/Watz.java @@ -1,12 +1,17 @@ package com.hbm.blocks.machine; import com.hbm.blocks.BlockDummyable; +import com.hbm.blocks.ModBlocks; import com.hbm.handler.MultiblockHandlerXR; +import com.hbm.items.ModItems; import com.hbm.tileentity.TileEntityProxyCombo; import com.hbm.tileentity.machine.TileEntityWatz; +import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -71,4 +76,21 @@ public class Watz extends BlockDummyable { this.makeExtra(world, x, y + 2, z - 2); this.makeExtra(world, x, y + 2, z); } + + public static boolean drop = true; + + @Override + public void breakBlock(World world, int x, int y, int z, Block block, int i) { + + if(i >= 12 && drop) { + + world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.watz_end, 48))); + for(int j = 0; j < 3; j++) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.bolt_dura_steel, 64))); + world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.watz_element, 36))); + world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.watz_cooler, 26))); + world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.struct_watz_core, 1))); + } + + super.breakBlock(world, x, y, z, block, i); + } } diff --git a/src/main/java/com/hbm/handler/nei/ConstructionHandler.java b/src/main/java/com/hbm/handler/nei/ConstructionHandler.java new file mode 100644 index 000000000..e6b93517f --- /dev/null +++ b/src/main/java/com/hbm/handler/nei/ConstructionHandler.java @@ -0,0 +1,59 @@ +package com.hbm.handler.nei; + +import java.util.HashMap; + +import com.hbm.blocks.ModBlocks; +import com.hbm.items.ModItems; + +import net.minecraft.item.ItemStack; + +public class ConstructionHandler extends NEIUniversalHandler { + + public ConstructionHandler() { + super("Construction", getRecipes(true), getRecipes(false)); + } + + @Override + public String getKey() { + return "ntmConstruction"; + } + + public static HashMap bufferedRecipes = new HashMap(); + public static HashMap bufferedTools = new HashMap(); + + public static HashMap getRecipes(boolean recipes) { + + if(!bufferedRecipes.isEmpty()) { + return recipes ? bufferedRecipes : bufferedTools; + } + + /* WATZ */ + ItemStack[] watz = new ItemStack[] { + new ItemStack(ModBlocks.watz_end, 48), + new ItemStack(ModItems.bolt_dura_steel, 64), + new ItemStack(ModItems.bolt_dura_steel, 64), + new ItemStack(ModItems.bolt_dura_steel, 64), + new ItemStack(ModBlocks.watz_element, 36), + new ItemStack(ModBlocks.watz_cooler, 26), + new ItemStack(ModItems.boltgun)}; + + bufferedRecipes.put(watz, new ItemStack(ModBlocks.watz)); + bufferedTools.put(watz, new ItemStack(ModBlocks.struct_watz_core)); + + /* ITER */ + ItemStack[] iter = new ItemStack[] { + new ItemStack(ModBlocks.fusion_conductor, 64), + new ItemStack(ModBlocks.fusion_conductor, 64), + new ItemStack(ModBlocks.fusion_conductor, 64), + new ItemStack(ModBlocks.fusion_conductor, 64), + new ItemStack(ModBlocks.fusion_conductor, 36), + new ItemStack(ModBlocks.fusion_center, 64), + new ItemStack(ModBlocks.fusion_motor, 4), + new ItemStack(ModBlocks.reinforced_glass, 8)}; + + bufferedRecipes.put(iter, new ItemStack(ModBlocks.iter)); + bufferedTools.put(iter, new ItemStack(ModBlocks.struct_iter_core)); + + return recipes ? bufferedRecipes : bufferedTools; + } +} diff --git a/src/main/java/com/hbm/handler/nei/NEIUniversalHandler.java b/src/main/java/com/hbm/handler/nei/NEIUniversalHandler.java index 73dca100b..8d5772be4 100644 --- a/src/main/java/com/hbm/handler/nei/NEIUniversalHandler.java +++ b/src/main/java/com/hbm/handler/nei/NEIUniversalHandler.java @@ -60,16 +60,16 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler { public RecipeSet(ItemStack[][] in, ItemStack[][] out, Object originalInputInstance /* for custom machine lookup */) { input = new PositionedStack[in.length]; + int[][] inPos = NEIUniversalHandler.getInputCoords(in.length); for(int i = 0; i < in.length; i++) { ItemStack[] sub = in[i]; - this.input[i] = new PositionedStack(sub, 48 + i * -18, 24); + this.input[i] = new PositionedStack(sub, inPos[i][0], inPos[i][1]); } output = new PositionedStack[out.length]; + int[][] outPos = NEIUniversalHandler.getOutputCoords(out.length); for(int i = 0; i < out.length; i++) { ItemStack[] sub = out[i]; - - boolean twos = out.length > 3; - this.output[i] = new PositionedStack(sub, 102 + i * 18 - ((twos && i > 1) ? 36 : 0), 24 + (twos ? (i < 2 ? -9 : 9) : 0)); + this.output[i] = new PositionedStack(sub, outPos[i][0], outPos[i][1]); } ItemStack[] m = machine; @@ -121,16 +121,115 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler { super.drawBackground(recipe); RecipeSet rec = (RecipeSet) this.arecipes.get(recipe); - - for(int i = 0; i < rec.input.length; i++) - drawTexturedModalRect(47 + i * -18, 23, 5, 87, 18, 18); - for(int i = 0; i < rec.output.length; i++) { - boolean twos = rec.output.length > 3; - drawTexturedModalRect(101 + i * 18 - ((twos && i > 1) ? 36 : 0), 23 + (twos ? (i < 2 ? -9 : 9) : 0), 5, 87, 18, 18); + + int[][] inPos = NEIUniversalHandler.getInputCoords(rec.input.length); + for(int[] pos : inPos) { + drawTexturedModalRect(pos[0] - 1, pos[1] - 1, 5, 87, 18, 18); + } + int[][] outPos = NEIUniversalHandler.getOutputCoords(rec.output.length); + for(int[] pos : outPos) { + drawTexturedModalRect(pos[0] - 1, pos[1] - 1, 5, 87, 18, 18); } drawTexturedModalRect(74, 14, 59, 87, 18, 38); } + + public static int[][] getInputCoords(int count) { + + switch(count) { + case 1: return new int[][] { + {48, 24} + }; + case 2: return new int[][] { + {48, 24}, + {30, 24} + }; + case 3: return new int[][] { + {48, 24}, + {30, 24}, + {12, 24} + }; + case 4: return new int[][] { + {48, 24 - 9}, + {30, 24 - 9}, + {48, 24 + 9}, + {30, 24 + 9} + }; + case 5: return new int[][] { + {48, 24 - 9}, + {30, 24 - 9}, + {12, 24}, + {48, 24 + 9}, + {30, 24 + 9}, + }; + case 6: return new int[][] { + {48, 24 - 9}, + {30, 24 - 9}, + {12, 24 - 9}, + {48, 24 + 9}, + {30, 24 + 9}, + {12, 24 + 9} + }; + case 7: return new int[][] { + {48, 24 - 18}, + {30, 24 - 9}, + {12, 24 - 9}, + {48, 24}, + {30, 24 + 9}, + {12, 24 + 9}, + {48, 24 + 18} + }; + case 8: return new int[][] { + {48, 24 - 18}, + {30, 24 - 18}, + {12, 24 - 9}, + {48, 24}, + {30, 24}, + {12, 24 + 9}, + {48, 24 + 18}, + {30, 24 + 18} + }; + case 9: return new int[][] { + {48, 24 - 18}, + {30, 24 - 18}, + {12, 24 - 18}, + {48, 24}, + {30, 24}, + {12, 24}, + {48, 24 + 18}, + {30, 24 + 18}, + {12, 24 + 18} + }; + } + + return new int[count][2]; + } + + public static int[][] getOutputCoords(int count) { + + switch(count) { + case 1: return new int[][] { + {102, 24} + }; + case 2: return new int[][] { + {102, 24}, + {120, 24} + }; + case 3: return new int[][] { + {102, 24}, + {120, 24}, + {138, 24} + }; + case 4: return new int[][] { + {102, 24 - 9}, + {120, 24 - 9}, + {138 + 36, 24 + 9}, + {156 + 36, 24 + 9} + }; + } + + return new int[count][2]; + } @Override public void loadCraftingRecipes(String outputId, Object... results) { diff --git a/src/main/java/com/hbm/items/block/ItemBlockBase.java b/src/main/java/com/hbm/items/block/ItemBlockBase.java index 04823443b..e04959cff 100644 --- a/src/main/java/com/hbm/items/block/ItemBlockBase.java +++ b/src/main/java/com/hbm/items/block/ItemBlockBase.java @@ -2,12 +2,11 @@ package com.hbm.items.block; import java.util.List; -import com.hbm.blocks.BlockEnumMulti; +import com.hbm.blocks.BlockMulti; import com.hbm.blocks.IBlockMulti; import com.hbm.blocks.IPersistentInfoProvider; import com.hbm.blocks.ITooltipProvider; import com.hbm.tileentity.IPersistentNBT; -import com.hbm.util.EnumUtil; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -41,10 +40,8 @@ public class ItemBlockBase extends ItemBlock { @Override public String getUnlocalizedName(ItemStack stack) { - if(field_150939_a instanceof BlockEnumMulti && ((BlockEnumMulti)field_150939_a).multiName) { - - Enum num = EnumUtil.grabEnumSafely(((BlockEnumMulti)field_150939_a).theEnum, stack.getItemDamage()); - return super.getUnlocalizedName() + "." + num.name().toLowerCase(); + if(field_150939_a instanceof BlockMulti) { + return ((BlockMulti)field_150939_a).getUnlocalizedName(stack); } else { return super.getUnlocalizedName(stack); } diff --git a/src/main/java/com/hbm/items/tool/ItemBoltgun.java b/src/main/java/com/hbm/items/tool/ItemBoltgun.java index 3a1605028..b97fb4b7a 100644 --- a/src/main/java/com/hbm/items/tool/ItemBoltgun.java +++ b/src/main/java/com/hbm/items/tool/ItemBoltgun.java @@ -1,7 +1,10 @@ package com.hbm.items.tool; +import com.hbm.blocks.ModBlocks; import com.hbm.items.IAnimatedItem; +import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; +import com.hbm.main.MainRegistry; import com.hbm.packet.AuxParticlePacketNT; import com.hbm.packet.PacketDispatcher; import com.hbm.render.anim.BusAnimation; @@ -14,11 +17,13 @@ import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -26,6 +31,7 @@ public class ItemBoltgun extends Item implements IAnimatedItem { public ItemBoltgun() { this.setMaxStackSize(1); + this.setCreativeTab(MainRegistry.controlTab); ToolType.BOLT.register(new ItemStack(this)); } @@ -36,6 +42,47 @@ public class ItemBoltgun extends Item implements IAnimatedItem { this.setTextureName(RefStrings.MODID + ":"+ unlocalizedName); return this; } + + @Override + public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) { + + World world = player.worldObj; + if(!entity.isEntityAlive()) return false; + + Item[] bolts = new Item[] { ModItems.bolt_dura_steel, ModItems.bolt_tungsten, Item.getItemFromBlock(ModBlocks.steel_beam) }; + + for(Item item : bolts) { + for(int i = 0; i < player.inventory.getSizeInventory(); i++) { + ItemStack slot = player.inventory.getStackInSlot(i); + + if(slot != null) { + if(slot.getItem() == item) { + if(!world.isRemote) { + player.inventory.decrStackSize(i, 1); + player.inventoryContainer.detectAndSendChanges(); + entity.attackEntityFrom(DamageSource.causePlayerDamage(player).setDamageBypassesArmor(), 10F); + + NBTTagCompound data = new NBTTagCompound(); + data.setString("type", "vanillaExt"); + data.setString("mode", "largeexplode"); + data.setFloat("size", 1F); + data.setByte("count", (byte)1); + PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, entity.posX, entity.posY + entity.height / 2 - entity.yOffset, entity.posZ), new TargetPoint(world.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 50)); + } else { + // doing this on the client outright removes the packet delay and makes the animation silky-smooth + NBTTagCompound d0 = new NBTTagCompound(); + d0.setString("type", "anim"); + d0.setString("mode", "generic"); + MainRegistry.proxy.effectNT(d0); + } + return true; + } + } + } + } + + return false; + } @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float fX, float fY, float fZ) { diff --git a/src/main/java/com/hbm/main/NEIConfig.java b/src/main/java/com/hbm/main/NEIConfig.java index 161af3bea..bbfea592a 100644 --- a/src/main/java/com/hbm/main/NEIConfig.java +++ b/src/main/java/com/hbm/main/NEIConfig.java @@ -54,6 +54,7 @@ public class NEIConfig implements IConfigureNEI { registerHandler(new CrucibleAlloyingHandler()); registerHandler(new CrucibleCastingHandler()); registerHandler(new ToolingHandler()); + registerHandler(new ConstructionHandler()); //universal boyes registerHandler(new ZirnoxRecipeHandler()); diff --git a/src/main/java/com/hbm/render/item/ItemRenderBoltgun.java b/src/main/java/com/hbm/render/item/ItemRenderBoltgun.java index 6ab331111..64d8831e1 100644 --- a/src/main/java/com/hbm/render/item/ItemRenderBoltgun.java +++ b/src/main/java/com/hbm/render/item/ItemRenderBoltgun.java @@ -6,6 +6,7 @@ import com.hbm.main.ResourceManager; import com.hbm.render.anim.HbmAnimations; import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.client.IItemRenderer; @@ -33,6 +34,8 @@ public class ItemRenderBoltgun implements IItemRenderer { GL11.glPushMatrix(); + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + GL11.glEnable(GL11.GL_CULL_FACE); GL11.glShadeModel(GL11.GL_SMOOTH); Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.boltgun_tex); @@ -50,6 +53,7 @@ public class ItemRenderBoltgun implements IItemRenderer { GL11.glPushMatrix(); double[] anim = HbmAnimations.getRelevantTransformation("RECOIL"); GL11.glTranslated(0, 0, -anim[0]); + if(anim[0] != 0) player.isSwingInProgress = false; ResourceManager.boltgun.renderPart("Barrel"); GL11.glPopMatrix(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityWatzStruct.java b/src/main/java/com/hbm/tileentity/machine/TileEntityWatzStruct.java index 10ba21058..e3bb5f800 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityWatzStruct.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityWatzStruct.java @@ -62,7 +62,7 @@ public class TileEntityWatzStruct extends TileEntity { Watz watz = (Watz)ModBlocks.watz; BlockDummyable.safeRem = true; - worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.watz, this.getBlockMetadata() + BlockDummyable.offset, 3); + worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.watz, 12, 3); watz.fillSpace(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, 0); BlockDummyable.safeRem = false; } diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index bc3b244fb..bb2d077b3 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -1205,6 +1205,7 @@ item.bobmazon_weapons.name=Bobmazon: Waffen und Sprengstoffe item.bolt_compound.name=Verstärkte Turbinenwelle item.bolt_dura_steel.name=Schnellarbeitsstahlbolzen item.bolt_tungsten.name=Wolframbolzen +item.boltgun.name=Pneumatische Nietenpistole item.bomb_caller.name=Luftschlag Zielmarker item.bomb_waffle.name=Massenvernichtungswaffel item.guide_book.name=Handbuch @@ -4222,6 +4223,7 @@ tile.struct_launcher_core_large.name=Startrampe-Kernkomponente tile.struct_plasma_core.name=Plasmaerhitzer-Kernkomponente tile.struct_scaffold.name=Startrampe-Gerüstblock tile.struct_soyuz_core.name=Soyuz-Startrampe-Kernkomponente +tile.struct_watz_core.name=Watzkraftwerk-Kernkomponente tile.substation.name=Umspannwerk tile.sulfuric_acid_block.name=Schwefelsäure tile.taint.name=Korrupter Schmutz @@ -4281,6 +4283,7 @@ tile.watz_cooler.name=Watz-Superkühler tile.watz_core.name=Watzreaktorkern tile.watz_element.name=Watzreaktionskammer tile.watz_end.name=Watz-Stabilitätselement +tile.watz_end_bolted.name=Watz-Stabilitätselement (Genietet) tile.watz_hatch.name=Watzreaktorzugriffsluke tile.yellow_barrel.name=Radioaktives Fass tile.zirnox_destroyed.name=Zerstörter ZINOX diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index e8656695b..1585d0491 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -1792,6 +1792,7 @@ item.bobmazon_weapons.name=Bobmazon: Weapons and Explosives item.bolt_compound.name=Reinforced Turbine Shaft item.bolt_dura_steel.name=High-Speed Steel Bolt item.bolt_tungsten.name=Tungsten Bolt +item.boltgun.name=Pneumatic Rivet Gun item.bomb_caller.name=Airstrike Designator item.bomb_waffle.name=Waffle of Mass Destruction item.book_guide.name=Guide Book @@ -5038,6 +5039,7 @@ tile.struct_launcher_core_large.name=Launch Table Core Component tile.struct_plasma_core.name=Plasma Heater Core Component tile.struct_scaffold.name=Launch Pad Scaffold Block tile.struct_soyuz_core.name=Soyuz Launcher Core Component +tile.struct_watz_core.name=Watz Powerplant Core Component tile.substation.name=Substation tile.sulfuric_acid_block.name=Sulfuric Acid tile.taint.name=Taint @@ -5099,6 +5101,7 @@ tile.watz_cooler.name=Watz Reactor Supercooler tile.watz_core.name=Watz Reactor Control tile.watz_element.name=Watz Reaction Chamber tile.watz_end.name=Watz Reactor Stability Element +tile.watz_end_bolted.name=Watz Reactor Stability Element (Riveted) tile.watz_hatch.name=Watz Reactor Access Hatch tile.yellow_barrel.name=Radioactive Barrel tile.zirnox_destroyed.name=Destroyed ZINROX diff --git a/src/main/resources/assets/hbm/textures/blocks/watz_cooler_side.png b/src/main/resources/assets/hbm/textures/blocks/watz_cooler_side.png new file mode 100644 index 0000000000000000000000000000000000000000..346ddad5a9dae1102143c5f84d273eb2542113d3 GIT binary patch literal 128 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfSaRAb{hxPoypTaT1M1P=p) Xf1YMzD&rwfpb-q7u6{1-oD!MUeFiq0}(DOV1k|ZGvL)*bpv)=_kj&C-=D2fUMN-0Ye$1$hP764_PW$3J^ zKZ+s-gFzvu35AphDJk`@jz$0%Z&f;-js*h@heH4y#{s}~U6fMPYBhFWA9D$drfY!W4nyI5QIF5tL5q>mvYJ-zP~D(ljm1!GzK8c^l{pmKJ0gV3xCqFQ&?EC(VZkVj{j0@ZE59kj~ zv)@H$8E3~^=w6oRk9uQVCy?k~M%i}ok1!61K=KVm9=^clbc-JV0000b|;Gk*j#Nkly>6pG5XZ--7_^pbC352jNO=X-IZY%Nd4kkw zu5*=V$TOsJcTMU%feVx_X+nQ_05?`5yFhFTuDEQ3mu1beyTHQyB+E7|AF}?Qoq?HQ z0Eks?mdkYLdEj{-c)p)oPm=@yK)B8%G)aI`3ZIn1!)i6KdVeqr{Al_F5Tpz!RKy8R znm&Q12!bFLEsvtexoNRYu;10sxH3tSX#cL(gjytowsCrT3IG5fA0MU0UteFR005K8 z1a`X}OeT|q^=#R0w=;aE{l=5tj%(c?;szK@ zAx_|2FcpSj&VMOiEEZ|ey7_$Wgs+UqaZadR=6$=ZyzSX^T6*lwaw+`tw)sZDflx)( z=lS_rc=9S^y8w&!ZNWr(KAS0T`?lG@`*y1&R@XT2Q3)ZrR}m^>k#b~38it|tb9Px3 zal6KWMOBHA`xZ?=YQpvG3)yJ^rU-wLQtrPGM|*zeoPdqd0L-aAhL)mFn=^_joIy2TY1PRRKzHJ zCcmkqAQWm3@iZ-}$ge%->;AmB&=M>P6;Vdlb*KUgRZdC>fzfCL?0qyEf$#eV!NQ01US70^W45eijK zCoL*%@ujmOP^fY`X;G*uqfOlR=Nag2ASEK{3BZKAF}D^QlBN-6zbUL;u6E;)Fw-#)ck)Fy%hlF_*jH_3rTRk`iel~(9wpV-$$n8h4&fs@V@ZA<7*wMI8-8KWo~@YBC&SsySF#Xqc8 e1D!VT$M^?V=S4n42-#==0000zi!(w5XQeN@&I{+Oh(6SSu^_uI(VpOqey|i zfKIPa1fH{G$X;mnnxSaMB2(U=c>{K^6ibvv>JQJNtos3hC5k%I_UGgAC@BO*6ayGv z9Tx6`ZJz)VZZbHZ#_oWkv_XZcOoEHCJ1`cRfqCR=*@}TBg?}9u*<0iEL%$@81ZI&p z_{u=B{cGUoDkfBB_Qqx|uCA^s`)_Y=L(J9e0qb6N%m#*^JDl*lS2K#mY(45D?>(qp z=7XOBzG>eMt5Ab5TcP%aZ}wtsT|ZErA=vg);r1k$tx#87_n<2V9zEY;SC6Vge;6hw zRA#OP^G3r?{5r2^ay4J5ugxL=LePh(Fu(!qt zL;vQmnQp_*^cTEes|L-;d0IaH(4FLQRx{^RAQ_3Vzj~W_dsu`aNB-6W6ibrcP>Y_#7 zxDP5+34e(8$#ldy^h>t)nu4r&G>C9jr~(u#J}^^Br*~wzpY1;_`B0YSf-IK-cr7;W z^W$0d_`zmFd5*@Y0uXS%A{`0!s4kM^xZ0Sjug8w%+ed2DPwCXD?nv7|1u9e*X+sjb z?Zwzc1fj{r+)$yquxIcEE{|$iKpNj2N^SF{O@I685BWaYs8C%{LvE=lB(OLNgl$}M74ua$w=_NCjCK=Y_Bi0J5FTbeww z(i!!rE;L4s1{JD{05K}-tUm}UR2S!(N9~zEE%wJiV^kL!qeg>zR2KnaRBoYbkCnmH z?0J8G0Fck6*SO! zcz77}L9Ey7N`JDi#~sHQ9(8oudQulYPdbo`@}tl7(dgsEs2sFKzkTWUB+#MXLMJ~x zDelV`@~pEJ>XJa2sg8C_0+}}HsSeCW_}_>m