
sosoh
Members-
Posts
23 -
Joined
-
Last visited
Everything posted by sosoh
-
Like that: public static final int INV_SIZE = 21; I put 21 'cause if I put 20, I have got: [22:34:19] [server thread/ERROR] [FML]: Exception caught during firing event cpw.mods.fml.common.gameevent.TickEvent$PlayerTickEvent@2a4458e2: java.lang.ArrayIndexOutOfBoundsException: 20 at com.google.kujaff42530.moddofus.inventoryPlayer.MinefusInventoryPlayer.getStackInSlot(MinefusInventoryPlayer.java:39) ~[MinefusInventoryPlayer.class:?] It doesn't work with 21
-
I've uptdate my code: http://pastebin.com/hDVKkPH7, it does that: [21:40:22] [server thread/INFO] [sTDOUT]: [com.google.kujaff42530.moddofus.eventHandlers.MinefusEventHandler:itemPickedUp:96]: Event Works! [21:40:22] [server thread/INFO] [sTDOUT]: [com.google.kujaff42530.moddofus.eventHandlers.MinefusEventHandler:itemPickedUp:102]: first Slot empty player inv:-1 [21:40:22] [server thread/INFO] [sTDOUT]: [com.google.kujaff42530.moddofus.eventHandlers.MinefusEventHandler:itemPickedUp:106]: first Slot empty minefus inv:63 [21:40:22] [server thread/INFO] [sTDOUT]: [com.google.kujaff42530.moddofus.eventHandlers.MinefusEventHandler:itemPickedUp:110]: item nameGrass Block It write 63 has the first empty slot but my container goes to 20 at max, so I don't understand.. (I'm french so sorry for my english)
-
Well, I've made changes my new code: http://pastebin.com/5A1DrHK7 but it doesn't work: my logs: [20:44:54] [server thread/INFO] [sTDOUT]: [com.google.kujaff42530.moddofus.eventHandlers.MinefusEventHandler:itemPickedUp:96]: Event Works! [20:44:54] [server thread/INFO] [sTDOUT]: [com.google.kujaff42530.moddofus.eventHandlers.MinefusEventHandler:itemPickedUp:101]: first Slot empty player inv:-1 [20:44:54] [server thread/INFO] [sTDOUT]: [com.google.kujaff42530.moddofus.eventHandlers.MinefusEventHandler:itemPickedUp:105]:first Slot empty minefus inv:-1
-
Oh Tanks God! You've saved me! Thanks for all!
-
There is what I've got: [14:14:38] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: save{spellRight:"",Mana:0.0d,spellLeft:"",Spells:[0:"Accio",1:"Repulso",2:"Protego",],MaxMana:1000.0d,} [14:14:38] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: save{spellRight:"",Mana:0.0d,spellLeft:"",Spells:[0:"Accio",1:"Repulso",2:"Protego",],MaxMana:1000.0d,} [14:14:38] [server thread/INFO]: Saving worlds [14:14:38] [server thread/INFO]: Saving chunks for level 'Nouveau monde'/Overworld [14:14:38] [server thread/INFO]: Saving chunks for level 'Nouveau monde'/Nether [14:14:38] [server thread/INFO]: Saving chunks for level 'Nouveau monde'/The End [14:14:38] [server thread/INFO] [FML]: Unloading dimension 0 [14:14:38] [server thread/INFO] [FML]: Unloading dimension -1 [14:14:38] [server thread/INFO] [FML]: Unloading dimension 1 [14:14:38] [server thread/INFO] [FML]: Applying holder lookups [14:14:38] [server thread/INFO] [FML]: Holder lookups applied [14:15:08] [server thread/INFO]: Starting integrated minecraft server version 1.7.10 [14:15:08] [server thread/INFO]: Generating keypair [14:15:08] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance [14:15:08] [server thread/INFO] [FML]: Applying holder lookups [14:15:08] [server thread/INFO] [FML]: Holder lookups applied [14:15:08] [server thread/INFO] [FML]: Loading dimension 0 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@4a85f46d) [14:15:08] [server thread/INFO] [FML]: Loading dimension 1 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@4a85f46d) [14:15:09] [server thread/INFO] [FML]: Loading dimension -1 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@4a85f46d) [14:15:09] [server thread/INFO]: Preparing start region for level 0 [14:15:10] [server thread/INFO]: Preparing spawn area: 96% [14:15:10] [server thread/INFO]: Changing view distance to 8, from 10 [14:15:10] [Netty Client IO #1/INFO] [FML]: Server protocol version 1 [14:15:10] [Netty IO #3/INFO] [FML]: Client protocol version 1 [14:15:10] [Netty IO #3/INFO] [FML]: Client attempting to join with 4 mods : FML@7.10.85.1291,Forge@10.13.2.1291,mcp@9.05,hogsmod@0.1 [14:15:10] [Netty IO #3/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [14:15:10] [Netty Client IO #1/INFO] [FML]: Attempting connection with missing mods [] at SERVER [14:15:10] [server thread/INFO] [FML]: [server thread] Server side modded connection established [14:15:10] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [14:15:11] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:loadNBTData:94]: load{spellRight:"",Mana:0.0d,spellLeft:"",Spells:[0:"Accio",1:"Repulso",2:"Protego",],MaxMana:1000.0d,} [14:15:11] [server thread/INFO]: sosoh[local:E:7def91e3] logged in with entity id 190710 at (289.5, 4.0, 244.5) [14:15:11] [server thread/INFO]: sosoh joined the game [14:15:12] [server thread/INFO]: Saving and pausing game... [14:15:12] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: save{spellRight:"",Mana:0.0d,spellLeft:"",Spells:[],MaxMana:1000.0d,} [14:15:12] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: save{spellRight:"",Mana:0.0d,spellLeft:"",Spells:[],MaxMana:1000.0d,}
-
Well my code is the same as the code at the top, but I'd to put the PlayerEvent.Clone on an other class because I need both imports. The other class: [embed=425,349]package fr.sosoh.hogsmod.common.event; import net.minecraftforge.event.entity.player.PlayerEvent; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps; public class EventHandlerMain { @SubscribeEvent public void playerClone(PlayerEvent.Clone event) { ExtendedEntityProps epNew = ExtendedEntityProps.get(event.entityPlayer); ExtendedEntityProps epOld = ExtendedEntityProps.get(event.original); epNew.maxMana = epOld.maxMana; epNew.spellLeft = epOld.spellLeft; epNew.spellRight = epOld.spellRight; epNew.spellsList = epOld.spellsList; } }[/embed] And I've already put some system.out and it appeares that my saveNBTData is used when nothing happend: [01:07:15] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: saveNBT [01:07:15] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: saveNBT [01:08:00] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: saveNBT [01:08:00] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: saveNBT [01:08:45] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: saveNBT [01:08:45] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: saveNBT [01:09:30] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: saveNBT [01:09:30] [server thread/INFO] [sTDOUT]: [fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps:saveNBTData:79]: saveNBT Maybe I can send you my source folder ?
-
Well I meant, my IEEP aren't save with that code when I disconnect and reconnect.
-
Oh yeah thanks, bad PlayerEvent.class, I've done that, it's working but not when I disconnect/reconnect @SubscribeEvent public void playerClone(PlayerEvent.Clone event) { ExtendedEntityProps epNew = ExtendedEntityProps.get(event.entityPlayer); ExtendedEntityProps epOld = ExtendedEntityProps.get(event.original); epNew.mana = epOld.mana; epNew.maxMana = epOld.maxMana; epNew.spellLeft = epOld.spellLeft; epNew.spellRight = epOld.spellRight; epNew.spellsList = epOld.spellsList; }
-
Thanks for your help, so I delete all my old stuff (events, stuffs in the Common Proxy ect) and i just put your code? Eclipse doesn't find the event PlayerEvent.Clone May I change in PlayerEvent.PlayerRespawnEvent?
-
Hi, I'm french so sorry for my English I'll do my best, I'v done some ExtendedEntityProperties but they aren't saved when I die or leave the game. My event work 'cause I've put some System.out in different parts and it worked. There is my code: http://pastebin.com/LaGZ5sbb http://pastebin.com/2HLcpyQ7 http://pastebin.com/tsWihcuM Ask me if you want more class. I hope you will help me! PS: I've already done a post on the french forum: http://www.minecraftforgefrance.fr/showthread.php?tid=2023