From 10d984b561d50dd52cd756e748860dee1e605ce1 Mon Sep 17 00:00:00 2001 From: KitsuShadow Date: Wed, 17 Feb 2016 07:00:44 -0500 Subject: [PATCH] cannons --- bin/com/kitsu/medievalcraft/ClientProxy.class | Bin 2237 -> 2237 bytes .../kitsu/medievalcraft/block/ModBlocks.class | Bin 8969 -> 8980 bytes .../block/machines/formTable.class | Bin 2564 -> 2564 bytes .../contain/ContainerFormTable.class | Bin 4779 -> 4306 bytes .../medievalcraft/events/EventHandle.class | Bin 16504 -> 13205 bytes .../kitsu/medievalcraft/gui/GuiHandler.class | Bin 2997 -> 3384 bytes .../renderer/RendererRegistry.class | Bin 9711 -> 9711 bytes .../tileents/TileEntRegister.class | Bin 3113 -> 3205 bytes .../com/kitsu/medievalcraft/ClientProxy.java | 2 - .../kitsu/medievalcraft/block/ModBlocks.java | 4 +- ...nnonBall28.java => CannonBallBlock28.java} | 47 ++++----- .../block/machines/Cannon_28.java | 96 ++++++++++++++---- .../block/machines/formTable.java | 1 - .../contain/ContainerCannon_28.java | 81 +++++++++++++++ .../contain/ContainerFormTable.java | 4 +- .../medievalcraft/events/EventHandle.java | 26 ++--- .../kitsu/medievalcraft/gui/GuiCannon_28.java | 38 +++++++ .../kitsu/medievalcraft/gui/GuiHandler.java | 16 ++- .../renderer/RendererRegistry.java | 3 + .../cannons/Render_CannonBall_Projectile.java | 65 ------------ .../tileents/TileEntRegister.java | 2 + .../tileents/cannon/TileCannonBall28.java | 11 +- .../tileents/cannon/TileCannon_28.java | 55 ++++++---- 23 files changed, 296 insertions(+), 155 deletions(-) rename src/main/java/com/kitsu/medievalcraft/block/decorative/{CannonBall28.java => CannonBallBlock28.java} (67%) create mode 100644 src/main/java/com/kitsu/medievalcraft/contain/ContainerCannon_28.java create mode 100644 src/main/java/com/kitsu/medievalcraft/gui/GuiCannon_28.java delete mode 100644 src/main/java/com/kitsu/medievalcraft/renderer/blocks/cannons/Render_CannonBall_Projectile.java diff --git a/bin/com/kitsu/medievalcraft/ClientProxy.class b/bin/com/kitsu/medievalcraft/ClientProxy.class index cbb060ad711af50780fa275c31ae7aa7b2f180f9..76b6f6bfef90f130ca9ecf52fe8ef8d1498da34e 100644 GIT binary patch delta 78 zcmdlhxL0riJEPcSM)o#IDF%K9X$Cn483ru|Sq3v8%ZWjr!H+?4@&a}{PBjK*26YBD g293$_9HNu|uq!j_PFCQsV>ANt9U09hFXWH`02P}KY5)KL delta 78 zcmdlhxL0riJEO#8M)o#I83uj^Sq3>E)MAilFk?_)aAHto@MBP(ynx+~Q-gt-L6d=v fL2Gh6hv?)#?8=P#lNC7Z7)^kDM@GxZ3pr!}8Ve4F diff --git a/bin/com/kitsu/medievalcraft/block/ModBlocks.class b/bin/com/kitsu/medievalcraft/block/ModBlocks.class index fc50aca65881a57094d69fc4a6fba78546516cf1..56cab13cee4e7a640e298875870df56f5a45b8dc 100644 GIT binary patch delta 62 zcmeBlo8q>CgP+lA@duLIdHH!xi8(n=Ir+)iMiv~5GK>sD$*98doBjBA G3j+XOPZPTU delta 51 zcmbQ@*6Fr^gP+lK@X%X2V&%vlXS%D*;QDgE1juuWm1|9}|1_=g($+Dc$yrv8s3}y^s4CX))%gL>r F^#Bua3Az9P delta 51 zcmZn>X%X2V&%vlNS%D*;QFHPHjuuXR1|9|j1_=hk$+Dc$yk-m>4CV}C3>H8UtI4gL F^#Bw-3Bv#Y diff --git a/bin/com/kitsu/medievalcraft/contain/ContainerFormTable.class b/bin/com/kitsu/medievalcraft/contain/ContainerFormTable.class index 65689f7579715ca2ad1e37199638d4840199cee1..5e2834d2dbdbef36c5095ff496064e66d9b909ae 100644 GIT binary patch delta 546 zcmXYt&1(}u7{-5->}H$IL^o)qOP8Y3NUik4dN34G(2G#*C3x``YOK-H6dHwAYwEYw zRIOvxR$Kd_MvaFF&E%Jgb=TnzbT^Dnip{^5|(VXNO*HxdryY;5z7PkeF z!F29;YBZTk4O|ce+xDKeNpM$kk0~`{cZUl+u$UHjY9!?CkUV5cU<_nO#%u&LlE*0Z z*FF@Ql|1E{Ivh#16qu9DBL(46ADqmLr+w^8$pVY2967LaNwUm#K{Pv@9Lna7ol6Z5 zrqB4HRmp4KsDPYMBjFB}m$Sn7+88|;%!@@#Lc0Ej=x<+R%=^YffDID8hHLzwO=SW8?C6HvFTH9 z>DIren@~g&&}W@@yeCMEG9M^m5ND2$S~EGRlTCy-Ibu<;Na)*cZrBdd7ej<$iRh2b9?dLJrd4@v&U1asaqXU5r&qAsL^5VJ{-h#`Jsi8RJB}vo)m{(=Qq0nm*ciGq%!rQIiAXP;}FMT z9AQYd^?2RuJFQ;3r{1@_S{%P)qvf`FUAYd=X(j5l8F5NUW;QKsaBbi0B5AEX)>hxN zUElG0O^2GyHQ{&Azg&EsFhzs1wc-zs6Zlg+Qob@y;jb9_8K!Qtc3S2R-{~|PoPy6G za9WHj^B0`uIEV8L2@?K;RS2~+L^BI%tU44qF5seA8DA71#FZE>GZ>;@F=lZL;Ua_7 z>UH<3V7SI{9XG^qd__fx;}&jM^9ou(ybG z^xG2VP&mgZqpvCZ3TjO@TE?#}ha$|-^r27xk5X3@tLU5$h0c1&Scgh9Vg{P=B{m?1 zJTeq7MhjLGqI%*b*HxeKL=>ttOJu*(*49D?X z2nHLZxPkyLSrcje-FS?X5xhj*GD(+SVOW>SI5U82!9B1{*5xuTH5o-Dt94mZwOUGF zEkb4^eY&K}*)ndHu+GrbA?SvdzKZDqF0Iwlz=T`OMkpKBYA0)|mY%51WFwQD6ESh> z@)-Uug6k41TZrK^pCjKs diff --git a/bin/com/kitsu/medievalcraft/events/EventHandle.class b/bin/com/kitsu/medievalcraft/events/EventHandle.class index 395008e2786397fcac3df3e62987b38089c011c1..b0e5552b17f1b8776b538011ed567731e9ab3e1b 100644 GIT binary patch delta 612 zcmXw%T}YEr7{`ClYR!#_wz4+xefQ20*xD`}3@IdbQCAYijJ`iiBgG<@rY@Zy5q05J zaF8~Vh+G$acww#u1ygT#C)8~bM090DH<1(_CokvXod5IxJ?A;_KfkACwzt0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ajd76A`awF?nvPHC+;xPG+p&jRAI>tm%VzXeo|b%$RFjZ8 zLr68FTs2{m`sxr;)kjEG50XkMocKjn#Y)~}@8@@fYlWE47jk3eDhbOgfg6R=b1zDh zJdnl{_F8yKAMBO!sG#iyn+CW;i*yso_2CTD=VY&s);n|)$f|gnH`ipCO!V`*Ba+Jp zk@Sq+L83O;K6=?K^*KuTgA9MT8TA_OvtgZvPuOsxhELhhr{RxmI6}i83+(6E8Y9D> zWcYl&vo_6_YSK);(k1BCG=D9ZHw&X1f+CbH$G0~G^__R+_GhF)e zyqugG9Gu}9Ig0--cUfIC3d%jB_-U}b;I;wmJ{rhQex_F?mgvlsC~g`+(G-mfJ9l$? z@_x9d6bPuvDCLwdr#u;}DN!Cn*3$c$x{kOX6|$j5xidKExD!QMd2yPH9HHG@G{luE zuw9*&bu~g<72B>#)Clcts4rL6SJHMi(sq`eNZsC7p;FrW92BZ~s8sXeSLb4?T7Vhq zJe;B0ai%&S3)LdT)MBL71=y=D!~t~?4yucBNG)Z)TE-&P!3q^(oibUkI@zqc*s8jD zo(i)=t>79J;d+&{*sprIRb9e|Rg8O7ocmRRFQ}y5ww>}qAib7rTR}_Jang-`S(e#N zHMe;Q{~tK7xVFq@(J>=2z!(2c!34> zNPY#b&ycp)zv^U7(BGj>uemLH_gdWMepH)Hn{K6e_DCSyO6^{avB-uvClt nX|le?&GIpzPEh0J7vdY(rzXtu$r3wJR-FeYDCcC^b)NqMl8)iA diff --git a/bin/com/kitsu/medievalcraft/gui/GuiHandler.class b/bin/com/kitsu/medievalcraft/gui/GuiHandler.class index 4b4ee0235bbeb8cbdc152a939a8c9f12d05d5d41..1fe6ef18fb49bcb6dccb396ace0efb2be3fb54c2 100644 GIT binary patch literal 3384 zcmcguZBrXn6n-uQZi%6^r6`CmAZ-a)SWRD`1P};;MgzqLQ>)gxY%XD8vx}Pzh`+#( zeslb$!dB?s<8hd-k65`=3Am0w4yDqlMv$ z;S{tT(<_#=g2A?XhSumvmLZgIaw3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9k&*FYJ5C`XpC4LlpzgI?iH*$QaoGZ!toG~q13@`u2aMmJ1 z4CfCpTrh={L6;yd9e}uOwGhPEpAZ|#Q4>LICWx&Bv5kCn5W`Ml*i8&W#IW}-8IJxx O#2M@}yh3m#to{UdEy@A_ diff --git a/bin/com/kitsu/medievalcraft/renderer/RendererRegistry.class b/bin/com/kitsu/medievalcraft/renderer/RendererRegistry.class index 9b4b16f7b0642c236c693f29bec854fdbad43b5c..7f11056fc7d1185a6fe95fe8e9122efc4e6f9a39 100644 GIT binary patch delta 300 zcmWlOJ4ixd7(mbW{Yw&!4F-Xo<^PbU*}6QG|- z`%E!yGtUfb1j#UqMTi1nO3YEVPlX6IqT(PXP8P(?qIiglmxT1OB%>@#kQIruDrwfm zVnYgSN{OVD!)!@~ZK;t`2RrH{t!{SJLq@yU(;oJ9fUNpC&>)8z<5-iNXqHpWai&Eq zedAo;xzJB8^^2VTa%JkcHjUhx7Vb4vLd_fKFAI$ z$?gTX% zrf;02L+3>|x;6r(6hH0^^T%Cz#7Vrp4aTj3xLwgqx(s;%h5Tw3Ja+T3aq zhav)z=!PVv71ih0U7|4IX336nvW>-M;bP`tLs&Z3(c@l9vP}XR(=M zgn7nTV46juEXggi#tIIr>=0vLzC*D(B0-6DPTAm$O)f}s#TM6WQzgX{X$%>jrPUzI Z3ptwPd1q>mHU+*oVCY`~lvMgMkAGt^E&~7n delta 201 zcmW-azpFuU9EP8B2D;}I7KLu<=0|?SJ-Bocj>MpBCN`T*78@a(Mc>V4BZDl4TkO{# zC7;gn_V)C=y_?`E;CsIQ9zdS88(qUvn*O!>_g?Lgq0YuY3oDly{^+8M1P_%p?~AK6 z9Yb=;r(^^-Q9Q)(6Bm*Yk|af%92tJe(%_p87Cj+-IU7=7#1CVNOeirEYfhOB6}D7S b)Ywz!Aj=~*7n9o}wYndS4 diff --git a/src/main/java/com/kitsu/medievalcraft/ClientProxy.java b/src/main/java/com/kitsu/medievalcraft/ClientProxy.java index 8bdc2e8f..17447768 100644 --- a/src/main/java/com/kitsu/medievalcraft/ClientProxy.java +++ b/src/main/java/com/kitsu/medievalcraft/ClientProxy.java @@ -6,7 +6,6 @@ import com.kitsu.medievalcraft.entity.EntityModelArrow; import com.kitsu.medievalcraft.entity.EntityModelITArrow; import com.kitsu.medievalcraft.entity.EntityShit; import com.kitsu.medievalcraft.entity.EntityTester; -import com.kitsu.medievalcraft.entity.ProjectileCannonBall; import com.kitsu.medievalcraft.item.ModItems; import com.kitsu.medievalcraft.renderer.RenderId; import com.kitsu.medievalcraft.renderer.RendererRegistry; @@ -14,7 +13,6 @@ import com.kitsu.medievalcraft.renderer.blocks.RenderModelArrow; import com.kitsu.medievalcraft.renderer.blocks.RenderModelITArrow; import com.kitsu.medievalcraft.renderer.blocks.RenderModelITSpear; import com.kitsu.medievalcraft.renderer.blocks.cannons.Render_CannonBall_Iron; -import com.kitsu.medievalcraft.renderer.blocks.cannons.Render_CannonBall_Projectile; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.RenderingRegistry; diff --git a/src/main/java/com/kitsu/medievalcraft/block/ModBlocks.java b/src/main/java/com/kitsu/medievalcraft/block/ModBlocks.java index b493f455..229cf1bb 100644 --- a/src/main/java/com/kitsu/medievalcraft/block/ModBlocks.java +++ b/src/main/java/com/kitsu/medievalcraft/block/ModBlocks.java @@ -17,7 +17,7 @@ import com.kitsu.medievalcraft.block.crucible.empty.EmptySoftCrucible; import com.kitsu.medievalcraft.block.crucible.empty.FilledWaterCrucible; import com.kitsu.medievalcraft.block.crucible.empty.SlackWaterCrucible; import com.kitsu.medievalcraft.block.crucible.empty.TanWaterCrucible; -import com.kitsu.medievalcraft.block.decorative.CannonBall28; +import com.kitsu.medievalcraft.block.decorative.CannonBallBlock28; import com.kitsu.medievalcraft.block.decorative.EggWashedBrick; import com.kitsu.medievalcraft.block.decorative.EggWashedWall; import com.kitsu.medievalcraft.block.decorative.LimestoneRaw; @@ -191,7 +191,7 @@ public class ModBlocks { GameRegistry.registerBlock(forge = new Forge("forge", Material.rock), "forge"); GameRegistry.registerBlock(cannon_28 = new Cannon_28("cannon_28", Material.iron), "cannon_28"); - GameRegistry.registerBlock(cannonBall_28 = new CannonBall28("cannonBall28", Material.iron), "cannonBall28"); + GameRegistry.registerBlock(cannonBall_28 = new CannonBallBlock28("cannonBallBlock_28", Material.iron), "cannonBallBlock_28"); /*GameRegistry.registerBlock(myIronIngot = new MyIronIngot("myIronIngot", Material.iron), "myIronIngot"); GameRegistry.registerBlock(damascusIngot = new DamascusIngot("damascusIngot", Material.iron), "damascusIngot"); diff --git a/src/main/java/com/kitsu/medievalcraft/block/decorative/CannonBall28.java b/src/main/java/com/kitsu/medievalcraft/block/decorative/CannonBallBlock28.java similarity index 67% rename from src/main/java/com/kitsu/medievalcraft/block/decorative/CannonBall28.java rename to src/main/java/com/kitsu/medievalcraft/block/decorative/CannonBallBlock28.java index 22b6a6ca..57dd33ec 100644 --- a/src/main/java/com/kitsu/medievalcraft/block/decorative/CannonBall28.java +++ b/src/main/java/com/kitsu/medievalcraft/block/decorative/CannonBallBlock28.java @@ -7,6 +7,7 @@ import com.kitsu.medievalcraft.block.ModBlocks; import com.kitsu.medievalcraft.renderer.RenderId; import com.kitsu.medievalcraft.tileents.cannon.TileCannonBall28; import com.kitsu.medievalcraft.tileents.ingots.TileEntityMyDiamond; +import com.kitsu.medievalcraft.util.CustomTab; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -18,58 +19,54 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -public class CannonBall28 extends BlockContainer { +public class CannonBallBlock28 extends BlockContainer { - public CannonBall28(String unlocalizedName, Material material) { + public CannonBallBlock28(String unlocalizedName, Material material) { super(material); this.setBlockName(unlocalizedName); this.setBlockTextureName(Main.MODID + ":" + unlocalizedName); - //this.setCreativeTab(CustomTab.MedievalCraftTab); - this.setHardness(1.0F); - this.setResistance(1.0F); - this.setHarvestLevel(null, 0); - this.setStepSound(soundTypeGlass); + this.setCreativeTab(CustomTab.MedievalCraftTab); + this.setHardness(3.0F); + this.setResistance(8.0F); + this.setHarvestLevel("pickaxe",1, 0); + this.setStepSound(soundTypeStone); //this.setLightLevel(2.0F); //xmin, ymin, zmin, this.setBlockBounds(0.38F, 0.0F, 0.38F, //xmax, ymax, zmax 0.62F, 0.2F, 0.62F); } - + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_){ int a = player.inventory.currentItem; - - if(player.inventory.getStackInSlot(a)!=null){ - if(player.getHeldItem().getItem()==Item.getItemFromBlock(this)){ + if(!world.isRemote){ + if(player.inventory.getStackInSlot(a)!=null){ + if(player.getHeldItem().getItem()==Item.getItemFromBlock(this)){ + ItemStack jar = new ItemStack(this); + player.inventory.addItemStackToInventory(jar); + if(!world.isRemote){ + world.setBlock(x, y, z, Blocks.air, 0, 2); + } + } + } + if(player.inventory.getStackInSlot(a)==null){ ItemStack jar = new ItemStack(this); - player.inventory.addItemStackToInventory(jar); + player.inventory.setInventorySlotContents(a, jar); if(!world.isRemote){ world.setBlock(x, y, z, Blocks.air, 0, 2); } } } - if(player.inventory.getStackInSlot(a)==null){ - ItemStack jar = new ItemStack(this); - player.inventory.setInventorySlotContents(a, jar); - if(!world.isRemote){ - world.setBlock(x, y, z, Blocks.air, 0, 2); - } - } return false; } - @Override - public Item getItemDropped(int metadata, Random random, int fortune) { - return Item.getItemFromBlock(this); - } - @Override public TileEntity createNewTileEntity(World world, int i) { return new TileCannonBall28(); } - + @Override public int getRenderType() { return RenderId.my28CannonBallID; diff --git a/src/main/java/com/kitsu/medievalcraft/block/machines/Cannon_28.java b/src/main/java/com/kitsu/medievalcraft/block/machines/Cannon_28.java index 0bf8583d..17d9b0fd 100644 --- a/src/main/java/com/kitsu/medievalcraft/block/machines/Cannon_28.java +++ b/src/main/java/com/kitsu/medievalcraft/block/machines/Cannon_28.java @@ -9,6 +9,7 @@ import com.kitsu.medievalcraft.block.ModBlocks; import com.kitsu.medievalcraft.entity.EntityCannonBall; import com.kitsu.medievalcraft.entity.EntityModelArrow; import com.kitsu.medievalcraft.entity.ProjectileCannonBall; +import com.kitsu.medievalcraft.gui.GuiHandler; import com.kitsu.medievalcraft.item.ModItems; import com.kitsu.medievalcraft.renderer.RenderId; import com.kitsu.medievalcraft.tileents.cannon.TileCannon_28; @@ -54,7 +55,7 @@ public class Cannon_28 extends BlockContainer{ this.setHardness(3.0F); this.setResistance(5.0F); this.setHarvestLevel("pickaxe", 1, 0); - this.setStepSound(Block.soundTypeAnvil); + this.setStepSound(Block.soundTypeMetal); //this.isFlammable(world, x, y, z, face); //(xmin, ymin, zmin, // xmax, ymax, zmax) @@ -75,39 +76,91 @@ public class Cannon_28 extends BlockContainer{ super.randomDisplayTick(world, x, y, z, random); } - + private Entity shootCannon(World world, Integer x, Integer y, Integer z){ EntityCannonBall cannonball = null; + TileCannon_28 tile = (TileCannon_28) world.getTileEntity(x, y, z); + Item ball = new ItemStack(ModBlocks.cannonBall_28, 0, 1).getItem(); - if(world.getBlockMetadata(x, y, z)==3){ - cannonball = new EntityCannonBall(world, (double)x+2, (double)y, (double)z, null); - cannonball.setVelocity(5+world.rand.nextFloat(), 0.25, (world.rand.nextFloat()*2-1)/5); + if(tile.getStackInSlot(0)!=null){ + if(world.getBlockMetadata(x, y, z)==3){ + tile.isOn=true; + world.playSoundEffect(x, y, z, "random.fizz", 0.1f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F); + world.playSoundEffect(x, y, z, "random.explode", 0.5f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F); + if(tile.getStackInSlot(1)!=null){ + if(tile.getStackInSlot(1).getItem()==ball){ + tile.decrStackSize(1, 1); + cannonball = new EntityCannonBall(world, (double)x+2, (double)y, (double)z, null); + cannonball.setVelocity(tile.getStackInSlot(0).stackSize-world.rand.nextFloat(), 0.25, (world.rand.nextFloat()*2-1)/5); + tile.markForUpdate(); + tile.markDirty(); + } + } + } } - if(world.getBlockMetadata(x, y, z)==2){ - cannonball = new EntityCannonBall(world, (double)x, (double)y, (double)z-2, null); - cannonball.setVelocity((world.rand.nextFloat()*2-1)/5, 0.25, -5-world.rand.nextFloat()); + if(tile.getStackInSlot(0)!=null){ + if(world.getBlockMetadata(x, y, z)==2){ + tile.isOn=true; + world.playSoundEffect(x, y, z, "random.fizz", 0.1f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F); + world.playSoundEffect(x, y, z, "random.explode", 0.5f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F); + if(tile.getStackInSlot(1)!=null){ + if(tile.getStackInSlot(1).getItem()==ball){ + tile.decrStackSize(1, 1); + cannonball = new EntityCannonBall(world, (double)x, (double)y, (double)z-2, null); + cannonball.setVelocity((world.rand.nextFloat()*2-1)/5, 0.25, -tile.getStackInSlot(0).stackSize+world.rand.nextFloat()); + tile.markForUpdate(); + tile.markDirty(); + } + } + } } - if(world.getBlockMetadata(x, y, z)==1){ - cannonball = new EntityCannonBall(world, (double)x-2, (double)y, (double)z, null); - cannonball.setVelocity(-5-world.rand.nextFloat(), 0.25, (world.rand.nextFloat()*2-1)/5); + if(tile.getStackInSlot(0)!=null){ + if(world.getBlockMetadata(x, y, z)==1){ + tile.isOn=true; + world.playSoundEffect(x, y, z, "random.fizz", 0.1f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F); + world.playSoundEffect(x, y, z, "random.explode", 0.5f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F); + if(tile.getStackInSlot(1)!=null){ + if(tile.getStackInSlot(1).getItem()==ball){ + tile.decrStackSize(1, 1); + cannonball = new EntityCannonBall(world, (double)x-2, (double)y, (double)z, null); + cannonball.setVelocity(-tile.getStackInSlot(0).stackSize+world.rand.nextFloat(), 0.25, (world.rand.nextFloat()*2-1)/5); + tile.markForUpdate(); + tile.markDirty(); + } + } + } } - if(world.getBlockMetadata(x, y, z)==0){ - cannonball = new EntityCannonBall(world, (double)x, (double)y, (double)z+2, null); - cannonball.setVelocity((world.rand.nextFloat()*2-1)/5, 0.25, 5+world.rand.nextFloat()); + if(tile.getStackInSlot(0)!=null){ + if(world.getBlockMetadata(x, y, z)==0){ + tile.isOn=true; + world.playSoundEffect(x, y, z, "random.fizz", 0.1f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F); + world.playSoundEffect(x, y, z, "random.explode", 0.5f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F); + if(tile.getStackInSlot(1)!=null){ + if(tile.getStackInSlot(1).getItem()==ball){ + tile.decrStackSize(1, 1); + cannonball = new EntityCannonBall(world, (double)x, (double)y, (double)z+2, null); + cannonball.setVelocity((world.rand.nextFloat()*2-1)/5, 0.25, tile.getStackInSlot(0).stackSize-world.rand.nextFloat()); + tile.markForUpdate(); + tile.markDirty(); + } + } + } } + tile.setInventorySlotContents(0, null); + tile.markForUpdate(); + tile.markDirty(); return cannonball; } + + + public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int q, float a, float b, float c) { if(!world.isRemote){ TileCannon_28 tileEnt = (TileCannon_28) world.getTileEntity(x, y, z); if(tileEnt.isOn==false){ if(player.inventory.getCurrentItem()!=null){ if(player.inventory.getCurrentItem().getItem()==Items.flint_and_steel){ - tileEnt.isOn=true; - world.playSoundEffect(x, y, z, "random.fizz", 0.1f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F); - world.playSoundEffect(x, y, z, "random.explode", 0.5f, world.rand.nextFloat()/0.5f * 0.1F + 0.8F); - world.spawnEntityInWorld(shootCannon(world,x,y,z)); tileEnt.markForUpdate(); tileEnt.markDirty(); @@ -115,7 +168,14 @@ public class Cannon_28 extends BlockContainer{ } } } + if (!player.isSneaking()) { + if(player.inventory.getCurrentItem()==null||player.inventory.getCurrentItem().getItem()!=Items.flint_and_steel){ + player.openGui(Main.instance, GuiHandler.guiIDcannon28, world, x, y, z); + return true; + } + } } + return false; } @Override diff --git a/src/main/java/com/kitsu/medievalcraft/block/machines/formTable.java b/src/main/java/com/kitsu/medievalcraft/block/machines/formTable.java index 332d5a18..934d83a0 100644 --- a/src/main/java/com/kitsu/medievalcraft/block/machines/formTable.java +++ b/src/main/java/com/kitsu/medievalcraft/block/machines/formTable.java @@ -32,7 +32,6 @@ public class formTable extends Block { this.setCreativeTab(CustomTab.MedievalCraftTab); this.setHardness(3.5F); this.setResistance(2.0F); - } @SideOnly(Side.CLIENT) diff --git a/src/main/java/com/kitsu/medievalcraft/contain/ContainerCannon_28.java b/src/main/java/com/kitsu/medievalcraft/contain/ContainerCannon_28.java new file mode 100644 index 00000000..b75b3456 --- /dev/null +++ b/src/main/java/com/kitsu/medievalcraft/contain/ContainerCannon_28.java @@ -0,0 +1,81 @@ +package com.kitsu.medievalcraft.contain; + +import com.kitsu.medievalcraft.tileents.cannon.TileCannon_28; +import com.kitsu.medievalcraft.tileents.machine.TileForge; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerCannon_28 extends Container { + + protected TileCannon_28 tileEnt; + + @Override + public boolean canInteractWith(EntityPlayer player) { + return tileEnt.isUseableByPlayer(player); + } + + public ContainerCannon_28 (InventoryPlayer inventoryPlayer, TileCannon_28 te){ + tileEnt = te; + + //the Slot constructor takes the IInventory and the slot number in that it binds to + //and the x-y coordinates it resides on-screen + /* for (int i = 0; i < 2; i++) { + for (int j = 0; j < 2; j++) { + addSlotToContainer(new Slot(tileEnt, j + i * 3, 62 + j * 18, 17 + i * 18)); + } + }*/ + addSlotToContainer(new Slot(tileEnt, 0, 80, 34)); + addSlotToContainer(new Slot(tileEnt, 1, 100, 34)); + //commonly used vanilla code that adds the player's inventory + bindPlayerInventory(inventoryPlayer); + } + + protected void bindPlayerInventory(InventoryPlayer inventoryPlayer) { + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 9; j++) { + addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, + 8 + j * 18, 84 + i * 18)); + } + } + + for (int i = 0; i < 9; i++) { + addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 142)); + } + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int slot) { + ItemStack stack = null; + Slot slotObject = (Slot) inventorySlots.get(slot); + + //null checks and checks if the item can be stacked (maxStackSize > 1) + /*if (slotObject != null && slotObject.getHasStack()) { + ItemStack stackInSlot = slotObject.getStack(); + stack = stackInSlot.copy(); + + //merges the item into player inventory since its in the tileEntity + if (slot < 9) { + if (!this.mergeItemStack(stackInSlot, 9, this.inventorySlots.size(), true)) { + return null; + } + } + //places it into the tileEntity is possible since its in the player inventory + else if (!this.mergeItemStack(stackInSlot, 0, 9, false)) { + return null; + } + + if (stackInSlot.stackSize == 0) { + slotObject.putStack((ItemStack)null); + } else { + slotObject.onSlotChanged(); + } + + }*/ + return stack; + } + +} \ No newline at end of file diff --git a/src/main/java/com/kitsu/medievalcraft/contain/ContainerFormTable.java b/src/main/java/com/kitsu/medievalcraft/contain/ContainerFormTable.java index bb475a8b..5fb7b3da 100644 --- a/src/main/java/com/kitsu/medievalcraft/contain/ContainerFormTable.java +++ b/src/main/java/com/kitsu/medievalcraft/contain/ContainerFormTable.java @@ -68,7 +68,7 @@ public class ContainerFormTable extends Container { /** * Called when the container is closed. */ - public void onContainerClosed(EntityPlayer player) + /*public void onContainerClosed(EntityPlayer player) { super.onContainerClosed(player); @@ -84,7 +84,7 @@ public class ContainerFormTable extends Container { } } } - } + }*/ public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { diff --git a/src/main/java/com/kitsu/medievalcraft/events/EventHandle.java b/src/main/java/com/kitsu/medievalcraft/events/EventHandle.java index ac504be6..f5a31135 100644 --- a/src/main/java/com/kitsu/medievalcraft/events/EventHandle.java +++ b/src/main/java/com/kitsu/medievalcraft/events/EventHandle.java @@ -75,47 +75,47 @@ public void zombieJoinsEvent(EntityJoinWorldEvent event){ longbowTicks = player.getItemInUseDuration(); ItemStack stack = player.inventory.getCurrentItem(); - if((longbowTicks > 0) && (longbowTicks <=10)){ + if((longbowTicks > 0) && (longbowTicks <=5)){ stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("D", 1); } - if((longbowTicks > 10) && (longbowTicks <=20)){ + if((longbowTicks > 5) && (longbowTicks <=10)){ stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("D", 2); } - if((longbowTicks > 20) && (longbowTicks <=30)){ + if((longbowTicks > 10) && (longbowTicks <=15)){ stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("D", 3); } - if((longbowTicks > 30) && (longbowTicks <=40)){ + if((longbowTicks > 15) && (longbowTicks <=20)){ stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("D", 4); } - if((longbowTicks > 40) && (longbowTicks <=50)){ + if((longbowTicks > 20) && (longbowTicks <=25)){ stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("D", 5); } - if((longbowTicks > 50) && (longbowTicks <=60)){ + if((longbowTicks > 25) && (longbowTicks <=30)){ stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("D", 6); } - if((longbowTicks > 60) && (longbowTicks <=70)){ + if((longbowTicks > 30) && (longbowTicks <=35)){ stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("D", 7); } - if((longbowTicks > 70) && (longbowTicks <=80)){ + if((longbowTicks > 35) && (longbowTicks <=40)){ stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("D", 8); } - if((longbowTicks > 80) && (longbowTicks <=90)){ + if((longbowTicks > 40) && (longbowTicks <=45)){ stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("D", 9); } - if(longbowTicks == 99){ + if(longbowTicks == 45){ player.playSound((Main.MODID + ":tautBow"), 0.8F, 1.0F); //player.worldObj.playSoundAtEntity(player, (Main.MODID + ":tautBow"), 0.8F, 1.0F); } - if((longbowTicks > 90) && (longbowTicks <=100)){ + if((longbowTicks > 45) && (longbowTicks <=55)){ stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setInteger("D", 10); } @@ -540,7 +540,7 @@ public void onPlayerUpdateMaceWoodenShield (LivingUpdateEvent event) { } } }*/ - +/* @SubscribeEvent @SideOnly(Side.CLIENT) public void SwordToShieldSwitch (LivingUpdateEvent event) { @@ -637,7 +637,7 @@ public void onPlayerUpdateMaceWoodenShield (LivingUpdateEvent event) { } } } - +*/ } diff --git a/src/main/java/com/kitsu/medievalcraft/gui/GuiCannon_28.java b/src/main/java/com/kitsu/medievalcraft/gui/GuiCannon_28.java new file mode 100644 index 00000000..6f785bd5 --- /dev/null +++ b/src/main/java/com/kitsu/medievalcraft/gui/GuiCannon_28.java @@ -0,0 +1,38 @@ +package com.kitsu.medievalcraft.gui; + +import org.lwjgl.opengl.GL11; + +import com.kitsu.medievalcraft.Main; +import com.kitsu.medievalcraft.contain.ContainerCannon_28; +import com.kitsu.medievalcraft.tileents.cannon.TileCannon_28; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +public class GuiCannon_28 extends GuiContainer { + private ResourceLocation texture = new ResourceLocation(Main.MODID + ":" + "textures/gui/forgeovengui.png"); + + public GuiCannon_28(InventoryPlayer inventoryPlayer, TileCannon_28 tileEntity) { + super(new ContainerCannon_28(inventoryPlayer, tileEntity)); + // TODO Auto-generated constructor stub + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + //String name = "Forge"; + + //this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + + } + + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + GL11.glColor4f(1F, 1F, 1F, 1F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + } + +} diff --git a/src/main/java/com/kitsu/medievalcraft/gui/GuiHandler.java b/src/main/java/com/kitsu/medievalcraft/gui/GuiHandler.java index a4a8f074..a658cc64 100644 --- a/src/main/java/com/kitsu/medievalcraft/gui/GuiHandler.java +++ b/src/main/java/com/kitsu/medievalcraft/gui/GuiHandler.java @@ -1,19 +1,20 @@ package com.kitsu.medievalcraft.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - import com.kitsu.medievalcraft.block.ModBlocks; +import com.kitsu.medievalcraft.contain.ContainerCannon_28; import com.kitsu.medievalcraft.contain.ContainerForgeAnvil; import com.kitsu.medievalcraft.contain.ContainerFormTable; import com.kitsu.medievalcraft.contain.ContainerSolidFilter; import com.kitsu.medievalcraft.contain.ContainerTestForge; +import com.kitsu.medievalcraft.tileents.cannon.TileCannon_28; import com.kitsu.medievalcraft.tileents.machine.TileEntityAnvilForge; import com.kitsu.medievalcraft.tileents.machine.TileEntitySolidFilter; import com.kitsu.medievalcraft.tileents.machine.TileEntityTestForge; import cpw.mods.fml.common.network.IGuiHandler; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class GuiHandler implements IGuiHandler { @@ -21,6 +22,7 @@ public class GuiHandler implements IGuiHandler { public static final int guiIDforge = 2; public static final int guiIDforgeAnvil = 3; public static final int guiIDsolidFilter = 4; + public static final int guiIDcannon28 = 5; //returns an instance of the Container you made earlier @Override @@ -39,6 +41,9 @@ public class GuiHandler implements IGuiHandler { if (entity instanceof TileEntitySolidFilter) { return new ContainerSolidFilter(player.inventory, (TileEntitySolidFilter) entity); } + if (entity instanceof TileCannon_28) { + return new ContainerCannon_28(player.inventory, (TileCannon_28) entity); + } return null; } @@ -59,6 +64,9 @@ public class GuiHandler implements IGuiHandler { if (entity instanceof TileEntitySolidFilter) { return new GuiSolidFilter(player.inventory, (TileEntitySolidFilter) entity); } + if (entity instanceof TileCannon_28) { + return new GuiCannon_28(player.inventory, (TileCannon_28) entity); + } return null; } diff --git a/src/main/java/com/kitsu/medievalcraft/renderer/RendererRegistry.java b/src/main/java/com/kitsu/medievalcraft/renderer/RendererRegistry.java index 4ab16a6f..aa5da441 100644 --- a/src/main/java/com/kitsu/medievalcraft/renderer/RendererRegistry.java +++ b/src/main/java/com/kitsu/medievalcraft/renderer/RendererRegistry.java @@ -5,6 +5,7 @@ import com.kitsu.medievalcraft.item.ModItems; import com.kitsu.medievalcraft.renderer.blocks.BarrelLidRender; import com.kitsu.medievalcraft.renderer.blocks.SmallBarrelRender; import com.kitsu.medievalcraft.renderer.blocks.TestBlockRenderer; +import com.kitsu.medievalcraft.renderer.blocks.cannons.Render_CannonBall_Iron; import com.kitsu.medievalcraft.renderer.blocks.cannons.Render_Cannon_28; import com.kitsu.medievalcraft.renderer.blocks.crucibles.IronOreCrucibleRenderer; import com.kitsu.medievalcraft.renderer.blocks.crucibles.LapisCrucibleRenderer; @@ -66,6 +67,7 @@ import com.kitsu.medievalcraft.renderer.itemrenderer.weapons.NewIronShield; import com.kitsu.medievalcraft.tileents.TileEntitySmallBarrel; import com.kitsu.medievalcraft.tileents.TileEntitySmallLid; import com.kitsu.medievalcraft.tileents.TileEntityTestBlock; +import com.kitsu.medievalcraft.tileents.cannon.TileCannonBall28; import com.kitsu.medievalcraft.tileents.cannon.TileCannon_28; import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleIronOre; import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleLapis; @@ -184,6 +186,7 @@ public class RendererRegistry { ClientRegistry.bindTileEntitySpecialRenderer(TileLapisIngot.class, new LapisIngotRenderer()); ClientRegistry.bindTileEntitySpecialRenderer(TileCannon_28.class, new Render_Cannon_28()); + //ClientRegistry.bindTileEntitySpecialRenderer(TileCannonBall28.class, new Render_CannonBall_Iron()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTestBlock.class, new TestBlockRenderer()); diff --git a/src/main/java/com/kitsu/medievalcraft/renderer/blocks/cannons/Render_CannonBall_Projectile.java b/src/main/java/com/kitsu/medievalcraft/renderer/blocks/cannons/Render_CannonBall_Projectile.java deleted file mode 100644 index 706e688d..00000000 --- a/src/main/java/com/kitsu/medievalcraft/renderer/blocks/cannons/Render_CannonBall_Projectile.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.kitsu.medievalcraft.renderer.blocks.cannons; - -import org.lwjgl.opengl.GL11; - -import com.kitsu.medievalcraft.entity.EntityCannonBall; -import com.kitsu.medievalcraft.entity.ProjectileCannonBall; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.model.AdvancedModelLoader; -import net.minecraftforge.client.model.IModelCustom; - -public class Render_CannonBall_Projectile extends Render -{ - - //private static final ResourceLocation arrowTextures = new ResourceLocation("textures/entity/arrow.png"); - private static final ResourceLocation arrowTextures = new ResourceLocation("kitsumedievalcraft:textures/items/Cannon.png"); - public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/cannon_ball.obj"); - public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/Cannon.png"); - - public IModelCustom model = AdvancedModelLoader.loadModel(MODEL); - - public void doRender(ProjectileCannonBall ent, double x, double y, double z, float p_76986_8_, float p_76986_9_) - { - GL11.glPushMatrix(); - float scale = 0.01f; - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef((float)x, (float)y, (float)z ); - //GL11.glRotatef(ent.prevRotationYaw + (ent.rotationYaw - ent.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F); - //GL11.glRotatef(ent.prevRotationPitch + (ent.rotationPitch - ent.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F); - Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE); - model.renderAll(); - - GL11.glPopMatrix(); - } - - protected ResourceLocation getEntityTexture(ProjectileCannonBall p_110775_1_) - { - return arrowTextures; - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(Entity p_110775_1_) - { - return this.getEntityTexture((ProjectileCannonBall)p_110775_1_); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render