From 49a07b6b74367da1f6d00dd6bee45048d767bda3 Mon Sep 17 00:00:00 2001 From: Bob Date: Thu, 6 Jan 2022 00:24:55 +0100 Subject: [PATCH] yeah whatever --- src/main/java/api/hbm/block/IToolable.java | 3 +- src/main/java/com/hbm/blocks/BlockBase.java | 34 ++++ .../com/hbm/blocks/BlockContainerBase.java | 26 +++ src/main/java/com/hbm/blocks/ModBlocks.java | 4 +- .../com/hbm/blocks/bomb/BlockChargeBase.java | 42 +++- .../hbm/blocks/bomb/BlockChargeDynamite.java | 25 ++- .../entity/projectile/EntityBulletBase.java | 21 +- .../container/ContainerMachineShredder.java | 80 ++++---- .../container/ContainerReactorZirnox.java | 27 ++- src/main/java/com/hbm/items/ModItems.java | 8 +- .../com/hbm/items/tool/ItemDetonator.java | 1 - .../hbm/items/tool/ItemLaserDetonator.java | 69 ++++--- .../hbm/items/tool/ItemMultiDetonator.java | 130 +++++++------ src/main/java/com/hbm/lib/Library.java | 8 + src/main/java/com/hbm/main/ClientProxy.java | 9 +- .../java/com/hbm/main/ResourceManager.java | 4 +- .../hbm/render/block/RenderBlockRotated.java | 96 ++++++++++ .../com/hbm/render/block/RenderCrystal.java | 2 +- .../hbm/tileentity/TileEntityProxyBase.java | 36 ++-- .../hbm/models/blocks/charge_dynamite.obj | 181 ++++++++++++++++++ .../hbm/textures/models/trinkets/chip.png | Bin 2498 -> 4075 bytes 21 files changed, 622 insertions(+), 184 deletions(-) create mode 100644 src/main/java/com/hbm/blocks/BlockContainerBase.java create mode 100644 src/main/java/com/hbm/render/block/RenderBlockRotated.java create mode 100644 src/main/resources/assets/hbm/models/blocks/charge_dynamite.obj diff --git a/src/main/java/api/hbm/block/IToolable.java b/src/main/java/api/hbm/block/IToolable.java index 3961d1900..47dfd0f82 100644 --- a/src/main/java/api/hbm/block/IToolable.java +++ b/src/main/java/api/hbm/block/IToolable.java @@ -9,6 +9,7 @@ public interface IToolable { public static enum ToolType { SCREWDRIVER, - HAND_DRILL + HAND_DRILL, + DEFUSER } } diff --git a/src/main/java/com/hbm/blocks/BlockBase.java b/src/main/java/com/hbm/blocks/BlockBase.java index c2aaae871..5487a1731 100644 --- a/src/main/java/com/hbm/blocks/BlockBase.java +++ b/src/main/java/com/hbm/blocks/BlockBase.java @@ -4,7 +4,10 @@ import com.hbm.lib.RefStrings; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemStack; import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; public class BlockBase extends Block { @@ -25,6 +28,10 @@ public class BlockBase extends Block { return this; } + /** + * Daisychainable setter for making the block a beacon base block + * @return + */ public BlockBase setBeaconable() { this.beaconable = true; return this; @@ -34,4 +41,31 @@ public class BlockBase extends Block { public boolean isBeaconBase(IBlockAccess worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) { return this.beaconable; } + + /** + * Sets the block to air and drops it + * @param world + * @param x + * @param y + * @param z + */ + public void dismantle(World world, int x, int y, int z) { + + world.setBlockToAir(x, y, z); + + ItemStack itemstack = new ItemStack(this, 1); + float f = world.rand.nextFloat() * 0.6F + 0.2F; + float f1 = world.rand.nextFloat() * 0.2F; + float f2 = world.rand.nextFloat() * 0.6F + 0.2F; + + EntityItem entityitem = new EntityItem(world, x + f, y + f1 + 1, z + f2, itemstack); + + float f3 = 0.05F; + entityitem.motionX = (float) world.rand.nextGaussian() * f3; + entityitem.motionY = (float) world.rand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float) world.rand.nextGaussian() * f3; + + if(!world.isRemote) + world.spawnEntityInWorld(entityitem); + } } diff --git a/src/main/java/com/hbm/blocks/BlockContainerBase.java b/src/main/java/com/hbm/blocks/BlockContainerBase.java new file mode 100644 index 000000000..3f77aed6a --- /dev/null +++ b/src/main/java/com/hbm/blocks/BlockContainerBase.java @@ -0,0 +1,26 @@ +package com.hbm.blocks; + +import net.minecraft.block.Block; +import net.minecraft.block.ITileEntityProvider; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public abstract class BlockContainerBase extends BlockBase implements ITileEntityProvider { + + protected BlockContainerBase(Material material) { + super(material); + this.isBlockContainer = true; + } + + public void breakBlock(World world, int x, int y, int z, Block block, int meta) { + super.breakBlock(world, x, y, z, block, meta); + world.removeTileEntity(x, y, z); + } + + public boolean onBlockEventReceived(World world, int x, int y, int z, int eventNo, int eventArg) { + super.onBlockEventReceived(world, x, y, z, eventNo, eventArg); + TileEntity tileentity = world.getTileEntity(x, y, z); + return tileentity != null ? tileentity.receiveClientEvent(eventNo, eventArg) : false; + } +} diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 503a66ef7..d61e07c88 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -2662,7 +2662,6 @@ public class ModBlocks { GameRegistry.registerBlock(bomb_multi, bomb_multi.getUnlocalizedName()); GameRegistry.registerBlock(crashed_balefire, crashed_balefire.getUnlocalizedName()); GameRegistry.registerBlock(fireworks, fireworks.getUnlocalizedName()); - //GameRegistry.registerBlock(bomb_multi_large, bomb_multi_large.getUnlocalizedName()); //Turrets GameRegistry.registerBlock(turret_light, turret_light.getUnlocalizedName()); @@ -2684,6 +2683,9 @@ public class ModBlocks { GameRegistry.registerBlock(turret_fritz, turret_fritz.getUnlocalizedName()); GameRegistry.registerBlock(turret_brandon, turret_brandon.getUnlocalizedName()); + //Wall-mounted Explosives + GameRegistry.registerBlock(charge_dynamite, charge_dynamite.getUnlocalizedName()); + //Mines GameRegistry.registerBlock(mine_ap, mine_ap.getUnlocalizedName()); GameRegistry.registerBlock(mine_he, mine_he.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/blocks/bomb/BlockChargeBase.java b/src/main/java/com/hbm/blocks/bomb/BlockChargeBase.java index 51cb28f47..b37f65893 100644 --- a/src/main/java/com/hbm/blocks/bomb/BlockChargeBase.java +++ b/src/main/java/com/hbm/blocks/bomb/BlockChargeBase.java @@ -10,12 +10,16 @@ import static net.minecraftforge.common.util.ForgeDirection.WEST; import com.hbm.blocks.BlockBase; import com.hbm.interfaces.IBomb; +import api.hbm.block.IToolable; +import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -public abstract class BlockChargeBase extends BlockBase implements IBomb { +public abstract class BlockChargeBase extends BlockBase implements IBomb, IToolable { public BlockChargeBase() { super(Material.tnt); @@ -47,8 +51,44 @@ public abstract class BlockChargeBase extends BlockBase implements IBomb { (dir == EAST && world.isSideSolid(x - 1, y, z, EAST)); } + @Override + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + + ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z)); + + if(!world.isSideSolid(x - dir.offsetX, y - dir.offsetY, z - dir.offsetZ, dir)) { + world.setBlockToAir(x, y, z); + this.explode(world, x, y, z); + } + } + @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { return null; } + + @Override + public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { + + float f = 0.0625F; + + switch(world.getBlockMetadata(x, y, z)) { + case 0: this.setBlockBounds(0.0F, 10 * f, 0.0F, 1.0F, 1.0F, 1.0F); break; + case 1: this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 6 * f, 1.0F); break; + case 2: this.setBlockBounds(0.0F, 0.0F, 10 * f, 1.0F, 1.0F, 1.0F); break; + case 3: this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 6 * f); break; + case 4: this.setBlockBounds(10 * f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); break; + case 5: this.setBlockBounds(0.0F, 0.0F, 0.0F, 6 * f, 1.0F, 1.0F); break; + } + } + + + 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.DEFUSER) + return false; + + this.dismantle(world, x, y, z); + return true; + } } diff --git a/src/main/java/com/hbm/blocks/bomb/BlockChargeDynamite.java b/src/main/java/com/hbm/blocks/bomb/BlockChargeDynamite.java index dfa2b9ce9..c14f61a95 100644 --- a/src/main/java/com/hbm/blocks/bomb/BlockChargeDynamite.java +++ b/src/main/java/com/hbm/blocks/bomb/BlockChargeDynamite.java @@ -1,11 +1,34 @@ package com.hbm.blocks.bomb; +import com.hbm.explosion.ExplosionLarge; +import com.hbm.explosion.ExplosionNT; +import com.hbm.explosion.ExplosionNT.ExAttrib; + +import cpw.mods.fml.client.registry.RenderingRegistry; import net.minecraft.world.World; public class BlockChargeDynamite extends BlockChargeBase { @Override public BombReturnCode explode(World world, int x, int y, int z) { - return null; + + if(!world.isRemote) { + + world.setBlockToAir(x, y, z); + ExplosionNT exp = new ExplosionNT(world, null, x + 0.5, y + 0.5, z + 0.5, 6F); + exp.explode(); + ExplosionLarge.spawnParticles(world, x + 0.5, y + 0.5, z + 0.5, 25); + + return BombReturnCode.DETONATED; + } + + return BombReturnCode.UNDEFINED; + } + + public static int renderID = RenderingRegistry.getNextAvailableRenderId(); + + @Override + public int getRenderType() { + return renderID; } } diff --git a/src/main/java/com/hbm/entity/projectile/EntityBulletBase.java b/src/main/java/com/hbm/entity/projectile/EntityBulletBase.java index 5662bcc4e..ef9559883 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityBulletBase.java +++ b/src/main/java/com/hbm/entity/projectile/EntityBulletBase.java @@ -5,18 +5,15 @@ import java.util.List; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.generic.RedBarrel; -import com.hbm.config.BombConfig; import com.hbm.entity.effect.EntityCloudFleijaRainbow; import com.hbm.entity.effect.EntityEMPBlast; import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.entity.logic.EntityNukeExplosionMK4; -import com.hbm.entity.particle.EntityTSmokeFX; import com.hbm.explosion.ExplosionChaos; import com.hbm.explosion.ExplosionLarge; import com.hbm.explosion.ExplosionNukeGeneric; import com.hbm.handler.BulletConfigSyncingUtil; import com.hbm.handler.BulletConfiguration; -import com.hbm.lib.ModDamageSource; import com.hbm.main.MainRegistry; import com.hbm.packet.AuxParticlePacketNT; import com.hbm.packet.PacketDispatcher; @@ -38,6 +35,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; +import net.minecraft.util.EntityDamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; @@ -133,6 +131,23 @@ public class EntityBulletBase extends Entity implements IProjectile { this.dataWatcher.updateObject(16, (byte)this.config.style); this.dataWatcher.updateObject(17, (byte)this.config.trail); } + + public boolean attackEntityFrom(DamageSource source, float amount) { + + this.setBeenAttacked(); + + if(source instanceof EntityDamageSource) { + EntityDamageSource dmg = (EntityDamageSource) source; + + if(dmg.damageType.equals("player")) { + this.motionX *= -1.5; + this.motionY *= -1.5; + this.motionZ *= -1.5; + return true; + } + } + return false; + } @Override public void setThrowableHeading(double moX, double moY, double moZ, float mult1, float mult2) { diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineShredder.java b/src/main/java/com/hbm/inventory/container/ContainerMachineShredder.java index bfaa4d891..af6ebbf4a 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineShredder.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineShredder.java @@ -11,14 +11,14 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class ContainerMachineShredder extends Container { - + private TileEntityMachineShredder diFurnace; private int progress; - + public ContainerMachineShredder(InventoryPlayer invPlayer, TileEntityMachineShredder tedf) { - + diFurnace = tedf; - + this.addSlotToContainer(new Slot(tedf, 0, 44, 18)); this.addSlotToContainer(new Slot(tedf, 1, 62, 18)); this.addSlotToContainer(new Slot(tedf, 2, 80, 18)); @@ -49,90 +49,76 @@ public class ContainerMachineShredder extends Container { this.addSlotToContainer(new Slot(tedf, 27, 44, 108)); this.addSlotToContainer(new Slot(tedf, 28, 80, 108)); this.addSlotToContainer(new Slot(tedf, 29, 8, 108)); - - for(int i = 0; i < 3; i++) - { - for(int j = 0; j < 9; j++) - { + + for(int i = 0; i < 3; i++) { + for(int j = 0; j < 9; j++) { this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56)); } } - - for(int i = 0; i < 9; i++) - { + + for(int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56)); } } - + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 1, this.diFurnace.progress); } - + @Override - public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) - { + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) { ItemStack var3 = null; Slot var4 = (Slot) this.inventorySlots.get(par2); - - if (var4 != null && var4.getHasStack()) - { + + if(var4 != null && var4.getHasStack()) { ItemStack var5 = var4.getStack(); var3 = var5.copy(); - - if (par2 <= 29) { - if (!this.mergeItemStack(var5, 30, this.inventorySlots.size(), true)) - { + + if(par2 <= 29) { + if(!this.mergeItemStack(var5, 30, this.inventorySlots.size(), true)) { return null; } - } - else - { - if (!this.mergeItemStack(var5, 0, 9, false)) - if (!this.mergeItemStack(var5, 27, 30, false)) + } else { + if(!this.mergeItemStack(var5, 0, 9, false)) + if(!this.mergeItemStack(var5, 27, 30, false)) return null; } - - if (var5.stackSize == 0) - { + + if(var5.stackSize == 0) { var4.putStack((ItemStack) null); - } - else - { + } else { var4.onSlotChanged(); } } - + return var3; - } + } @Override public boolean canInteractWith(EntityPlayer player) { return diFurnace.isUseableByPlayer(player); } - + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); - - for(int i = 0; i < this.crafters.size(); i++) - { - ICrafting par1 = (ICrafting)this.crafters.get(i); - - if(this.progress != this.diFurnace.progress) - { + + for(int i = 0; i < this.crafters.size(); i++) { + ICrafting par1 = (ICrafting) this.crafters.get(i); + + if(this.progress != this.diFurnace.progress) { par1.sendProgressBarUpdate(this, 1, this.diFurnace.progress); } } this.progress = this.diFurnace.progress; } - + @Override public void updateProgressBar(int i, int j) { - if(i == 1) - { + if(i == 1) { diFurnace.progress = j; } } diff --git a/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java b/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java index 73b2dba28..0acad28ca 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java +++ b/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java @@ -19,7 +19,7 @@ public class ContainerReactorZirnox extends Container { public ContainerReactorZirnox(InventoryPlayer invPlayer, TileEntityReactorZirnox te) { zirnox = te; - //Rods + // Rods this.addSlotToContainer(new Slot(te, 0, 26, 16)); this.addSlotToContainer(new Slot(te, 1, 62, 16)); this.addSlotToContainer(new Slot(te, 2, 98, 16)); @@ -45,38 +45,35 @@ public class ContainerReactorZirnox extends Container { this.addSlotToContainer(new Slot(te, 22, 62, 124)); this.addSlotToContainer(new Slot(te, 23, 98, 124)); - //Fluid IO + // Fluid IO this.addSlotToContainer(new Slot(te, 24, 143, 124)); this.addSlotToContainer(new SlotMachineOutput(te, 26, 143, 142)); this.addSlotToContainer(new Slot(te, 25, 179, 124)); this.addSlotToContainer(new SlotMachineOutput(te, 27, 179, 142)); - for(int i = 0; i < 3; i++) - { - for(int j = 0; j < 9; j++) - { + for(int i = 0; i < 3; i++) { + for(int j = 0; j < 9; j++) { this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 90)); } } - for(int i = 0; i < 9; i++) - { + for(int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 232)); } } @Override - public ItemStack transferStackInSlot(EntityPlayer player, int index) { + public ItemStack transferStackInSlot(EntityPlayer player, int index) { ItemStack var3 = null; Slot slot = (Slot) this.inventorySlots.get(index); - if (slot != null && slot.getHasStack()) { + if(slot != null && slot.getHasStack()) { ItemStack stack = slot.getStack(); var3 = stack.copy(); - if (index <= 27) { - if (!this.mergeItemStack(stack, 28, this.inventorySlots.size(), true)) { + if(index <= 27) { + if(!this.mergeItemStack(stack, 28, this.inventorySlots.size(), true)) { return null; } } else { @@ -89,7 +86,7 @@ public class ContainerReactorZirnox extends Container { if(!this.mergeItemStack(stack, 25, 26, true)) return null; - } else { + } else { if(stack.getItem() instanceof ItemZirnoxRod) { @@ -99,7 +96,7 @@ public class ContainerReactorZirnox extends Container { } } - if (stack.stackSize == 0) { + if(stack.stackSize == 0) { slot.putStack((ItemStack) null); } else { slot.onSlotChanged(); @@ -107,7 +104,7 @@ public class ContainerReactorZirnox extends Container { } return var3; - } + } @Override public boolean canInteractWith(EntityPlayer player) { diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index ea9dd5937..88b3f673f 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -3324,17 +3324,17 @@ public class ModItems { radaway = new ItemSimpleConsumable().setUseActionServer((stack, user) -> { ItemSimpleConsumable.giveSoundAndDecrement(stack, user, "hbm:item.radaway", new ItemStack(ModItems.iv_empty)); - user.addPotionEffect(new PotionEffect(HbmPotion.radaway.id, 14, 9)); + ItemSimpleConsumable.addPotionEffect(user, HbmPotion.radaway, 140, 0); }).setUnlocalizedName("radaway").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radaway"); radaway_strong = new ItemSimpleConsumable().setUseActionServer((stack, user) -> { ItemSimpleConsumable.giveSoundAndDecrement(stack, user, "hbm:item.radaway", new ItemStack(ModItems.iv_empty)); - ItemSimpleConsumable.addPotionEffect(user, HbmPotion.radaway, 14, 9); + ItemSimpleConsumable.addPotionEffect(user, HbmPotion.radaway, 350, 0); }).setUnlocalizedName("radaway_strong").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radaway_strong"); radaway_flush = new ItemSimpleConsumable().setUseActionServer((stack, user) -> { ItemSimpleConsumable.giveSoundAndDecrement(stack, user, "hbm:item.radaway", new ItemStack(ModItems.iv_empty)); - ItemSimpleConsumable.addPotionEffect(user, HbmPotion.radaway, 50, 19); + ItemSimpleConsumable.addPotionEffect(user, HbmPotion.radaway, 500, 2); }).setUnlocalizedName("radaway_flush").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radaway_flush"); med_bag = new ItemSyringe().setUnlocalizedName("med_bag").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":med_bag"); @@ -4487,7 +4487,7 @@ public class ModItems { cheese = new ItemLemon(5, 10, false).setUnlocalizedName("cheese").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cheese"); mucho_mango = new ItemMuchoMango(10).setUnlocalizedName("mucho_mango").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":mucho_mango"); - defuser = new Item().setUnlocalizedName("defuser").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":defuser"); + defuser = new ItemTooling(ToolType.DEFUSER, 100).setUnlocalizedName("defuser").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":defuser"); reacher = new Item().setUnlocalizedName("reacher").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":reacher"); bismuth_tool = new ItemAmatExtractor().setUnlocalizedName("bismuth_tool").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":bismuth_tool"); meltdown_tool = new ItemDyatlov().setUnlocalizedName("meltdown_tool").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":meltdown_tool"); diff --git a/src/main/java/com/hbm/items/tool/ItemDetonator.java b/src/main/java/com/hbm/items/tool/ItemDetonator.java index c6e5530ca..201f60c5a 100644 --- a/src/main/java/com/hbm/items/tool/ItemDetonator.java +++ b/src/main/java/com/hbm/items/tool/ItemDetonator.java @@ -14,7 +14,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; diff --git a/src/main/java/com/hbm/items/tool/ItemLaserDetonator.java b/src/main/java/com/hbm/items/tool/ItemLaserDetonator.java index 6df66aaa0..7f8f244eb 100644 --- a/src/main/java/com/hbm/items/tool/ItemLaserDetonator.java +++ b/src/main/java/com/hbm/items/tool/ItemLaserDetonator.java @@ -6,49 +6,68 @@ import org.apache.logging.log4j.Level; import com.hbm.config.GeneralConfig; import com.hbm.interfaces.IBomb; +import com.hbm.interfaces.IBomb.BombReturnCode; import com.hbm.lib.Library; import com.hbm.main.MainRegistry; +import com.hbm.util.ChatBuilder; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; import net.minecraft.world.World; public class ItemLaserDetonator extends Item { - + @Override - public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) - { + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { list.add("Aim & click to detonate!"); } - + @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + MovingObjectPosition pos = Library.rayTrace(player, 500, 1); int x = pos.blockX; int y = pos.blockY; int z = pos.blockZ; - - - if(!world.isRemote) - { - if(world.getBlock(x, y, z) instanceof IBomb) { - ((IBomb)world.getBlock(x, y, z)).explode(world, x, y, z); - if(GeneralConfig.enableExtendedLogging) - MainRegistry.logger.log(Level.INFO, "[DET] Tried to detonate block at " + x + " / " + y + " / " + z + " by " + player.getDisplayName() + "!"); - - player.addChatMessage(new ChatComponentText("Detonated!")); - world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F); - } else { - player.addChatMessage(new ChatComponentText("Target can not be detonated.")); - world.playSoundAtEntity(player, "hbm:item.techBoop", 1.0F, 1.0F); - } + if(!world.isRemote) { + if(world.getBlock(x, y, z) instanceof IBomb) { + BombReturnCode ret = ((IBomb) world.getBlock(x, y, z)).explode(world, x, y, z); + + if(GeneralConfig.enableExtendedLogging) + MainRegistry.logger.log(Level.INFO, "[DET] Tried to detonate block at " + x + " / " + y + " / " + z + " by " + player.getDisplayName() + "!"); + + world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F); + + player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA) + .nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA) + .next("] ").color(EnumChatFormatting.DARK_AQUA) + .nextTranslation(ret.getUnlocalizedMessage()).color(ret.wasSuccessful() ? EnumChatFormatting.YELLOW : EnumChatFormatting.RED).flush()); + + } else { + world.playSoundAtEntity(player, "hbm:item.techBoop", 1.0F, 1.0F); + + player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA) + .nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA) + .next("] ").color(EnumChatFormatting.DARK_AQUA) + .nextTranslation(BombReturnCode.ERROR_NO_BOMB.getUnlocalizedMessage()).color(EnumChatFormatting.RED).flush()); + } + } else { + + Vec3 vec = Vec3.createVectorHelper(x + 0.5 - player.posX, y + 0.5 - player.posY, z + 0.5 - player.posZ); + double len = Math.min(vec.lengthVector(), 15D); + vec = vec.normalize(); + + for(int i = 0; i < len; i++) { + double rand = world.rand.nextDouble() * len + 3; + world.spawnParticle("reddust", player.posX + vec.xCoord * rand, player.posY + vec.yCoord * rand, player.posZ + vec.zCoord * rand, 0, 0, 0); + } } - - return stack; - } + + return stack; + } } diff --git a/src/main/java/com/hbm/items/tool/ItemMultiDetonator.java b/src/main/java/com/hbm/items/tool/ItemMultiDetonator.java index 68945f835..321c87e42 100644 --- a/src/main/java/com/hbm/items/tool/ItemMultiDetonator.java +++ b/src/main/java/com/hbm/items/tool/ItemMultiDetonator.java @@ -7,135 +7,147 @@ import org.apache.logging.log4j.Level; import com.hbm.config.GeneralConfig; import com.hbm.interfaces.IBomb; +import com.hbm.interfaces.IBomb.BombReturnCode; import com.hbm.main.MainRegistry; +import com.hbm.util.ChatBuilder; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; public class ItemMultiDetonator extends Item { @Override - public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) - { + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { list.add("Shift right-click block to add position,"); list.add("right-click to detonate!"); list.add("Shift right-click in the air to clear postitions."); - - if(itemstack.getTagCompound() == null || getLocations(itemstack) == null) - { - list.add("No position set!"); + + if(itemstack.getTagCompound() == null || getLocations(itemstack) == null) { + list.add(EnumChatFormatting.RED + "No position set!"); } else { - + int[][] locs = getLocations(itemstack); - + for(int i = 0; i < locs[0].length; i++) { - list.add(locs[0][i] + " / " + locs[1][i] + " / " + locs[2][i]); + list.add(EnumChatFormatting.YELLOW + "" + locs[0][i] + " / " + locs[1][i] + " / " + locs[2][i]); } } } - + @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) - { - if(stack.stackTagCompound == null) - { + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) { + if(stack.stackTagCompound == null) { stack.stackTagCompound = new NBTTagCompound(); } - - if(player.isSneaking()) - { + + if(player.isSneaking()) { addLocation(stack, x, y, z); - - if(world.isRemote) - { - player.addChatMessage(new ChatComponentText("Position added!")); + + if(!world.isRemote) { + player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA) + .nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA) + .next("] ").color(EnumChatFormatting.DARK_AQUA) + .next("Position added!").color(EnumChatFormatting.GREEN).flush()); } - - world.playSoundAtEntity(player, "hbm:item.techBoop", 2.0F, 1.0F); - + + world.playSoundAtEntity(player, "hbm:item.techBoop", 2.0F, 1.0F); + return true; } - + return false; - } + } @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - if(stack.stackTagCompound == null || getLocations(stack) == null) - { - if(world.isRemote) - player.addChatMessage(new ChatComponentText("Error: Position not set.")); + if(stack.stackTagCompound == null || getLocations(stack) == null) { + + if(!world.isRemote) { + player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA) + .nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA) + .next("] ").color(EnumChatFormatting.DARK_AQUA) + .next("No position set!").color(EnumChatFormatting.RED).flush()); + } } else { - + if(!player.isSneaking()) { int[][] locs = getLocations(stack); - + int succ = 0; - - for (int i = 0; i < locs[0].length; i++) { - + + for(int i = 0; i < locs[0].length; i++) { + int x = locs[0][i]; int y = locs[1][i]; int z = locs[2][i]; - - if (world.getBlock(x, y, z) instanceof IBomb) { - world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F); - if (!world.isRemote) { - ((IBomb) world.getBlock(x, y, z)).explode(world, x, y, z); - if(GeneralConfig.enableExtendedLogging) - MainRegistry.logger.log(Level.INFO, "[DET] Tried to detonate block at " + x + " / " + y + " / " + z + " by " + player.getDisplayName() + "!"); - } + if(world.getBlock(x, y, z) instanceof IBomb) { - succ++; + if(!world.isRemote) { + BombReturnCode ret = ((IBomb) world.getBlock(x, y, z)).explode(world, x, y, z); + + if(ret.wasSuccessful()) + succ++; + + if(GeneralConfig.enableExtendedLogging) + MainRegistry.logger.log(Level.INFO, "[DET] Tried to detonate block at " + x + " / " + y + " / " + z + " by " + player.getDisplayName() + "!"); + } } } - if (world.isRemote) { - player.addChatMessage(new ChatComponentText("Detonated! (" + succ + "/" + locs[0].length + ")")); + world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F); + + if(!world.isRemote) { + player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA) + .nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA) + .next("] ").color(EnumChatFormatting.DARK_AQUA) + .next("Triggered " + succ + "/" + locs[0].length + "!").color(EnumChatFormatting.YELLOW).flush()); } + } else { stack.stackTagCompound.setIntArray("xValues", new int[0]); stack.stackTagCompound.setIntArray("yValues", new int[0]); stack.stackTagCompound.setIntArray("zValues", new int[0]); + + world.playSoundAtEntity(player, "hbm:item.techBoop", 2.0F, 1.0F); - world.playSoundAtEntity(player, "hbm:item.techBoop", 2.0F, 1.0F); - - if(world.isRemote) - { - player.addChatMessage(new ChatComponentText("All positions removed.")); + if(!world.isRemote) { + player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA) + .nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA) + .next("] ").color(EnumChatFormatting.DARK_AQUA) + .next("Locations cleared!").color(EnumChatFormatting.RED).flush()); } } } - + return stack; - + } - + private static void addLocation(ItemStack stack, int x, int y, int z) { - if(stack.stackTagCompound == null) - { + if(stack.stackTagCompound == null) { stack.stackTagCompound = new NBTTagCompound(); } int[] xs = stack.stackTagCompound.getIntArray("xValues"); int[] ys = stack.stackTagCompound.getIntArray("yValues"); int[] zs = stack.stackTagCompound.getIntArray("zValues"); - + stack.stackTagCompound.setIntArray("xValues", ArrayUtils.add(xs, x)); stack.stackTagCompound.setIntArray("yValues", ArrayUtils.add(ys, y)); stack.stackTagCompound.setIntArray("zValues", ArrayUtils.add(zs, z)); } - + private static int[][] getLocations(ItemStack stack) { int[] xs = stack.stackTagCompound.getIntArray("xValues"); @@ -145,7 +157,7 @@ public class ItemMultiDetonator extends Item { if(xs == null || ys == null || zs == null || xs.length == 0 || ys.length == 0 || zs.length == 0) { return null; } - + return new int[][] { xs, ys, zs }; } } diff --git a/src/main/java/com/hbm/lib/Library.java b/src/main/java/com/hbm/lib/Library.java index db0f3e45b..b2e14fac0 100644 --- a/src/main/java/com/hbm/lib/Library.java +++ b/src/main/java/com/hbm/lib/Library.java @@ -16,6 +16,7 @@ import com.hbm.interfaces.IFluidDuct; import com.hbm.interfaces.IFluidSource; import com.hbm.interfaces.Spaghetti; import com.hbm.items.ModItems; +import com.hbm.tileentity.TileEntityProxyBase; import com.hbm.tileentity.TileEntityProxyInventory; import com.hbm.tileentity.conductor.TileEntityFluidDuct; import com.hbm.tileentity.conductor.TileEntityGasDuct; @@ -531,6 +532,13 @@ public class Library { if(tileentity == that) tileentity = null; + if(tileentity instanceof TileEntityProxyBase) { + TileEntityProxyBase proxy = (TileEntityProxyBase) tileentity; + + if(proxy.getTE() == that) + tileentity = null; + } + if(tileentity instanceof IFluidDuct) { if(tileentity instanceof TileEntityFluidDuct && ((TileEntityFluidDuct)tileentity).type.name().equals(type.name())) diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index ca6cc9532..de46c9abf 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -54,7 +54,6 @@ import com.hbm.entity.projectile.*; import com.hbm.handler.HbmKeybinds; import com.hbm.handler.HbmKeybinds.EnumKeybind; import com.hbm.items.ModItems; -import com.hbm.items.tool.ItemSwordMeteorite; import com.hbm.particle.*; import com.hbm.render.anim.*; import com.hbm.render.anim.HbmAnimations.Animation; @@ -291,9 +290,9 @@ public class ClientProxy extends ServerProxy { MinecraftForgeClient.registerItemRenderer(ModItems.cmb_sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir)); MinecraftForgeClient.registerItemRenderer(ModItems.dnt_sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir)); - for(ItemSwordMeteorite sword : ItemSwordMeteorite.swords) { - // MinecraftForgeClient.registerItemRenderer(sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir)); - } + /*for(ItemSwordMeteorite sword : ItemSwordMeteorite.swords) { + MinecraftForgeClient.registerItemRenderer(sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir)); + }*/ //test crap @@ -628,6 +627,8 @@ public class ClientProxy extends ServerProxy { RenderingRegistry.registerBlockHandler(new RenderTestCable()); RenderingRegistry.registerBlockHandler(new RenderBlockCT()); + RenderingRegistry.registerBlockHandler(new RenderBlockRotated(ModBlocks.charge_dynamite.getRenderType(), ResourceManager.charge_dynamite)); + RenderingRegistry.registerBlockHandler(new RenderRBMKRod()); RenderingRegistry.registerBlockHandler(new RenderRBMKReflector()); RenderingRegistry.registerBlockHandler(new RenderRBMKControl()); diff --git a/src/main/java/com/hbm/main/ResourceManager.java b/src/main/java/com/hbm/main/ResourceManager.java index 836b30e20..02aab1bb8 100644 --- a/src/main/java/com/hbm/main/ResourceManager.java +++ b/src/main/java/com/hbm/main/ResourceManager.java @@ -2,8 +2,6 @@ package com.hbm.main; import com.hbm.lib.RefStrings; import com.hbm.render.loader.HFRWavefrontObject; -import com.hbm.render.shader.Shader; -import com.hbm.render.shader.ShaderManager; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.AdvancedModelLoader; @@ -1131,6 +1129,8 @@ public class ResourceManager { public static final IModelCustom crystal_robust = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/crystals_robust.obj")); public static final IModelCustom crystal_trixite = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/crystals_trixite.obj")); public static final IModelCustom cable_neo = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/cable_neo.obj")); + + public static final IModelCustom charge_dynamite = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/charge_dynamite.obj")); //RBMK DEBRIS public static final IModelCustom deb_blank = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/projectiles/deb_blank.obj")); diff --git a/src/main/java/com/hbm/render/block/RenderBlockRotated.java b/src/main/java/com/hbm/render/block/RenderBlockRotated.java new file mode 100644 index 000000000..09e448467 --- /dev/null +++ b/src/main/java/com/hbm/render/block/RenderBlockRotated.java @@ -0,0 +1,96 @@ +package com.hbm.render.block; + +import org.lwjgl.opengl.GL11; + +import com.hbm.render.util.ObjUtil; + +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.client.model.IModelCustom; +import net.minecraftforge.client.model.obj.WavefrontObject; + +public class RenderBlockRotated implements ISimpleBlockRenderingHandler { + + private int renderID; + private IModelCustom model; + + public RenderBlockRotated(int renderType, IModelCustom IModelCustom) { + this.renderID = renderType; + this.model = IModelCustom; + } + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { + + GL11.glPushMatrix(); + Tessellator tessellator = Tessellator.instance; + IIcon iicon = block.getIcon(0, 0); + tessellator.setColorOpaque_F(1, 1, 1); + + if(renderer.hasOverrideBlockTexture()) { + iicon = renderer.overrideBlockTexture; + } + + GL11.glRotated(180, 0, 1, 0); + tessellator.startDrawingQuads(); + ObjUtil.renderWithIcon((WavefrontObject) model, iicon, tessellator, 0, false); + tessellator.draw(); + + GL11.glPopMatrix(); + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + + Tessellator tessellator = Tessellator.instance; + IIcon iicon = block.getIcon(0, 0); + tessellator.setColorOpaque_F(1, 1, 1); + + if(renderer.hasOverrideBlockTexture()) { + iicon = renderer.overrideBlockTexture; + } + + tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); + tessellator.setColorOpaque_F(1, 1, 1); + + float flip = 0; + float rotation = 0; + + int meta = world.getBlockMetadata(x, y, z); + + if(meta == 0) + flip = (float)Math.PI; + + if(meta == 2) + rotation = 90F / 180F * (float) Math.PI; + + if(meta == 3) + rotation = 270F / 180F * (float) Math.PI; + + if(meta == 4) + rotation = 180F / 180F * (float)Math.PI; + + if(rotation != 0F || meta == 5) + flip = (float)Math.PI * 0.5F; + + tessellator.addTranslation(x + 0.5F, y + 0.5F, z + 0.5F); + ObjUtil.renderWithIcon((WavefrontObject) model, iicon, tessellator, rotation, flip, true); + tessellator.addTranslation(-x - 0.5F, -y - 0.5F, -z - 0.5F); + + return true; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return this.renderID; + } +} diff --git a/src/main/java/com/hbm/render/block/RenderCrystal.java b/src/main/java/com/hbm/render/block/RenderCrystal.java index e347227b0..6cf4f830d 100644 --- a/src/main/java/com/hbm/render/block/RenderCrystal.java +++ b/src/main/java/com/hbm/render/block/RenderCrystal.java @@ -77,7 +77,7 @@ public class RenderCrystal implements ISimpleBlockRenderingHandler { if(meta == 4) rotation = 180F / 180F * (float)Math.PI; - if(rotation != 0F) + if(rotation != 0F || meta == 5) flip = (float)Math.PI * 0.5F; tessellator.addTranslation(x + 0.5F, y + 0.5F, z + 0.5F); diff --git a/src/main/java/com/hbm/tileentity/TileEntityProxyBase.java b/src/main/java/com/hbm/tileentity/TileEntityProxyBase.java index 5a05b0f55..232f38ea3 100644 --- a/src/main/java/com/hbm/tileentity/TileEntityProxyBase.java +++ b/src/main/java/com/hbm/tileentity/TileEntityProxyBase.java @@ -9,45 +9,43 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; public class TileEntityProxyBase extends TileEntity { - - public boolean canUpdate() - { - return false; - } + + public boolean canUpdate() { + return false; + } public TileEntity getTE() { - + if(this.getBlockType() instanceof BlockDummyable) { - - BlockDummyable dummy = (BlockDummyable)this.getBlockType(); - + + BlockDummyable dummy = (BlockDummyable) this.getBlockType(); + int[] pos = dummy.findCore(worldObj, xCoord, yCoord, zCoord); - + if(pos != null) { - + TileEntity te = worldObj.getTileEntity(pos[0], pos[1], pos[2]); - + if(te != null) return te; } } - - - /// this spares me the hassle of registering a new child class TE that aims at the right target /// - + + /// this spares me the hassle of registering a new child class TE that + /// aims at the right target /// + if(this.getBlockType() instanceof BlockHadronAccess) { ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata()); - for(int i = 1; i < 3; i++) { TileEntity te = worldObj.getTileEntity(xCoord + dir.offsetX * i, yCoord + dir.offsetY * i, zCoord + dir.offsetZ * i); - + if(te instanceof TileEntityHadron) { return te; } } } - + return null; } } diff --git a/src/main/resources/assets/hbm/models/blocks/charge_dynamite.obj b/src/main/resources/assets/hbm/models/blocks/charge_dynamite.obj new file mode 100644 index 000000000..7837bd8d1 --- /dev/null +++ b/src/main/resources/assets/hbm/models/blocks/charge_dynamite.obj @@ -0,0 +1,181 @@ +# Blender v2.79 (sub 0) OBJ File: 'charge_dynamite.blend' +# www.blender.org +o Plane +v -0.125000 -0.500000 0.437500 +v 0.125000 -0.500000 0.437500 +v -0.125000 -0.500000 -0.437500 +v 0.125000 -0.500000 -0.437500 +v -0.125000 -0.250000 0.437500 +v 0.125000 -0.250000 0.437500 +v -0.125000 -0.250000 -0.437500 +v 0.125000 -0.250000 -0.437500 +v 0.187500 -0.500000 0.437500 +v 0.437500 -0.500000 0.437500 +v 0.187500 -0.500000 -0.437500 +v 0.437500 -0.500000 -0.437500 +v 0.187500 -0.250000 0.437500 +v 0.437500 -0.250000 0.437500 +v 0.187500 -0.250000 -0.437500 +v 0.437500 -0.250000 -0.437500 +v -0.437500 -0.500000 0.437500 +v -0.187500 -0.500000 0.437500 +v -0.437500 -0.500000 -0.437500 +v -0.187500 -0.500000 -0.437500 +v -0.437500 -0.250000 0.437500 +v -0.187500 -0.250000 0.437500 +v -0.437500 -0.250000 -0.437500 +v -0.187500 -0.250000 -0.437500 +v -0.250000 -0.312500 0.250000 +v 0.250000 -0.312500 0.250000 +v -0.250000 -0.312500 -0.250000 +v 0.250000 -0.312500 -0.250000 +v -0.250000 -0.187500 -0.250000 +v -0.250000 -0.187500 0.250000 +v 0.250000 -0.187500 0.250000 +v 0.250000 -0.187500 -0.250000 +vt 0.875000 0.000000 +vt -0.000000 0.250000 +vt -0.000000 0.000000 +vt -0.000000 0.000000 +vt 0.875000 0.250000 +vt -0.000000 0.250000 +vt 0.875000 -0.000000 +vt -0.000000 0.250000 +vt -0.000000 -0.000000 +vt -0.000000 0.250000 +vt 0.875000 0.000000 +vt 0.875000 0.250000 +vt 0.250000 0.250000 +vt 0.000000 0.500000 +vt 0.000000 0.250000 +vt 0.250000 0.250000 +vt -0.000000 0.500000 +vt 0.875000 0.000000 +vt -0.000000 0.250000 +vt -0.000000 0.000000 +vt -0.000000 0.000000 +vt 0.875000 0.250000 +vt -0.000000 0.250000 +vt 0.875000 -0.000000 +vt -0.000000 0.250000 +vt -0.000000 -0.000000 +vt -0.000000 0.250000 +vt 0.875000 0.000000 +vt 0.875000 0.250000 +vt 0.250000 0.250000 +vt 0.000000 0.500000 +vt 0.000000 0.250000 +vt 0.250000 0.250000 +vt -0.000000 0.500000 +vt 0.875000 0.000000 +vt -0.000000 0.250000 +vt -0.000000 0.000000 +vt -0.000000 0.000000 +vt 0.875000 0.250000 +vt -0.000000 0.250000 +vt 0.875000 -0.000000 +vt -0.000000 0.250000 +vt -0.000000 -0.000000 +vt -0.000000 0.250000 +vt 0.875000 0.000000 +vt 0.875000 0.250000 +vt 0.250000 0.250000 +vt 0.000000 0.500000 +vt 0.000000 0.250000 +vt 0.250000 0.250000 +vt -0.000000 0.500000 +vt 0.250000 0.875000 +vt 0.750000 0.375000 +vt 0.750000 0.875000 +vt 0.250000 0.375000 +vt 0.750000 0.875000 +vt 0.250000 0.875000 +vt 0.750000 0.250000 +vt 0.250000 0.375000 +vt 0.250000 0.250000 +vt 0.750000 0.250000 +vt 0.250000 0.375000 +vt 0.250000 0.250000 +vt 0.750000 0.250000 +vt 0.250000 0.250000 +vt 0.750000 0.250000 +vt 0.250000 0.375000 +vt 0.250000 0.250000 +vt 0.875000 0.250000 +vt 0.875000 0.000000 +vt 0.875000 0.250000 +vt -0.000000 0.000000 +vt 0.250000 0.500000 +vt 0.250000 0.500000 +vt 0.875000 0.250000 +vt 0.875000 0.000000 +vt 0.875000 0.250000 +vt -0.000000 0.000000 +vt 0.250000 0.500000 +vt 0.250000 0.500000 +vt 0.875000 0.250000 +vt 0.875000 0.000000 +vt 0.875000 0.250000 +vt -0.000000 0.000000 +vt 0.250000 0.500000 +vt 0.250000 0.500000 +vt 0.250000 0.375000 +vt 0.750000 0.375000 +vt 0.750000 0.375000 +vt 0.750000 0.375000 +vt 0.750000 0.375000 +vn 0.0000 -1.0000 0.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.0000 -1.0000 +vn 0.0000 0.0000 1.0000 +s off +f 3/1/1 2/2/1 1/3/1 +f 6/4/2 7/5/2 5/6/2 +f 4/7/3 6/8/3 2/9/3 +f 1/10/4 7/11/4 3/12/4 +f 3/13/5 8/14/5 4/15/5 +f 2/16/6 5/17/6 1/10/6 +f 11/18/1 10/19/1 9/20/1 +f 14/21/2 15/22/2 13/23/2 +f 12/24/3 14/25/3 10/26/3 +f 9/27/4 15/28/4 11/29/4 +f 11/30/5 16/31/5 12/32/5 +f 10/33/6 13/34/6 9/27/6 +f 19/35/1 18/36/1 17/37/1 +f 22/38/2 23/39/2 21/40/2 +f 20/41/3 22/42/3 18/43/3 +f 17/44/4 23/45/4 19/46/4 +f 19/47/5 24/48/5 20/49/5 +f 18/50/6 21/51/6 17/44/6 +f 27/52/1 26/53/1 25/54/1 +f 31/55/2 29/56/2 30/57/2 +f 27/58/5 32/59/5 28/60/5 +f 26/61/6 30/62/6 25/63/6 +f 28/64/3 31/55/3 26/65/3 +f 25/66/4 29/67/4 27/68/4 +f 3/1/1 4/69/1 2/2/1 +f 6/4/2 8/70/2 7/5/2 +f 4/7/3 8/71/3 6/8/3 +f 1/10/4 5/72/4 7/11/4 +f 3/13/5 7/73/5 8/14/5 +f 2/16/6 6/74/6 5/17/6 +f 11/18/1 12/75/1 10/19/1 +f 14/21/2 16/76/2 15/22/2 +f 12/24/3 16/77/3 14/25/3 +f 9/27/4 13/78/4 15/28/4 +f 11/30/5 15/79/5 16/31/5 +f 10/33/6 14/80/6 13/34/6 +f 19/35/1 20/81/1 18/36/1 +f 22/38/2 24/82/2 23/39/2 +f 20/41/3 24/83/3 22/42/3 +f 17/44/4 21/84/4 23/45/4 +f 19/47/5 23/85/5 24/48/5 +f 18/50/6 22/86/6 21/51/6 +f 27/52/1 28/87/1 26/53/1 +f 31/55/2 32/88/2 29/56/2 +f 27/58/5 29/89/5 32/59/5 +f 26/61/6 31/90/6 30/62/6 +f 28/64/3 32/88/3 31/55/3 +f 25/66/4 30/91/4 29/67/4 diff --git a/src/main/resources/assets/hbm/textures/models/trinkets/chip.png b/src/main/resources/assets/hbm/textures/models/trinkets/chip.png index 635eac11fd70357ed309ebc76d48e9043abac36d..5d9f4c1c3713f63c96c4f6d61a3095dd4e0f5796 100644 GIT binary patch delta 4062 zcmV<44lxLcE>;6zn`vr7Z6mN~0`=*2=zj>iY!kYas+e2n@sU?p=hg4e8W1z2`y*qzupu&wFENntL8svJG z&b<}tyh3Yxsn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