Jump to content

Failender

Forge Modder
  • Posts

    1091
  • Joined

  • Last visited

Everything posted by Failender

  1. u should better be reading some minecraft modding tutorials.
  2. So. U are creating a new thread that is running infinite in ur main mad class that is doing exactly nothing. Why? Also dont register "this" as a event handler. create a separate class that handles events and register that. What the hell are u triing to do?
  3. what do you think you are doing with that thread
  4. you should be looking how vanilla caluclates those values.. then u will get the same results
  5. GuiIngameForge in 1.8, not sure about 1.7
  6. Hmm didnt knew it was a new thing in 1.8 , I apologize. private static void spawnItemStack(World worldIn, double p_180173_1_, double p_180173_3_, double p_180173_5_, ItemStack p_180173_7_) { float f = RANDOM.nextFloat() * 0.8F + 0.1F; float f1 = RANDOM.nextFloat() * 0.8F + 0.1F; float f2 = RANDOM.nextFloat() * 0.8F + 0.1F; while (p_180173_7_.stackSize > 0) { int i = RANDOM.nextInt(21) + 10; if (i > p_180173_7_.stackSize) { i = p_180173_7_.stackSize; } p_180173_7_.stackSize -= i; EntityItem entityitem = new EntityItem(worldIn, p_180173_1_ + (double)f, p_180173_3_ + (double)f1, p_180173_5_ + (double)f2, new ItemStack(p_180173_7_.getItem(), i, p_180173_7_.getMetadata())); if (p_180173_7_.hasTagCompound()) { entityitem.getEntityItem().setTagCompound((NBTTagCompound)p_180173_7_.getTagCompound().copy()); } float f3 = 0.05F; entityitem.motionX = RANDOM.nextGaussian() * (double)f3; entityitem.motionY = RANDOM.nextGaussian() * (double)f3 + 0.20000000298023224D; entityitem.motionZ = RANDOM.nextGaussian() * (double)f3; worldIn.spawnEntityInWorld(entityitem); } }
  7. are u using eclipse? if u do strg+shift+ t
  8. player.inventory.seInventorySlotContents(desiredSlot, null) removes the item from the inventory. To drop it in the world look at InventoryHelper.dropInventorySlotContents. u should find help there
  9. Yeah I wasnt sure about that, hoped there was a better way. Thank you sir
  10. Exactly. It does that using detectAndSendChanges. So. Is there a good way without detectAndSendChanges? I could of course also use a custom packet, but I feel like there must be another way
  11. I am damaging the items on server side (they are a energy storage and im usign damage values to check out how much energy is left) . I am rendering the energy left on client side which means I need the damage value on client side. But its not getting synced by default, because its not in a opened container. Which means I need to force the update. The question is not the where, the question is the how. So my question is has vanilla a built in way to synchronize itemstacks I can use.
  12. Hey folks, I have an item that I store inside an inventory of my IEEP. I need to have that item synchronized at all time because I am calculating values for custom gui rendering from its durabilty. The problem is that right now it is only synchronized when I open the container where I use this item. How can I force this item to update , I could use a custom packet but I feel like minecraft must have a built in way I dont know about. Greetz Failender
  13. I am using the mcpbot http://mcpbot.bspk.rs/
  14. I guess U should be using BreakSpeed and HarvestDrops events to manage that they wont drop
  15. then u wil get ClassNotFoundException. Pass the world as an argument to ur method. U get the world object from Item#onItemRightClick
  16. we wont write ur mod 4 u. If u want to write ur own mod learn java. then come back. or find some1 u can pay to write ur mod. but dont expect us to help u without u learning java.
  17. and i answered that
  18. dont read everything but there is a big mistake inside. ur StoneDungeon stuff is for generating something. So it shall only run on server side. But u are calling Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentTranslation("Creating "+output.size()+" Rooms")); Never ever call Minecraft on server side, since it is not existing on server side. If u want the player u need to pass it as argument fromthe item rightclick method
  19. the code u posted is not even urs. study more and come back with a question
  20. already done that still dont changes the fact that i will need to add sth to the x value and scale that. and the event.resolution.getScaleFactor() is to inaccurate, since its an integer.
  21. not until u understood what hes doing there and are able to ask me a specific question. im not gonna write ur mod 4 u
  22. so u have copy pasted code from TheBedrockMiner.
  23. show ur actual code and the StoneDungeon stuff pleaese
×
×
  • Create New...

Important Information

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