Jump to content

progamergalil

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by progamergalil

  1. So how can I resolve this problem? What I have to do?
  2. @MFMods Tells me that this is possible...how?
  3. OK, so I will use setBlockState, but it requiers an IBlockState, that must have the Block state ( setBlockState(pos, IBlockState, 3); ) ...how can I set Light Level by using this?
  4. Hello, how I can update the current light level?...This is my code: @SubscribeEvent public void NearUraniumEvent(PlayerEvent event) { int blockX = event.entityPlayer.getPosition().getX(); int blockY = event.entityPlayer.getPosition().down().getY(); int blockZ = event.entityPlayer.getPosition().getZ(); BlockPos pos = new BlockPos(blockX, blockY, blockZ); Block block = event.entityPlayer.worldObj.getBlockState(pos).getBlock(); if(block == NukeMod.uranium_grass) { System.out.println("Uranium_grass down!"); event.entityPlayer.worldObj.getBlockState(pos).getBlock().setLightLevel(1.0F); }else { event.entityPlayer.worldObj.getBlockState(pos).getBlock().setLightLevel(0.0F); } int light = event.entityPlayer.worldObj.getBlockState(pos).getBlock().getLightValue(); System.out.println("Light: " + light); } The light value changes correctly (There is the print in console...), but I don't know hoe to refresh the block Help me please.
  5. How can't be a command similar to EnumHand in minecraft 1.8???
  6. Ok, but what do I write in "the active side", "side I care about && active hand", "hand I care about". Sorry, I 'm very ignorant in this program.
  7. I want to send message "hello" every time I right click with my custom sword... How can I make in this case?
  8. Sorry, but I ' new in this type of program... Can you make an easy example?
  9. Sorry, I mean once per side / per hand... Can you give me an easy example?
  10. Can I have an example? I haven't found any example of this function...
  11. I mean that the function must write "hello world" only 1 time evry right click... I've think that I could make a function that "lock" onItemRightClick function if right click is pressed. int count = 1; public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { if (count == 1) { player.addChatMessage(new ChatComponentText("Right clicked")); } count = 0; } public void control() { if ("here test if mouse is NOT right clicked") { // <-- LOOK DOWN * count = 1; } } *This is the "if" that I don't know. Is possible to test in "if" if mouse is not right clicked? With this way the onItemRightClick function is executed ONE time (because the next time COUNT is equal to 0).
  12. And how to give to player an only item with onItemRightClick()? (every time that I right click I receive only 1 Item...)
  13. How can I call another function and stop onItemRightClick function? If I find a way to stop onItemRightClick function I 've find a solution... Is there any way to do this? (Can you make an easy example?)
  14. How can I put items in? (Which is the command?)
  15. I' ve a problem with onItemRightClick function... It' s a loop, and when I right click the text is repeated several times... How can I print only one time every time that I right click? Here is the code: @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { player.addChatMessage(new ChatComponentText("Hello world")); return stack; }
  16. Sorry, but I like 1.8... who can say how to place a chest woth item? please
  17. How can I place a chest with Items inside? I've tryed a lot of things, but the chest spawn without items... P.S. : I work in minecraft forge 1.8
  18. I've found another solution in ItemDoor. Thanks.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.