Everything posted by Kander16
-
[1.8] Unable to play unknown soundEvent
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.
-
[1.8] Armor won't repair
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.
-
[1.8] Is there a way to easily set the position of particles?
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.
-
[1.8] SOLVED: Charging 1 custom furnace updates amount in all custom furnaces.
I've got it to work. Thank you all for helping! http://greyminecraftcoder.blogspot.com.au/2015/01/gui-containers.html --> I understand now ;-)
-
[1.8] SOLVED: Charging 1 custom furnace updates amount in all custom furnaces.
getField?
-
[1.8] SOLVED: Charging 1 custom furnace updates amount in all custom furnaces.
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.
-
[1.8] SOLVED: Charging 1 custom furnace updates amount in all custom furnaces.
Oh, sorry, Newbie mistake, I looked over that one. Thanks for your help.
-
[1.8] SOLVED: Charging 1 custom furnace updates amount in all custom furnaces.
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
-
[1.8] Check wether a player is near a block or not?
Hi, Is there a way to check if a player is near a specific block? Thanks.
-
[1.8] Checks whether a player wears custom armor, and what parts of the armor
Thanks.
-
[1.8] Checks whether a player wears custom armor, and what parts of the armor
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.
-
Custom pane: weird texture problem.
Always the same, Search for a very difficult solution... In the end, i forgot to put a '.json' on a file. Thanks for helping.
-
Custom pane: weird texture problem.
Hello?
-
Custom pane: weird texture problem.
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
-
Custom pane: weird texture problem.
http://pastebin.com/BzXnEnBE
-
Custom pane: weird texture problem.
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]
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]
OK, Here is de BlockMyDoor.java file: http://pastebin.com/hGYPskNv
-
Custom door: Model definition for... not found [SOLVED]
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.
-
[1.8] TNT does not prime when I use my own sort of flint and steel. [SOLVED]
O no, I think a was a little bit tired yesterday :-P. The moment I waked up, looked 10 seconds at the code... and I was feeling stupid because I could not solve a simple thing! Thanks for helping. New code: http://pastebin.com/iRu2248k
-
[1.8] TNT does not prime when I use my own sort of flint and steel. [SOLVED]
I now have: http://pastebin.com/7j65ju6W But I do not now what to put in: if (state.getBlock() == Blocks.tnt) { }[/Code]
-
[1.8] TNT does not prime when I use my own sort of flint and steel. [SOLVED]
I just am not very good at modding itself, I am confused with forge 1.8 & I am still learing. Do you want to give me an example of how it should work with the tnt? Then I'll pointer out how it works. Thanks.
-
[1.8] TNT does not prime when I use my own sort of flint and steel. [SOLVED]
I don't really know how to do this then. I want to have the code checks that if you right click on tnt, it will explode.
-
[1.8] TNT does not prime when I use my own sort of flint and steel. [SOLVED]
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
-
[1.8] TNT does not prime when I use my own sort of flint and steel. [SOLVED]
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.
IPS spam blocked by CleanTalk.