-
Posts
403 -
Joined
-
Last visited
Everything posted by Kander16
-
Hi, I want to have a custom sound with my block. Everything looks fine, but when it should play the sound, I get this error message in the console: Unable to play unknown soundEvent: chef:sounds/ice_cream_maker.ogg How do I fix this? Block class: http://pastebin.com/phzLi5tP This method is called from TileEntity.
-
I think it is normal that the armor breaks when it has -1HP. Try instead of return repair.getItem() == Items.clay_ball ? true : false;[/Code] [code] @Override public boolean getIsRepairable(ItemStack input, ItemStack repair) { //input is the itemStack to be repaired, repair is the itemStack that should repair this item. //Change the bronze items to your own. return input.getItem() == MyItems.bronze_helmet && repair.getItem() == MyItems.bronze_ingot; } Also, the ? true : false[/Code] is not necessary, "input.getItem() instanceof ItemBronzeArmor && repair.getItem() == MyItems.bronze_ingo" already returns false or true. Hope this helps.
-
Hi, I am looking for a way to easily set the position of particles on blocks (Like particles on top of the block, in the middle of the block, on the side etc...). Is there a way to do this instead of typing this all by yourself? worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);[/Code] Because I think it is hard to understand. Thanks.
-
Hi, Hi, changing my code gives another problem. It seems that drawGuiContainerForegroundLayer only gets called when opening the gui. Only closing and re-opening the gui updates the information processed by drawGuiContainerForegroundLayer. When I make the variables (<water, heath>) static it does update the gui continously though.
-
Hi, If I charge 1 custom furnace with an Item (storing the item into the furnace), it will change the amount in every furnace of the same type. Like you put 1 water bucket into the furnace, it will 'store' the water into the custom furnace. But this will also store the same amount of water into all the other furnaces of the same type. Thanks for helping. TileEntityBoiler: http://pastebin.com/VkfqZEE9 GuiBoiler: http://pastebin.com/z3TCiMzw
-
Hi, Is there a way to check if a player is near a specific block? Thanks.
-
Hi, I have custom armor, and I want to 'test' wether a player wears custom made armor, and what parts of the armor that are weared. boots). Lets say I have an integer "armorWeared" of '0', and when the player wears a helmet we add 3 to "armorWeared", when the player wears boots, we add 1 to "armorWeared". Total: 4 And of course also, when the player takes of the helmet the total will be 1. How do I do this? Thanks.
-
Always the same, Search for a very difficult solution... In the end, i forgot to put a '.json' on a file. Thanks for helping.
-
Hello?
-
Blockstate: http://pastebin.com/cDyfq3EC Copper_Bars_n.json http://pastebin.com/bnd5ghpC Copper_Bars_ne.json http://pastebin.com/hupqdjfP Copper_bars_ns.json http://pastebin.com/uPgfBHsd Copper_bars_nse.json http://pastebin.com/egwm2CMP Copper_bars_nsew.json http://pastebin.com/UBYH54c7
-
http://pastebin.com/BzXnEnBE
-
Hi there, I've a problem with my custom-pane (copper bar) The texture works fine, when it is not connected to each other. '_' = working texture. '#' = not working texture. This works fine: __ This works fine: _ This does not work fine: _#_ or _###_ I do not know how to solve this problem. Any suggestions? Here a picture: http://minetronic.be/CopperBars Thanks.
-
Custom door: Model definition for... not found [SOLVED]
Kander16 replied to Kander16's topic in Modder Support
Thanks for helping! I've solved the problem. In ItemDoor.class: public static void placeDoor(World worldIn, BlockPos pos, EnumFacing facing, Block door) { BlockPos blockpos1 = pos.offset(facing.rotateY()); BlockPos blockpos2 = pos.offset(facing.rotateYCCW()); int i = (worldIn.getBlockState(blockpos2).getBlock().isNormalCube() ? 1 : 0) + (worldIn.getBlockState(blockpos2.up()).getBlock().isNormalCube() ? 1 : 0); int j = (worldIn.getBlockState(blockpos1).getBlock().isNormalCube() ? 1 : 0) + (worldIn.getBlockState(blockpos1.up()).getBlock().isNormalCube() ? 1 : 0); boolean flag = worldIn.getBlockState(blockpos2).getBlock() == door || worldIn.getBlockState(blockpos2.up()).getBlock() == door; boolean flag1 = worldIn.getBlockState(blockpos1).getBlock() == door || worldIn.getBlockState(blockpos1.up()).getBlock() == door; boolean flag2 = false; if (flag && !flag1 || j > i) { flag2 = true; } BlockPos blockpos3 = pos.up(); IBlockState iblockstate = door.getDefaultState().withProperty(BlockDoor.FACING, facing).withProperty(BlockDoor.HINGE, flag2 ? BlockDoor.EnumHingePosition.RIGHT : BlockDoor.EnumHingePosition.LEFT); worldIn.setBlockState(pos, iblockstate.withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER), 2); worldIn.setBlockState(blockpos3, iblockstate.withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER), 2); worldIn.notifyNeighborsOfStateChange(pos, door); worldIn.notifyNeighborsOfStateChange(blockpos3, door); } } U see theres BlockDoor.Half,... But my copper door (block) uses BlockMyDoor.java, so I needed to change BlockDoor.HALF,... to BlockMyDoor.HALF,... -
Custom door: Model definition for... not found [SOLVED]
Kander16 replied to Kander16's topic in Modder Support
OK, Here is de BlockMyDoor.java file: http://pastebin.com/hGYPskNv -
Hi, I've made a new door (copper door). But when I start my minecraft, This [16:13:57] [Client thread/ERROR] [FML]: Model definition for location smith:doorCopper#facing=south,half=upper,hinge=left,open=false,powered=true not found[/Code] Came up. I do not now what is wrong with this, but this does not work. Also, when I place my "ItemDoor" on the ground, my minecraft crashes. Any help is apprecciated. Full crash report: http://pastebin.com/brJcGUuy The JSON blockstate file: http://pastebin.com/K1hFuX5p Thanks.
-
I tried this, but it does not work. public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { pos = pos.offset(side); if (!playerIn.canPlayerEdit(pos, side, stack)) { return false; } else { if (worldIn.isAirBlock(pos)) { worldIn.playSoundEffect((double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); worldIn.setBlockState(pos, Blocks.fire.getDefaultState()); } if (worldIn.getBlockState(pos) instanceof BlockTNT) { tnt.explode(worldIn, pos, state, playerIn); worldIn.setBlockToAir(pos); } stack.damageItem(1, playerIn); return true; } } }[/Code] full code: http://pastebin.com/9Yw6PJCu
-
Hi, I have a custom sort of flint and steel, (magnesium and steel) which has the same purpose. Whenever I right click on the TNT, it does not directly get primed. I see that in the method of the BlockTNT.class OnBlockActivated, items.flint_and_steel in is. Now, my question is: How do I get TNT primed whenever I right click it with my magnesium and steel.