Jump to content

Failender

Forge Modder
  • Posts

    1091
  • Joined

  • Last visited

Everything posted by Failender

  1. 1. yes. 2. every complex complex consists of many simple parts. blockpos is a "complex" class that contains 3 values. so to write a blockpos to a nbt u need to write 3 values to the nbt, x,y,z. So to save ur class to nbt u need to write all the values it needs to reconstruct it as simple values (string/float/bool etc)
  2. Seems like there is a problem with ur json's, but that sohuldnt create a crash.. The problem isnt because u are crafting the item it seems like there is something wrong with rendering it.. I am not good at that, if u are lucky TheGreyGhost will take a look and find ur error :b For now. Show ur json's , since minecraft seems to miss them. Also DONT DO THIS Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(itemfromblock, 3, new ModelResourceLocation("kohlewerk:maschc", "inventory")); U need to do that inside ur proxy, because if u compile the mod and run it on a server it will throw you a ClassNotFound exception. Rendering stuff is Client ONLY so u need to register the renderer inside ur proxy.
  3. My idea would be to use a tickhandler to count ticks, add the item to a list, after a specific amount of ticks look if the stack still exists, if it does destroy it. that way you can bypass that they stop ticking when they are in a chest
  4. After reading what you have done, there is a lot of clean up to do. ItemStack maschc = new ItemStack(blockmaschc); No. Block blockmaschc = new BlockMaschC(); Should be public static public void CraftingOfen(){ } ? public void modinfo(ModMetadata data){ //Modinfos setzten data.autogenerated = false; data.name = EnumChatFormatting.BLUE + "" + EnumChatFormatting.BOLD + "Kohle Werk"; data.authorList = authors; data.description = "Dieser Mod fügt ein Kohlewerk hinzu mit dem man Erze vervielvältigen kann."; data.credits = "HyCraftHD"; data.logoFile = "assets/kohlewerk/textures/logo/logo.png"; data.version= "0.1"; } Not sure why you do this in a method if you can fill the mcmod.info (I think that was its name) To come to your problem. Replace the reference to the maschc with a new ItemStack(blockmaschc). If that doenst helps post your log and if u changed the code post it also. and please us tags
  5. 1. use code tags PLEASE [nobbc] put epic code here [/nobbc] 2. show crash (but with spoiler tags pls [nobbc] [/nobbc]
  6. Also please post your problem first and then your code :b makes reading a bit easier
  7. [18:54:37] [Client thread/ERROR] [FML]: Caught exception from examplemod java.lang.ClassCastException: net.minecraft.item.ItemRedstone cannot be cast to java.lang.Character Read the error log it is there to help you. Let me guess a bit. 1. You still got the examplemod in your IDE 2. You added a recipe to it
  8. fire the event again == duplicate no need to do that. the event itself is NOT damaging the player. it is just telling everyone hey look this guy got hurt, do you want to do anything about it? after the event is fired you should be able to look into the result and see the value of damage they should have taken. save that fire the event with the next armor set. check the results. decide which one you want to keep
  9. i cant tell you how to fire it, got no IDE here, but you can find it out yourself. just create a living hurt event and say open call hierachy ( right mouse button on the method? Im not sure google it) then you can see how forge fires the event. the event itself should not damage the entity ( I think) so there shouldnt be a problem firing it 1000000 times
  10. you want to save how much damage he took or what? you cant do that because the result of the damage you get may change (energy empty no quantum suit, no blood in ur network? goodbye bloodmagic)
  11. using IEEP wont help. seriously. My opinion, and I might be wrong, is that what you are triing to do might end in processor murder. My idea. You need to fire the living hurt event again by yourself for every piece/set of armor. After that evaluate the results and think how you want to handle the damage taken, because some armors totally absorb damage(blood magic?) , so you see okay one result says no damage, so I wont let the player gain ANY damage. For every other event it should work to fire the event again with the new set of armor equipped. But I tell you there are cases where this can cause REALLY strange effects. Feel free to correct me, I can be wrong.
  12. i never said u need to extend that, i just told you take a look how vanilla does. look at the log.json (i think it was that im not sure and got no ide here) , you will find how it is done there.
  13. take a look at the log json, u should find it quite interesting
  14. if you start a post please tell us which version it is. I assume 1.7?
  15. where do you register the IEEP. cant see the event for that.
  16. Im in 1.8 and dont got that method so I dont know. But what i was using all the time, what is working just fine is this if(output==null) inventory.setInventorySlotContents(2, new ItemStack(MoreOres.bronzeIngot, 4)); else output.stackSize+=4; Of course with a check if I can add 4 to the stack size so I wont end up with stacks bigger then 64
  17. This is a lot of code so I wont be reading all of it.. So just some common mistakes, maybe urs is in here. 1. Did you double check ur write and read NBT methods? 2. Are u syncing server and client? I guess u are seeing the "0" values in a gui, which might be the case because the client isnt synced with the server (welcome to the world of packets)
  18. 1. why . forge is already kinda doing that for you with just saying mods need to be on the same versions, or they get a connection refuse. I might be tripping with understanding you there
  19. in addition: if u are sending GB of data u are having serious problems :'D
  20. 1. what type of data are we talking about? clients should not process data, because then they can fake the results.. 2. one big packet is the best in my opinion, because theres really no sense in splitting those up 3. it wont crash because u use a mix of packets, itll crash if u mess sth up :b
  21. never ever copy paste sth without thinking and expect it to work. of course u ned to replace modid and reed.
  22. I might be retarded.. but could you describe your problem with chat please? I feel like i can see the error eclipse is throwing, but just for like 0.1 second..
  23. only thing you should take care of is getting the fields once and store them as variables , so u dont need to reflect every time u need the variable.
  24. i only used ore gen right now, http://bedrockminer.jimdo.com/modding-tutorials/basic-modding-1-7/world-generation/ for trees look at vanilla code, there is actually a tree generator
×
×
  • Create New...

Important Information

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