Failender
Forge Modder-
Posts
1091 -
Joined
-
Last visited
Everything posted by Failender
-
[1.7.10]Writing something else into the NBT?
Failender replied to BuddingDev's topic in Modder Support
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) -
[1.8] MInecraft Crashes when crafting custom Block
Failender replied to OnlyP1ng's topic in Modder Support
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. -
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
-
[1.8] MInecraft Crashes when crafting custom Block
Failender replied to OnlyP1ng's topic in Modder Support
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 -
[1.8] MInecraft Crashes when crafting custom Block
Failender replied to OnlyP1ng's topic in Modder Support
1. use code tags PLEASE [nobbc] put epic code here [/nobbc] 2. show crash (but with spoiler tags pls [nobbc] [/nobbc] -
[1.8] Custom Furnace, some bugs....that i am spinning in circles!
Failender replied to Vladan899's topic in Modder Support
Also please post your problem first and then your code :b makes reading a bit easier -
1.7.10 mod FML binary patch missing
Failender replied to DiamondHunter Zero's topic in Modder Support
[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 -
[1.7.10]hotswapping armor sets to gain multiple effects
Failender replied to UberAffe's topic in Modder Support
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 -
[1.7.10]hotswapping armor sets to gain multiple effects
Failender replied to UberAffe's topic in Modder Support
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 -
[1.7.10]hotswapping armor sets to gain multiple effects
Failender replied to UberAffe's topic in Modder Support
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) -
[1.7.10]hotswapping armor sets to gain multiple effects
Failender replied to UberAffe's topic in Modder Support
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. -
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.
-
take a look at the log json, u should find it quite interesting
-
wat?
-
[1.7.10]A little help with some block methods
Failender replied to Cerandior's topic in Modder Support
if you start a post please tell us which version it is. I assume 1.7? -
IExtendedEntityProperties not saving[1.8]
Failender replied to ItsAMysteriousYT's topic in Modder Support
where do you register the IEEP. cant see the event for that. -
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
-
[1.7.10] Multiblock Tile Entity Losing Data on Unload
Failender replied to turbodiesel4598's topic in Modder Support
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) -
never ever copy paste sth without thinking and expect it to work. of course u ned to replace modid and reed.
-
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