Jump to content

Failender

Forge Modder
  • Posts

    1091
  • Joined

  • Last visited

Everything posted by Failender

  1. as I said PlayerJoinServer wont replace correct in all cases. I am not even sure if there is one case where it will work
  2. bad idea. what will happen if the player dies and respawns
  3. http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571567-forge-1-6-4-1-8-eventhandler-and using google isnt that hard
  4. dont compare using equals, u can just do if stack.getItem==myItem
  5. no need to do that. if u make the clas implement ur interface via asm u can just cast to it and call the getter and setter. should be performance saving
  6. keep track of the entities, every tick check if the entites are dead, if they are spawn the chest. Hard part is the keeping track. You could easily check if ur entites die, using LivingDeathEvent, problem is keeping track of despawns I guess..
  7. Yes ernio is right. There is no way to detect the source of healing. What you could do is store some data in IEEP, e.g. the last healing. Everytime the player wants to heal check the amount (normal regen is half a heart) and the time. If you know how much time between healing ticks is u can exactly find out if the source COULD be regen.
  8. Thats bad coding style. worldIn.isRemote == true is the same as worldIn.isRemote
  9. How do you determine that it "doesn't save"? I guess because the entities color hasnt changed. In that case 10 bucks that server and client are out of sync and you need to synchronize using packets
  10. its hard to answer the question "how does this work" try to specify ur question please
  11. u can use the Minecraft class in ur ClientProxy, because it is client only. But I think the easiest way would be to override onItemRightClick in ur item class, make a check that the world is remote and after that Minecraft.getMinecraft().thePlayer.currentScreen = new EpicBookGui
  12. Lesson of the day : Read the last sentence of a request x)
  13. "hey I have a problem and cant figure out how to solve it" "oh I guess u would love to hear that I know all your code and can fix ur problem in no time" "oh man thats great!" guess what? we dont know ur code sadly please show ur code and tell us how u know the values are lost and how u are accessing it
  14. how about u tell us which version u are in? in 1.7 there is PlaySoundEvent
  15. use BreakEvent, if the block is "ur block" cancel the event and it wont get broken
  16. why would u pass the events as arguments to the proxies
  17. the FMLInit evnts are only called in ur main class. U need to call the proxy register renderer urself in the init method
  18. show proxy and main mod class
  19. did u register them in ur client proxy?
  20. did u double check ur json files?
  21. Hey folks, I need data on client and server side synced everytime a player rightclicks the block. I know that I need to use markBlockForUpdate and description packets. But when i call the markBlockForUpdate before opening the gui the data is not there when I need it. So where should I call it? @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ) { if(worldIn.isRemote) return true; worldIn.markBlockForUpdate(pos); playerIn.openGui(ShadowsRising.INSTANCE, ShadowsRising.GENERATOR, worldIn, pos.getX(), pos.getY(), pos.getZ()); return true; }
  22. what happens if they dont have op? ur code looks fine to me
  23. just looking at this video im not sure about this guy, since he isnt even using PascalCase do name his classes
  24. create ur own class extending Slot and override isItemValidForSlot
×
×
  • Create New...

Important Information

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