Résolu [FFMT]Crash avec les packets
-
Salut à tous et à toutes.
Je me retrouve ce soir confronté à un crash avec un npe mais vraiment je ne comprends rien du tout. Je m’explique.
J’ai commencé la lecture du tuto sur le network mais j’ai plus ou moins compris que avec netty cela causerait des fuites de mémoire donc j’ai préféré utilisé l’api ffmt qui elle permet aussi d’enregistrer les packets . Mais pour moi c’est un grand bazard j’ai retenu quelque notion (les packets, l’envoie client serveur ou vice-versa) Mais ce que je souhaite avant tout avec les packet c’est mon keybinding pour qu’il fonctionne sur serveur. Et ça je ne comprends pas comment le réaliser avec les packets.Du coup j’ai remonté sur un post assez ancien et j’ai copié collé toutes les class du UltimateGraviSuiteMod qui traitait aussi l’ajout de nouvelles touches pour me permettre d’y arriver à mon tour. Mais sachez que je ne m’amuse à copié collé comme un kikou les codes que j’ai sous les mains. AVANT TOUT je préferre les comprendre et ce qui n’a pas été le cas car j’ai dû loupé quelque chose, d’où mon crash. Alors je viens vous demander mon aide pour me permettre en premier de m’expliquer mon erreur et par la suite si je n’arrive pas à la corriger de me redonner un petit coup de pouce. Sans plus tarder je vous divulgue mes class :Mon keybinding en solo
package mrplaigon.psccraft.minesagasmod.client; import org.lwjgl.input.Keyboard; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ClientRegistry; import mrplaigon.psccraft.minesagasmod.common.MineSagasMod; import mrplaigon.psccraft.minesagasmod.common.PacketKeys; import mrplaigon.psccraft.minesagasmod.common.UGSKeyboard; import net.minecraft.client.settings.KeyBinding; public class KeyBindings extends UGSKeyboard { public static KeyBinding openGUI; private int lastKeyState = 0; public static void init() { openGUI = new KeyBinding("key.openGUI", Keyboard.KEY_Z, "MineSagas Mod -Test de touches"); ClientRegistry.registerKeyBinding(openGUI); } public void sendKeyUpdate() { int currentKeyState = (this.openGUI.isPressed() ? 1 : 0) << 0; if(currentKeyState != this.lastKeyState) { this.lastKeyState = currentKeyState; try { MineSagasMod.packetHandler.sendToServer(new PacketKeys(currentKeyState)); } catch(Exception exception) { MineSagasMod.ugslogger.error("Failed to send a key packet"); } super.processKeyUpdate(FMLClientHandler.instance().getClientPlayerEntity(), currentKeyState); } } }
celui en multi
package mrplaigon.psccraft.minesagasmod.common; import java.util.HashMap; import java.util.Map; import net.minecraft.entity.player.EntityPlayer; public class UGSKeyboard { private final Map <entityplayer, boolean="">openGUI = new HashMap(); public void registerKey() { } public boolean openGUIKeyDown(EntityPlayer player) { if(this.openGUI.containsKey(player)) { return this.openGUI.get(player); } return false; } public boolean isSneakKeyDown(EntityPlayer player) { return player.isSneaking(); } public void sendKeyUpdate() {} public void processKeyUpdate(EntityPlayer player, int keyState) { this.openGUI.put(player, Boolean.valueOf((keyState & 0x2) != 0)); } public void removePlayerReferences(EntityPlayer player) { this.openGUI.remove(player); } }
ma class channel
package mrplaigon.psccraft.minesagasmod.common; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandler.Sharable; import io.netty.channel.ChannelHandlerContext; import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec; @Sharable public class ChannelHandler extends FMLIndexedMessageToMessageCodec <ffmtpacket>{ @Override public void encodeInto(ChannelHandlerContext ctx, FFMTPacket packet, ByteBuf target) throws Exception { packet.writeData(target); } @Override public void decodeInto(ChannelHandlerContext ctx, ByteBuf source, FFMTPacket packet) { packet.readData(source); } }
mon packet pour le keybinding
package mrplaigon.psccraft.minesagasmod.common; import io.netty.buffer.ByteBuf; import java.io.IOException; import net.minecraft.entity.player.EntityPlayer; public class PacketKeys extends FFMTPacket { private int keyState; public PacketKeys() { } public PacketKeys(int currentKeyState) { this.keyState = currentKeyState; } @Override public void writeData(ByteBuf buffer) throws IOException { buffer.writeInt(this.keyState); } @Override public void readData(ByteBuf buffer) { this.keyState = buffer.readInt(); } @Override public void handleClientSide(EntityPlayer player) { } @Override public void handleServerSide(EntityPlayer player) { MineSagasMod.keyboard.processKeyUpdate(player, this.keyState); } @Override public int getDiscriminator() { return 0; } }
mon packetManager
package mrplaigon.psccraft.minesagasmod.common; import java.io.File; import java.io.IOException; import java.util.EnumMap; import java.util.Enumeration; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import net.minecraft.entity.player.EntityPlayerMP; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; import cpw.mods.fml.common.network.FMLEmbeddedChannel; import cpw.mods.fml.common.network.FMLOutboundHandler; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.relauncher.Side; public class PacketManager { private EnumMap <side, fmlembeddedchannel="">channels; private ChannelHandler channelHandler; private PacketHandler packetHandler; /** * Register a packet handler * * @param packetsPackage * The package where all your packet are located * @param modid * The modid of your mod */ public PacketManager(String packetsPackage, String modid, String channel) { this.channelHandler = new ChannelHandler(); this.packetHandler = new PacketHandler(); this.channels = NetworkRegistry.INSTANCE.newChannel(channel, channelHandler, packetHandler); ModContainer mod = Loader.instance().getIndexedModList().get(modid); try { if(mod.getSource().isDirectory()) { File packetsDir = new File(mod.getSource(), packetsPackage.replace(".", "/")); for(String packet : packetsDir.list()) { packet = packet.replace(".class", ""); Class c = Class.forName(packetsPackage + "." + packet); if(isInstanceof(c, FFMTPacket.class)) { registerPacket((Class)c); } } } else { ZipFile zipFile = new ZipFile(mod.getSource()); Enumeration entries = zipFile.entries(); while(entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); if(entry.getName().startsWith(packetsPackage.replace(".", "/")) && entry.getName().endsWith(".class")) { Class c = Class.forName(entry.getName().replace(".class", "").replace("/", ".")); if(isInstanceof(c, FFMTPacket.class)) { registerPacket((Class)c); } } } zipFile.close(); } } catch(IOException e) { System.err.println("Failed to register packet for the mod : " + mod.getModId()); e.printStackTrace(); } catch(ClassNotFoundException e) { System.err.println("Failed to register packet for the mod : " + mod.getModId()); e.printStackTrace(); } } private static boolean isInstanceof(Class c1, Class c) { Class[] ints = c1.getInterfaces(); if(ints != null) for(int i = 0; i < ints.length; i++) { if(c == ints*) return true; } if(c1 == c) { return true; } while(!verifySuperclass(c1, c)) { c1 = c1.getSuperclass(); if(c1 == null) return false; } return true; } private static boolean verifySuperclass(Class daughter, Class mother) { if(daughter.getSuperclass() == mother) { return true; } else { return false; } } private boolean registerPacket(Class clazz) { try { int discriminator = clazz.newInstance().getDiscriminator(); if(discriminator >= 256) { MineSagasMod.ffmtLog.error("You can't add more than 256 packet in one channel"); return false; } channelHandler.addDiscriminator(discriminator, clazz); MineSagasMod.ffmtLog.info("Successful register packet : " + clazz.getCanonicalName() + " with discriminator " + discriminator); return true; } catch(InstantiationException e) { e.printStackTrace(); MineSagasMod.ffmtLog.error("The packet " + clazz.getCanonicalName() + " has not a blank constructor"); } catch(IllegalAccessException e) { e.printStackTrace(); MineSagasMod.ffmtLog.error("The constructor of the packet " + clazz.getCanonicalName() + "isn't accessible"); } return false; } public void sendToAll(FFMTPacket message) { this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL); this.channels.get(Side.SERVER).writeAndFlush(message); } public void sendTo(FFMTPacket message, EntityPlayerMP player) { this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER); this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(player); this.channels.get(Side.SERVER).writeAndFlush(message); } public void sendToAllAround(FFMTPacket message, NetworkRegistry.TargetPoint point) { this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT); this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(point); this.channels.get(Side.SERVER).writeAndFlush(message); } public void sendToDimension(FFMTPacket message, int dimensionId) { this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.DIMENSION); this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(dimensionId); this.channels.get(Side.SERVER).writeAndFlush(message); } public void sendToServer(FFMTPacket message) { this.channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER); this.channels.get(Side.CLIENT).writeAndFlush(message); } }
mon packet handler
package mrplaigon.psccraft.minesagasmod.common; import io.netty.channel.ChannelHandler.Sharable; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.network.INetHandler; import net.minecraft.network.NetHandlerPlayServer; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @Sharable public class PacketHandler extends SimpleChannelInboundHandler <ffmtpacket>{ @Override protected void channelRead0(ChannelHandlerContext ctx, FFMTPacket packet) throws Exception { EntityPlayer player; switch(FMLCommonHandler.instance().getEffectiveSide()) { case CLIENT: player = this.getClientPlayer(); packet.handleClientSide(player); break; case SERVER: INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); player = ((NetHandlerPlayServer)netHandler).playerEntity; packet.handleServerSide(player); break; } } @SideOnly(Side.CLIENT) private EntityPlayer getClientPlayer() { return Minecraft.getMinecraft().thePlayer; } }
ffmt packet
package mrplaigon.psccraft.minesagasmod.common; import io.netty.buffer.ByteBuf; import java.io.IOException; import net.minecraft.entity.player.EntityPlayer; public abstract class FFMTPacket { public abstract void writeData(ByteBuf buffer) throws IOException; public abstract void readData(ByteBuf buffer); public abstract void handleClientSide(EntityPlayer player); public abstract void handleServerSide(EntityPlayer player); /** * * @return discriminator of the packet, */ public abstract int getDiscriminator(); }
ma class event handler pour le side client (pas sûr qu’elle soit necessaire mais je l’ai vu et m’en suis donc crée une aussi)
package mrplaigon.psccraft.minesagasmod.client; import mrplaigon.psccraft.minesagasmod.common.MineSagasMod; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; public class ClientEventHandler { @SubscribeEvent public void onTickPlayer(TickEvent.PlayerTickEvent event) { if(event.phase == TickEvent.Phase.END) { MineSagasMod.keyboard.sendKeyUpdate(); } } }
et celle pour le side server
package mrplaigon.psccraft.minesagasmod.common; import net.minecraft.client.Minecraft; import net.minecraft.world.World; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; public class MineSagasEventHandler { public static boolean zIsPressed = false; public Minecraft mc; public MineSagasEventHandler (Minecraft mc) { this.mc = mc; } @SubscribeEvent public void onTickPlayer(TickEvent.PlayerTickEvent event) { if(MineSagasMod.keyboard.openGUIKeyDown(event.player)) { System.out.println("ça marche ? client et serveur ?"); } } }
et au cas où ma class mod :
package mrplaigon.psccraft.minesagasmod.common; import java.awt.Color; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import mrplaigon.psccraft.minesagasmod.client.KeyBindings; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid="minesagasmod", name="MineSagasMod", version="1.0.0") public class MineSagasMod { public static final String MODID = "minesagasmod"; @Instance("minesagasmod") public static MineSagasMod instance; @SidedProxy(clientSide="mrplaigon.psccraft.minesagasmod.client.MineSagasClientProxy", serverSide="mrplaigon.psccraft.minesagasmod.common.MineSagasCommonProxy") public static MineSagasCommonProxy commonproxy; public static CreativeTabs mineSagasModCreativeTabs = new mineSagasModCreativeTabs("mineSagasModCreativeTabs"); public static final PacketManager packetHandler = new PacketManager("mrplaigon.psccraft.minesagasmod.common", MineSagasMod.MODID, "UGS"); public static Logger ffmtLog = LogManager.getLogger("FFMTLibs"); public static Logger ugslogger; @SidedProxy(clientSide = "mrplaigon.psccraft.minesagasmod.client.KeyBindings", serverSide = "mrplaigon.psccraft.minesagasmod.common.UGSKeyboard") public static UGSKeyboard keyboard; @EventHandler public void preInit(FMLPreInitializationEvent event) { System.out.println("preinit"); commonproxy.initialiseTickHandler(); ugslogger = event.getModLog(); } @EventHandler public void init(FMLInitializationEvent event) { System.out.println("init"); commonproxy.registerEntityRenderer(); commonproxy.registerItemRenderer(); commonproxy.registerTileEntitySpecialRenderer(); keyboard.registerKey(); if(event.getSide().isClient()) { MinecraftForge.EVENT_BUS.register(new MineSagasEventHandler(Minecraft.getMinecraft())); } FMLCommonHandler.instance().bus().register(new MineSagasEventHandler(Minecraft.getMinecraft())); MinecraftForge.EVENT_BUS.register(new MineSagasEventHandler(Minecraft.getMinecraft())); } @EventHandler public void postInit(FMLPostInitializationEvent event) { System.out.println("postinit"); } }
Mon crash-report:
–-- Minecraft Crash Report ---- // Hey, that tickles! Hehehe! Time: 01/11/14 22:53 Description: Initializing game java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:420) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at cpw.mods.fml.common.Loader.loadMods(Loader.java:492) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204) at net.minecraft.client.Minecraft.startGame(Minecraft.java:532) at net.minecraft.client.Minecraft.run(Minecraft.java:941) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at GradleStart.bounce(GradleStart.java:107) at GradleStart.startClient(GradleStart.java:100) at GradleStart.main(GradleStart.java:55) Caused by: java.lang.NullPointerException at mrplaigon.psccraft.minesagasmod.common.PacketManager.registerPacket(PacketManager.java:139) at mrplaigon.psccraft.minesagasmod.common.PacketManager.<init>(PacketManager.java:51) at mrplaigon.psccraft.minesagasmod.common.MineSagasMod.<clinit>(MineSagasMod.java:181) ... 42 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:420) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at cpw.mods.fml.common.Loader.loadMods(Loader.java:492) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204) at net.minecraft.client.Minecraft.startGame(Minecraft.java:532) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:941) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at GradleStart.bounce(GradleStart.java:107) at GradleStart.startClient(GradleStart.java:100) at GradleStart.main(GradleStart.java:55) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_71, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 703796944 bytes (671 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.18.1180 Minecraft Forge 10.13.0.1180 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{7.10.18.1180} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed Forge{10.13.0.1180} [Minecraft Forge] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed minesagasmod{1.0.0} [MineSagasMod] (bin) Unloaded Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: AMD Radeon HD 8570D GL version 4.4.13084 Compatibility Profile Context 14.301.1004.0, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [Soartex-Fanver-1.8.zip] Current Language: Français (France) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: On (16)
En espérant que vous allez m’aider, je vous remercie d’avance et n’hésitez pas à me dire si j’ai oublié une class dans ce message ;)</clinit></init></ffmtpacket></side,></ffmtpacket></entityplayer,>
-
Pourquoi avoir copier/coller les class de la FFMT_libs alors, que tu aurais pu directement utiliser le jar de dev?
Ton crash indique la ligne 139 du PacketManager, qu’as-tu à cette ligne?
-
@‘Superloup10’:
Pourquoi avoir copier/coller les class de la FFMT_libs alors, que tu aurais pu directement utiliser le jar de dev?
Ton crash indique la ligne 139 du PacketManager, qu’as-tu à cette ligne?
Je veux bien mais tous les liens que j’ai trouvé pour avoir les sources sont morts ou l’accès au site du mod nanotech m’est interdit alors pour avoir le .jar….Difficile?
Regarde bien j’ai mis le packet manager
J’ai ça à ma ligne 139 :
MineSagasMod.ffmtLog.error(“The packet " + clazz.getCanonicalName() + " has not a blank constructor”);
Le packet n’aurait pas un bon constructeur? J’ai pris le même que le vôtre…
-
Il ne manque pas de classe, par contre :
at mrplaigon.psccraft.minesagasmod.common.MineSagasMod.<clinit>(MineSagasMod.java:181)Or ta classe n’a moins de 181 lignes ici, donc ça va pas être facile pour trouver d’où vient ce NPE …
Ensuite quelques questions :
- As-tu vraiment compris ce que tu as copié ? Je dis ça car tu as copié le logger de FFMT et celui de UGS alors qu’il ne te sert à rien. Tu as également nommé une de tes classes UGSKeyboard alors que UGS signifie … UltimateGraviSuite … à ce que je sache ton mod n’a pas le même nom.
- Pourquoi copier tout le code de FFMT lib alors qu’ajouter FFMT lib dans ton classpath serait beaucoup plus simple ? https://github.com/FFMT/Privatizer/blob/master/build.gradle#L49-L58
- Et question final, pourquoi se faire chier avec des packets alors que tu veux ouvrir un gui (si j’ai bien compris) ???
ça n’a aucun sens, tu envoie un truc au serveur, pour qu’il renvoie l’ordre au client d’ouvrir le gui ? autant le faire directement sur le client.
EDIT : le problème est que ton logger est null, met proprement FFMT libs dans ton classpath et ça sera ok.
Et comment ça impossible de download ffmt lib ? -
https://github.com/FFMT/FFMT-libs
C’est clair comme de l’eau de roche, tu n’as pas de constructeur vide dans ton packet. <- EDIT: Pour cette partie, j’ai rien dit.
-
@‘robin4002’:
Il ne manque pas de classe, par contre :
at mrplaigon.psccraft.minesagasmod.common.MineSagasMod.<clinit>(MineSagasMod.java:181)Or ta classe n’a moins de 181 lignes ici, donc ça va pas être facile pour trouver d’où vient ce NPE …
Ensuite quelques questions :
- As-tu vraiment compris ce que tu as copié ? Je dis ça car tu as copié le logger de FFMT et celui de UGS alors qu’il ne te sert à rien. Tu as également nommé une de tes classes UGSKeyboard alors que UGS signifie … UltimateGraviSuite … à ce que je sache ton mod n’a pas le même nom.
- Pourquoi copier tout le code de FFMT lib alors qu’ajouter FFMT lib dans ton classpath serait beaucoup plus simple ? https://github.com/FFMT/Privatizer/blob/master/build.gradle#L49-L58
- Et question final, pourquoi se faire chier avec des packets alors que tu veux ouvrir un gui (si j’ai bien compris) ???
ça n’a aucun sens, tu envoie un truc au serveur, pour qu’il renvoie l’ordre au client d’ouvrir le gui ? autant le faire directement sur le client.</clinit>
Bon les ligne qu’il pointaient dans ma class mod sont celles-ci
la 51 désigne un import d’un item que j’avais crée bizarre? mon item gun ….WTF
181) public static final PacketManager packetHandler = new PacketManager(“mrplaigon.psccraft.minesagasmod.common”, MineSagasMod.MODID, “UGS”);
je pensais qu’en copiant le loger il pourrait quand il y a une erreur me dire laquelle (c’est le but d’un logger et de la ligne où il est, il y a un try et un catch, à moins que je me trompe sur toute la ligne j’ai préferré le prendre plutôt que le contraire)
Sur le coup du UGS j’ai pas vraiment réfléchi je m’occupais de régler toutes les autres erreurs dans toutes les class mais juste pour un nom que je modifierai après que le packet fonctionne à la limite je m’enfichais.
Effectivement je n’y avais pas pensé pour le class path je regarderai une fois que cela fonctionnera.
Nan tu n’as pas compris effectivement j’aurai du modifier le nom de la variable c’est juste que j’avais regardé un tuto où le bouton s’appellait comme ça et je comptais le renommer un de ses quatre ^^ Désolé je n’ai pas été trop précis sur ce coupJe vous renvoie la classe principale au complet cette fois ci (PS = n’esayer pas de comprendre pk je ne l’avais pas fait la première fois surement un délire qui m’arrive de temps en temps ><)
package mrplaigon.psccraft.minesagasmod.common; import java.awt.Color; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import mrplaigon.psccraft.minesagasmod.client.KeyBindings; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.mineSagasModCreativeTabs; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.FunPSCModCreativeTabs; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.blocks.blockTest; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.entities.mob.EntityBarMan; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.entities.mob.EntityDj; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.entities.mob.EntityPute; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemCdDareShakira; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemCdFeatTheMagicInTheAir; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemCdMerciQui; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemCdNewWorldSound; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemEpeePersonnage; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemLecteurDj; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemTest; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemVodka; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.block.blockstesr.BlockHayner; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.block.blockstesr.BlockSetzer; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.ItemStella; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.itemCIN1; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDDearlyOblivied; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDDiveIntoTheHeart; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDFragmentsOfSorrow; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDLazyAfternoons; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDPassion; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDPassionSingle; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDSinisterSundown; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDTensionRising; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDTheEscapade; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.tileentity.TileEntityBlockHayner; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.tileentity.TileEntityBlockSetzer; import mrplaigon.psccraft.minesagasmod.common.ModTest.block.blocks.BlockSpeed; import mrplaigon.psccraft.minesagasmod.common.ModTest.block.blocks.BlockTutoriel; import mrplaigon.psccraft.minesagasmod.common.ModTest.block.ores.BlockMineraiUranium; import mrplaigon.psccraft.minesagasmod.common.ModTest.entity.mob.EntityAragog; import mrplaigon.psccraft.minesagasmod.common.ModTest.entity.mob.EntityBadman; import mrplaigon.psccraft.minesagasmod.common.ModTest.entity.mob.EntityChocogrenouille; import mrplaigon.psccraft.minesagasmod.common.ModTest.entity.mob.EntityMobTutoriel; import mrplaigon.psccraft.minesagasmod.common.ModTest.entity.mob.EntityVlad; import mrplaigon.psccraft.minesagasmod.common.ModTest.generation.WorldGeneration; import mrplaigon.psccraft.minesagasmod.common.ModTest.generation.biome.BiomeSuper; import mrplaigon.psccraft.minesagasmod.common.ModTest.item.ItemArmorEmeraude; import mrplaigon.psccraft.minesagasmod.common.ModTest.item.ItemBaguette; import mrplaigon.psccraft.minesagasmod.common.ModTest.item.ItemBatonMineur; import mrplaigon.psccraft.minesagasmod.common.ModTest.item.ItemGun; import mrplaigon.psccraft.minesagasmod.common.ModTest.item.ItemTutoriel; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.potion.Potion; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.common.BiomeManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid="minesagasmod", name="MineSagasMod", version="1.0.0") public class MineSagasMod { public static final String MODID = "minesagasmod"; @Instance("minesagasmod") public static MineSagasMod instance; @SidedProxy(clientSide="mrplaigon.psccraft.minesagasmod.client.MineSagasClientProxy", serverSide="mrplaigon.psccraft.minesagasmod.common.MineSagasCommonProxy") public static MineSagasCommonProxy commonproxy; //DÉCLARATION DES VARIABLES DES ITEMS public static Item itemtutoriel; public static Item itemGun; public static Item munitionGun; public static Item batonDeMineur; public static Item baguette; //DÉCLARATION DES VARIABLES DES ITEMS FUNPSC MOD public static Item test; public static Item portable; public static Item vodka; public static Item lecteurDj; public static Item cdNewWorldSound; public static Item epeePersonnage; public static Item cdDareShakira; public static Item cdMerciQui; public static Item cdFeatTheMagicInTheAir; WorldGeneration worldgeneration = new WorldGeneration(); //DÉCLARATION DES VARIABLES DES ITEMS KINGDOM HEARTS 2 public static Item chaineRoyale; public static Item tendrePromesse; public static Item stella; public static Item dragonTapis; public static Item emblemeDeHeros; public static Item gouvernail; public static Item cercleVital; public static Item souvenirPerdu; public static Item debuggerPhoton; public static Item monochrome; public static Item roseDeCombat; public static Item albatros; public static Item lionAssoupi; public static Item citrouilleDeNoel; public static Item lampeMagique; public static Item ameDeGardien; public static Item batonStruggleAttaque; public static Item batonStruggleDefense; public static Item batonStruggleMagie; public static Item cdDearlyOblivied; public static Item cdPassion; public static Item cdPassionSingle; public static Item cdLazyAfternoons; public static Item cdSinisterSundown; public static Item cdTheEscapade; public static Item cdDiveIntoTheHeart; public static Item cdFragmentsOfSorrow; public static Item cdTensionRising; public static Item itemCIN1; //DÉCLARATION DES VARIABLES DES Blocks KINGDOM HEARTS 2 public static Block blockHayner; public static Block blockSetzer; //DÉCLARATION DES VARIABLES DES BLOCKS public static Block blocktutoriel; public static Block blockSpeed; public static Block blockmineraiuranium; //DÉCLARATION DES VARIABLES DES BLOCKS FUNPSC MOD public static Block test1; //DÉCLARATION DES VARIABLES DES ARMURES public static Item casqueEmeraude; public static Item plastronEmeraude; public static Item jambiereEmeraude; public static Item bottesEmeraude; public static BiomeGenBase[] biomes = { BiomeGenBase.plains, BiomeGenBase.extremeHills, BiomeGenBase.beach, BiomeGenBase.desert, BiomeGenBase.desertHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.icePlains, BiomeGenBase.iceMountains, BiomeGenBase.river, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, BiomeGenBase.coldBeach, BiomeGenBase.coldTaiga, BiomeGenBase.coldTaigaHills, BiomeGenBase.deepOcean, BiomeGenBase.extremeHillsPlus, BiomeGenBase.jungleEdge, BiomeGenBase.megaTaiga, BiomeGenBase.megaTaigaHills, BiomeGenBase.mesa, BiomeGenBase.mesaPlateau, BiomeGenBase.mesaPlateau_F, BiomeGenBase.roofedForest, BiomeGenBase.savanna, BiomeGenBase.savannaPlateau, BiomeGenBase.stoneBeach }; //DÉCLARATION DU TOOLMATERIAL public static ArmorMaterial emeraude = EnumHelper.addArmorMaterial("emeraude", 66, new int[] {6, 16, 12, 6}, 40);//En fait c'est une armure qui a les mêmes valeurs que celle en diams mais doublée sauf pour l'enchantement protected static final BiomeGenBase.Height height_Super = new BiomeGenBase.Height(0.2F, 0.2F); //DÉCLARATION DES VARIABLES DIVERSES DU MOD public static CreativeTabs mineSagasModCreativeTabs = new mineSagasModCreativeTabs("mineSagasModCreativeTabs"); public static final PacketManager packetHandler = new PacketManager("mrplaigon.psccraft.minesagasmod.common", MineSagasMod.MODID, "UGS"); public static Logger ffmtLog = LogManager.getLogger("FFMTLibs"); public static Logger ugslogger; @SidedProxy(clientSide = "mrplaigon.psccraft.minesagasmod.client.KeyBindings", serverSide = "mrplaigon.psccraft.minesagasmod.common.UGSKeyboard") public static UGSKeyboard keyboard; public static BiomeGenBase superbiome; //DÉCLARATION DES VARIABLES DIVERSES DU MOD FUNPSC MOD public static CreativeTabs TutorialCreativeTabs = new FunPSCModCreativeTabs("PSCCreativeTabs"); @EventHandler public void preInit(FMLPreInitializationEvent event) { System.out.println("preinit"); commonproxy.initialiseTickHandler(); ugslogger = event.getModLog(); //DÉCLARATION PRINCIPALES DES ITEMS itemtutoriel = new ItemTutoriel().setUnlocalizedName("tutoriel").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":itemtutoriel"); GameRegistry.registerItem(itemtutoriel, "item_tutoriel"); batonDeMineur = new ItemBatonMineur().setUnlocalizedName("batonDeMineur").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":batondemineur"); GameRegistry.registerItem(batonDeMineur, "batonDeMineur"); baguette = new ItemBaguette().setUnlocalizedName("baguette").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":batondemineur"); GameRegistry.registerItem(baguette, "baguette"); itemGun = new ItemGun().setUnlocalizedName("itemGun").setFull3D().setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setMaxDamage(29).setTextureName(MineSagasMod.MODID + ":itemGun").setMaxStackSize(1);//la valeur du .setMaxDamage doit être soustrait d'une unité pour cause : un bug du jeu. Le pistolet (ou le gun) a une durabilité de 30, il s'utilise 30 fois GameRegistry.registerItem(itemGun, "itemGun"); munitionGun = new ItemTutoriel().setUnlocalizedName("munitionGun").setMaxStackSize(10).setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":munitionGun"); GameRegistry.registerItem(munitionGun, "munitionGun"); //DÉCLARATION PRINCIPALES DES ITEMS FUNPSC MOD test = new itemTest().setUnlocalizedName("test").setCreativeTab(TutorialCreativeTabs).setTextureName(MineSagasMod.MODID + ":test"); GameRegistry.registerItem(test, "test"); vodka = new itemVodka(0, 0.0F, true).setPotionEffect(Potion.blindness.id, 7, 3, 1.0F).setUnlocalizedName("vodka").setCreativeTab(TutorialCreativeTabs).setTextureName(MineSagasMod.MODID + ":vodka"); GameRegistry.registerItem(vodka, "vodka"); lecteurDj = new itemLecteurDj().setUnlocalizedName("lecteurDj").setMaxStackSize(1).setCreativeTab(TutorialCreativeTabs).setTextureName(MineSagasMod.MODID + ":lecteurDj"); GameRegistry.registerItem(lecteurDj, "lecteurDj"); epeePersonnage = new itemEpeePersonnage(Item.ToolMaterial.IRON).setUnlocalizedName("epeePersonnage").setCreativeTab(TutorialCreativeTabs).setTextureName(MineSagasMod.MODID + ":epeePersonnage"); GameRegistry.registerItem(epeePersonnage, "epeePersonnage"); cdNewWorldSound = new itemCdNewWorldSound("New World Sound - 1st Track FunPSC Mod").setUnlocalizedName("cdNewWorldSound").setTextureName(MineSagasMod.MODID + ":cdNewWorldSound").setCreativeTab(TutorialCreativeTabs); GameRegistry.registerItem(cdNewWorldSound, "cdNewWorldSound"); cdDareShakira = new itemCdDareShakira("Dare Dare, Shakira - 2nd Track FunPSC Mod").setUnlocalizedName("cdDareShakira").setTextureName(MineSagasMod.MODID + ":cdDareShakira").setCreativeTab(TutorialCreativeTabs); GameRegistry.registerItem(cdDareShakira, "cdDareShakira"); cdMerciQui = new itemCdMerciQui("Merci Qui - 3rd Track FunPSC Mod").setUnlocalizedName("cdMerciQui").setTextureName(MineSagasMod.MODID + ":cdMerciQui").setCreativeTab(TutorialCreativeTabs); GameRegistry.registerItem(cdMerciQui, "cdMerciQui"); cdFeatTheMagicInTheAir = new itemCdFeatTheMagicInTheAir("Feat the magic in the air - 4th Track FunPSC Mod").setUnlocalizedName("cdFeatTheMagicInTheAir").setTextureName(MineSagasMod.MODID + ":cdFeatTheMagicInTheAir").setCreativeTab(TutorialCreativeTabs); GameRegistry.registerItem(cdFeatTheMagicInTheAir, "cdFeatTheMagicInTheAir"); //DÉCLARATION PRINCIPALES DES ITEMS KINGDOM HEARTS 2 chaineRoyale = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("chaineRoyale").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":chaine royale"); GameRegistry.registerItem(chaineRoyale, "chaineRoyale"); tendrePromesse = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("tendrePromesse").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":tendre promesse"); GameRegistry.registerItem(tendrePromesse, "tendrePromesse"); stella = new ItemStella(ToolMaterial.EMERALD).setUnlocalizedName("stella").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":stella"); GameRegistry.registerItem(stella, "stella"); dragonTapis = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("dragonTapis").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":dragonTapis"); GameRegistry.registerItem(dragonTapis, "dragonTapis"); emblemeDeHeros = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("emblemeDeHeros").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":emblemeDeHeros"); GameRegistry.registerItem(emblemeDeHeros, "emblemeDeHeros"); gouvernail = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("gouvernail").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":gouvernail"); GameRegistry.registerItem(gouvernail, "gouvernail"); cercleVital = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("cercleVital").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cercleVital"); GameRegistry.registerItem(cercleVital, "cercleVital"); souvenirPerdu = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("souvenirPerdu").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":souvenirPerdu"); GameRegistry.registerItem(souvenirPerdu, "souvenirPerdu"); debuggerPhoton = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("debuggerPhoton").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":debuggerPhoton"); GameRegistry.registerItem(debuggerPhoton, "debuggerPhoton"); monochrome = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("monochrome").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":monochrome"); GameRegistry.registerItem(monochrome, "monochrome"); roseDeCombat = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("roseDeCombat").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":roseDeCombat"); GameRegistry.registerItem(roseDeCombat, "roseDeCombat"); albatros = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("albatros").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":albatros"); GameRegistry.registerItem(albatros, "albatros"); lionAssoupi = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("lionAssoupi").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":lionAssoupi"); GameRegistry.registerItem(lionAssoupi, "lionAssoupi"); citrouilleDeNoel = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("citrouilleDeNoel").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":citrouilleDeNoel"); GameRegistry.registerItem(citrouilleDeNoel, "citrouilleDeNoel"); lampeMagique = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("lampeMagique").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":lampeMagique"); GameRegistry.registerItem(lampeMagique, "lampeMagique"); ameDeGardien = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("ameDeGardien").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":ameDeGardien"); GameRegistry.registerItem(ameDeGardien, "ameDeGardien"); batonStruggleAttaque = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("batonStruggleAttaque").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":baton struggle attaque"); GameRegistry.registerItem(batonStruggleAttaque, "batonStruggleAttaque"); batonStruggleDefense = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("batonStruggleDefense").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":baton struggle defense"); GameRegistry.registerItem(batonStruggleDefense, "batonStruggleDefense"); batonStruggleMagie = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("batonStruggleMagie").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":baton struggle magie"); GameRegistry.registerItem(batonStruggleMagie, "batonStruggleMagie"); itemCIN1 = new itemCIN1().setUnlocalizedName("itemCIN1").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":itemCIN1"); GameRegistry.registerItem(itemCIN1, "itemCIN1"); cdDearlyOblivied = new itemCDDearlyOblivied("Dearly Oblivied - 1st Song").setUnlocalizedName("cdDearlyOblivied").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdDearlyOblivied"); GameRegistry.registerItem(cdDearlyOblivied, "cdDearlyOblivied"); cdPassion = new itemCDPassion("Passion Orchestra Instrumental Version - 2nd Song").setUnlocalizedName("cdPassion").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdPassion"); GameRegistry.registerItem(cdPassion, "cdPassion"); cdPassionSingle = new itemCDPassionSingle("Dearly Passion Single Version - 3rd Song").setUnlocalizedName("cdPassionSingle").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdPassionSingle"); GameRegistry.registerItem(cdPassionSingle, "cdPassionSingle"); cdLazyAfternoons = new itemCDLazyAfternoons("Lazy Afternoons - 4th Song").setUnlocalizedName("cdLazyAfternoons").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdLazyAfternoons"); GameRegistry.registerItem(cdLazyAfternoons, "cdLazyAfternoons"); cdSinisterSundown = new itemCDSinisterSundown("Sinister Sundown - 5th Song").setUnlocalizedName("cdSinisterSundown").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdSinisterSundown"); GameRegistry.registerItem(cdSinisterSundown, "cdSinisterSundown"); cdTheEscapade = new itemCDTheEscapade("The Escapade - 6th Song").setUnlocalizedName("cdTheEscapade").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdTheEscapade"); GameRegistry.registerItem(cdTheEscapade, "cdTheEscapade"); cdDiveIntoTheHeart = new itemCDDiveIntoTheHeart("Dive Into The Heart - 7th Song").setUnlocalizedName("cdDiveIntoTheHeart").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdDiveIntoTheHeart"); GameRegistry.registerItem(cdDiveIntoTheHeart, "cdDiveIntoTheHeart"); cdFragmentsOfSorrow = new itemCDFragmentsOfSorrow("Fragments Of Sorrow - 8th Song").setUnlocalizedName("cdFragmentsOfSorrow").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdFragmentsOfSorrow"); GameRegistry.registerItem(cdFragmentsOfSorrow, "cdFragmentsOfSorrow"); cdTensionRising = new itemCDTensionRising("Tension Rising - 9th Song").setUnlocalizedName("cdTensionRising").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdTensionRising"); GameRegistry.registerItem(cdTensionRising, "cdTensionRising"); //DÉCLARATION PRINCIPALES DES BLOCKS KINGDOM HEARTS 2 blockHayner = new BlockHayner(Material.rock).setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setBlockName("blockHayner").setBlockTextureName(MineSagasMod.MODID + ":blockHayner"); GameRegistry.registerBlock(blockHayner, "blockHayner"); blockSetzer = new BlockSetzer(Material.rock).setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setBlockName("blockSetzer").setBlockTextureName(MineSagasMod.MODID + ":blockHayner"); GameRegistry.registerBlock(blockSetzer, "blockSetzer"); //DÉCLARATION PRINCIPALES DES BLOCKS blocktutoriel = new BlockTutoriel(Material.grass).setBlockName("blocktutoriel").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setBlockTextureName(MineSagasMod.MODID + ":blocktutoriel"); GameRegistry.registerBlock(blocktutoriel, "blocktutoriel"); blockSpeed = new BlockSpeed(Material.glass).setBlockName("blockSpeed").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setBlockTextureName(MineSagasMod.MODID + ":blockSpeed"); GameRegistry.registerBlock(blockSpeed, "blockSpeed"); blockmineraiuranium = new BlockMineraiUranium(Material.rock).setBlockName("blockmineraiuranium").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setBlockTextureName(MineSagasMod.MODID + ":blockmineraiuranium").setHardness(10.0F).setResistance(5.0F).setLightLevel(2.0F); GameRegistry.registerBlock(blockmineraiuranium, "blockmineraiuranium"); //DÉCLARATION PRINCIPALES DES BLOCKS FUNPSC MOD test1 = new blockTest(Material.rock).setCreativeTab(TutorialCreativeTabs).setBlockName("test1").setBlockTextureName("MineSagasMod:test1"); GameRegistry.registerBlock(test1, "test1"); //DÉCLARATION PRINCIPALE DES ARMURES casqueEmeraude = new ItemArmorEmeraude(this.emeraude, 0).setUnlocalizedName("casqueEmeraude").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":casqueEmeraude");//0 est une valeur qui ne doit pas être changée au fil des déclarations d'armure car forge s'en charge lui-même plastronEmeraude = new ItemArmorEmeraude(this.emeraude, 1).setUnlocalizedName("plastronEmeraude").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":plastronEmeraude"); jambiereEmeraude = new ItemArmorEmeraude(this.emeraude, 2).setUnlocalizedName("jambiereEmeraude").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":jambiereEmeraude"); bottesEmeraude = new ItemArmorEmeraude(this.emeraude, 3).setUnlocalizedName("bottesEmeraude").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":bottesEmeraude"); GameRegistry.registerItem(casqueEmeraude, "casqueEmeraude"); GameRegistry.registerItem(plastronEmeraude, "plastronEmeraude"); GameRegistry.registerItem(jambiereEmeraude, "jambiereEmeraude"); GameRegistry.registerItem(bottesEmeraude, "bottesEmeraude"); //ENREGISTREMENT DES TILE ENTITY GameRegistry.registerTileEntity(TileEntityBlockHayner.class, "blockHayner"); GameRegistry.registerTileEntity(TileEntityBlockSetzer.class, "blockSetzer"); GameRegistry.addRecipe(new ItemStack(plastronEmeraude, 1), new Object[] { "X X", "XXX", "XXX", Character.valueOf('X'), Items.emerald }); GameRegistry.addRecipe(new ItemStack(casqueEmeraude, 1), new Object[] { "XXX", "X X", Character.valueOf('X'), Items.emerald }); GameRegistry.addRecipe(new ItemStack(jambiereEmeraude, 1), new Object[] { "XXX", "X X", "X X", Character.valueOf('X'), Items.emerald }); GameRegistry.addRecipe(new ItemStack(bottesEmeraude, 1), new Object[] { "X X", "X X", Character.valueOf('X'), Items.emerald }); GameRegistry.registerWorldGenerator(worldgeneration, 0); } @EventHandler public void init(FMLInitializationEvent event) { System.out.println("init"); commonproxy.registerEntityRenderer(); commonproxy.registerItemRenderer(); commonproxy.registerTileEntitySpecialRenderer(); keyboard.registerKey(); //DÉCLARATION PRINCIPALES DES ENTITÉES EntityRegistry.registerGlobalEntityID(EntityMobTutoriel.class, "mobTutoriel", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityMobTutoriel.class, "mobTutoriel", 420, this.instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityAragog.class, "aragog", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityAragog.class, "aragog", 421, this.instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityChocogrenouille.class, "chocogrenouille", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityChocogrenouille.class, "chocogrenouille", 422, this.instance, 40, 1, true); /**EntityRegistry.registerGlobalEntityID(EntityServeuse.class, "serveuse", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityServeuse.class, "serveuse", 423, this.instance, 40, 1, true);*/ EntityRegistry.registerGlobalEntityID(EntityBadman.class, "badman", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityBadman.class, "badman", 424, this.instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityVlad.class, "vlad", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityVlad.class, "vlad", 425, this.instance, 40, 1, true); //EntityRegistry.addSpawn(EntityVlad.class, 5, 1, 3, EnumCreatureType.monster, this.biomes); //DÉCLARATION PRINCIPALES DES ENTITÉES FUNPSC MOD EntityRegistry.registerGlobalEntityID(EntityTest.class, "test2", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(79, 255, 35).getRGB()); EntityRegistry.registerModEntity(EntityTest.class, "test2", 426, instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityBarMan.class, "barman", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 255, 255).getRGB()); EntityRegistry.registerModEntity(EntityBarMan.class, "barman", 428, instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityDj.class, "dj", EntityRegistry.findGlobalUniqueEntityId(), new Color(127, 51, 0).getRGB(), new Color(0, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityDj.class, "dj", 429, instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityPute.class, "pute", EntityRegistry.findGlobalUniqueEntityId(), new Color(255, 223, 201).getRGB(), new Color(124, 82, 53).getRGB()); EntityRegistry.registerModEntity(EntityPute.class, "pute", 430, instance, 40, 1, true); superbiome = new BiomeSuper(137).setBiomeName("superbiome").setTemperatureRainfall(1.2F, 0.9F); BiomeDictionary.registerBiomeType(superbiome, Type.FOREST); BiomeManager.addSpawnBiome(superbiome); if(event.getSide().isClient()) { MinecraftForge.EVENT_BUS.register(new MineSagasEventHandler(Minecraft.getMinecraft())); } FMLCommonHandler.instance().bus().register(new MineSagasEventHandler(Minecraft.getMinecraft())); MinecraftForge.EVENT_BUS.register(new MineSagasEventHandler(Minecraft.getMinecraft())); } @EventHandler public void postInit(FMLPostInitializationEvent event) { System.out.println("postinit"); } }
-
@‘robin4002’:
Il ne manque pas de classe, par contre :
at mrplaigon.psccraft.minesagasmod.common.MineSagasMod.<clinit>(MineSagasMod.java:181)Or ta classe n’a moins de 181 lignes ici, donc ça va pas être facile pour trouver d’où vient ce NPE …
Ensuite quelques questions :
- As-tu vraiment compris ce que tu as copié ? Je dis ça car tu as copié le logger de FFMT et celui de UGS alors qu’il ne te sert à rien. Tu as également nommé une de tes classes UGSKeyboard alors que UGS signifie … UltimateGraviSuite … à ce que je sache ton mod n’a pas le même nom.
- Pourquoi copier tout le code de FFMT lib alors qu’ajouter FFMT lib dans ton classpath serait beaucoup plus simple ? https://github.com/FFMT/Privatizer/blob/master/build.gradle#L49-L58
- Et question final, pourquoi se faire chier avec des packets alors que tu veux ouvrir un gui (si j’ai bien compris) ???
ça n’a aucun sens, tu envoie un truc au serveur, pour qu’il renvoie l’ordre au client d’ouvrir le gui ? autant le faire directement sur le client.
EDIT : le problème est que ton logger est null, met proprement FFMT libs dans ton classpath et ça sera ok.
Et comment ça impossible de download ffmt lib ?</clinit>Bah je vais ici sur ce lien trouvé sur ce post http://minecraftforgefrance.fr/showthread.php?tid=65
http://dl.mcnanotech.fr/FFMT/API/download/Erreur 404 not found.
Ensuite je vais sur ce lien http://www.minecraftforgefrance.fr/showthread.php?tid=59
à la deuxième page du post avec la réponse d’isador34 tu redonnes un autre lien qui lui aussi est not found : http://mods.mcnanotech.fr/index.php/Téléchargement_de_FFMT_lib
Sinon je suis en train de mettre la ffmt libs dans mon classpath et je te dis tout aprèsEDIT = Voici mon build.gradle j’ai redémarré eclipse j’ai extend une classe UGSKeyboard rien à faire comme si ça n’avait pas ajouté la lib :
buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" name = "mff" url = "http://files.minecraftforgefrance.fr/maven/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' compile 'fr.minecraftforgefrance:FFMT-libs:1.4.3.91-mc1.7.10:dev' } } apply plugin: 'forge' version = "1.0.0" group= "mrplaigon.psccraft.MINESAGASMOD" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "MineSagasMod" minecraft { version = "1.7.10-10.13.0.1200" assetDir = "eclipse/assets" } dependencies { // you may put jars on which you depend on in ./libs // or you may define them like so.. //compile "some.group:artifact:version:classifier" //compile "some.group:artifact:version" // real examples //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // for more info… // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } }
Alors si vous avez une solution svp?
SInon j’avais pensé si je l’ajoute dans properties / java build path / add external jars… Ca ne marcherait pas ? Mais toute façon je n’ai pas de lien de téléchargement pour le .jar >< -
Sinon code ton propre envoi de donner avec la lib java.net
-
buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } apply plugin: 'forge' version = "1.0.0" group= "mrplaigon.psccraft.MINESAGASMOD" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "MineSagasMod" minecraft { version = "1.7.10-10.13.0.1200" assetDir = "eclipse/assets" } repositories { maven { name = "mff" url = "http://files.minecraftforgefrance.fr/maven/" } } dependencies { compile 'fr.minecraftforgefrance:FFMT-libs:1.4.3.91-mc1.7.10:dev' } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } }
Si tu mets tout au mauvais endroit ça ne risque pas de fonctionner …
Et il faut refaire un gradlew eclipse après.Et sinon FFMT lib est ici : http://ci.mcnanotech.fr/job/FFMT-libs/
-
@‘robin4002’:
buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } apply plugin: 'forge' version = "1.0.0" group= "mrplaigon.psccraft.MINESAGASMOD" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "MineSagasMod" minecraft { version = "1.7.10-10.13.0.1200" assetDir = "eclipse/assets" } repositories { maven { name = "mff" url = "http://files.minecraftforgefrance.fr/maven/" } } dependencies { compile 'fr.minecraftforgefrance:FFMT-libs:1.4.3.91-mc1.7.10:dev' } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } }
Si tu mets tout au mauvais endroit ça ne risque pas de fonctionner …
Et il faut refaire un gradlew eclipse après.Et sinon FFMT lib est ici : http://ci.mcnanotech.fr/job/FFMT-libs/
Merci robin Je teste et j’édite
-
Cette fois, j’ai fait comme t’as dit regarde mon build.graddle et les quelque autres images, je ne comprends pas ><
buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } apply plugin: 'forge' version = "1.0.0" group= "mrplaigon.psccraft.MINESAGASMOD" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "MineSagasMod" minecraft { version = "1.7.10-10.13.0.1200" assetDir = "eclipse/assets" } dependencies { // you may put jars on which you depend on in ./libs // or you may define them like so.. //compile "some.group:artifact:version:classifier" //compile "some.group:artifact:version" // real examples //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // for more info… // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } repositories { maven { name = "mff" url = "http://files.minecraftforgefrance.fr/maven/" } } dependencies { compile 'fr.minecraftforgefrance:FFMT-libs:1.4.3.91-mc1.7.10:dev' } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } }
(PS = il n’est pas comme celui que tu m’as envoyé car il me fait un build failed quand je fais gradlew eclipse contrairement au mien qui ne m’en fait pas)
Regarde le lien de mon image du cmd gradlew eclipse il me met que ça a marché mais quelque chose d’autre avec le runDir je n’ai pas compris ça vient de là?
http://hpics.li/69d8d8eet l’erreur de l’extends dans eclipse qui prouve que la lib n’a pas été ajouté
http://hpics.li/551bc7a -
ah bon, ça à fonctionné comme ça alors que tu as deux fois dependencies dans ton buid.gradle ? Étrange …
Et non c’est normal, la classe UGSKeyBoard n’existe pas dans FFMT lib, je t’ai déjà dit que UGS = UltimateGraviSuite, donc c’est une classe d’UltimateGraviSuite …
-
Bon c’est très laborieux : plus de crash mais pas de nouvelle touche dans les config ni de message dans les log lorsque j’appuie sur z en jeu : voici mes class :
A aussi, j’ai rien dans les log qui m’indiquerait une quelconque erreur. Mais si vous les voulez quand même je peux vous les donner
mon packet
package mrplaigon.psccraft.minesagasmod.common; import io.netty.buffer.ByteBuf; import java.io.IOException; import net.minecraft.entity.player.EntityPlayer; import fr.minecraftforgefrance.ffmtlibs.network.FFMTPacket; public class PacketKeys extends FFMTPacket { private int keyState; public PacketKeys() { } public PacketKeys(int currentKeyState) { this.keyState = currentKeyState; } @Override public void writeData(ByteBuf buffer) throws IOException { buffer.writeInt(this.keyState); } @Override public void readData(ByteBuf buffer) { this.keyState = buffer.readInt(); } @Override public void handleClientSide(EntityPlayer player) { } @Override public void handleServerSide(EntityPlayer player) { MineSagasMod.keyboard.processKeyUpdate(player, this.keyState); } }
mon keybind en solo
package mrplaigon.psccraft.minesagasmod.client; import mrplaigon.psccraft.minesagasmod.common.KeyBindingsServer; import mrplaigon.psccraft.minesagasmod.common.MineSagasMod; import mrplaigon.psccraft.minesagasmod.common.PacketKeys; import net.minecraft.client.settings.KeyBinding; import org.lwjgl.input.Keyboard; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ClientRegistry; public class KeyBindingsSolo extends KeyBindingsServer { public static KeyBinding testTouche; private int lastKeyState = 0; public static void init() { testTouche = new KeyBinding("key.openGUI", Keyboard.KEY_Z, "MineSagas Mod -Test de touches"); ClientRegistry.registerKeyBinding(testTouche); } public void sendKeyUpdate() { int currentKeyState = (this.testTouche.isPressed() ? 1 : 0) << 0; if(currentKeyState != this.lastKeyState) { this.lastKeyState = currentKeyState; try { MineSagasMod.packetHandler.sendToServer(new PacketKeys(currentKeyState)); } catch(Exception exception) { } super.processKeyUpdate(FMLClientHandler.instance().getClientPlayerEntity(), currentKeyState); } } }
et celui en server
package mrplaigon.psccraft.minesagasmod.common; import java.util.HashMap; import java.util.Map; import net.minecraft.entity.player.EntityPlayer; public class KeyBindingsServer { private final Map <entityplayer, boolean="">testTouche = new HashMap(); public void registerKey() { } public boolean testToucheKeyDown(EntityPlayer player) { if(this.testTouche.containsKey(player)) { return this.testTouche.get(player); } return false; } public void sendKeyUpdate() { } public void processKeyUpdate(EntityPlayer player, int keyState) { this.testTouche.put(player, Boolean.valueOf((keyState & 0x2) != 0)); } public void removePlayerReferences(EntityPlayer player) { this.testTouche.remove(player); } }
ma class mod
package mrplaigon.psccraft.minesagasmod.common; import java.awt.Color; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import mrplaigon.psccraft.minesagasmod.client.KeyBindingsSolo; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.mineSagasModCreativeTabs; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.FunPSCModCreativeTabs; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.blocks.blockTest; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.entities.mob.EntityBarMan; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.entities.mob.EntityDj; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.entities.mob.EntityPute; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemCdDareShakira; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemCdFeatTheMagicInTheAir; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemCdMerciQui; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemCdNewWorldSound; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemEpeePersonnage; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemLecteurDj; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemTest; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.FunPSCMod.items.itemVodka; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.block.blockstesr.BlockHayner; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.block.blockstesr.BlockSetzer; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.ItemStella; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.itemCIN1; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDDearlyOblivied; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDDiveIntoTheHeart; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDFragmentsOfSorrow; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDLazyAfternoons; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDPassion; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDPassionSingle; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDSinisterSundown; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDTensionRising; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.item.cds.itemCDTheEscapade; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.tileentity.TileEntityBlockHayner; import mrplaigon.psccraft.minesagasmod.common.MineKingdomHeartsMod.tileentity.TileEntityBlockSetzer; import mrplaigon.psccraft.minesagasmod.common.ModTest.block.blocks.BlockSpeed; import mrplaigon.psccraft.minesagasmod.common.ModTest.block.blocks.BlockTutoriel; import mrplaigon.psccraft.minesagasmod.common.ModTest.block.ores.BlockMineraiUranium; import mrplaigon.psccraft.minesagasmod.common.ModTest.entity.mob.EntityAragog; import mrplaigon.psccraft.minesagasmod.common.ModTest.entity.mob.EntityBadman; import mrplaigon.psccraft.minesagasmod.common.ModTest.entity.mob.EntityChocogrenouille; import mrplaigon.psccraft.minesagasmod.common.ModTest.entity.mob.EntityMobTutoriel; import mrplaigon.psccraft.minesagasmod.common.ModTest.entity.mob.EntityVlad; import mrplaigon.psccraft.minesagasmod.common.ModTest.generation.WorldGeneration; import mrplaigon.psccraft.minesagasmod.common.ModTest.generation.biome.BiomeSuper; import mrplaigon.psccraft.minesagasmod.common.ModTest.item.ItemArmorEmeraude; import mrplaigon.psccraft.minesagasmod.common.ModTest.item.ItemBaguette; import mrplaigon.psccraft.minesagasmod.common.ModTest.item.ItemBatonMineur; import mrplaigon.psccraft.minesagasmod.common.ModTest.item.ItemGun; import mrplaigon.psccraft.minesagasmod.common.ModTest.item.ItemTutoriel; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.potion.Potion; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.common.BiomeManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; import fr.minecraftforgefrance.ffmtlibs.network.PacketManager; @Mod(modid="minesagasmod", name="MineSagasMod", version="1.0.0") public class MineSagasMod { public static final String MODID = "minesagasmod"; @Instance("minesagasmod") public static MineSagasMod instance; @SidedProxy(clientSide="mrplaigon.psccraft.minesagasmod.client.MineSagasClientProxy", serverSide="mrplaigon.psccraft.minesagasmod.common.MineSagasCommonProxy") public static MineSagasCommonProxy commonproxy; //DÉCLARATION DES VARIABLES DES ITEMS public static Item itemtutoriel; public static Item itemGun; public static Item munitionGun; public static Item batonDeMineur; public static Item baguette; //DÉCLARATION DES VARIABLES DES ITEMS FUNPSC MOD public static Item test; public static Item portable; public static Item vodka; public static Item lecteurDj; public static Item cdNewWorldSound; public static Item epeePersonnage; public static Item cdDareShakira; public static Item cdMerciQui; public static Item cdFeatTheMagicInTheAir; WorldGeneration worldgeneration = new WorldGeneration(); //DÉCLARATION DES VARIABLES DES ITEMS KINGDOM HEARTS 2 public static Item chaineRoyale; public static Item tendrePromesse; public static Item stella; public static Item dragonTapis; public static Item emblemeDeHeros; public static Item gouvernail; public static Item cercleVital; public static Item souvenirPerdu; public static Item debuggerPhoton; public static Item monochrome; public static Item roseDeCombat; public static Item albatros; public static Item lionAssoupi; public static Item citrouilleDeNoel; public static Item lampeMagique; public static Item ameDeGardien; public static Item batonStruggleAttaque; public static Item batonStruggleDefense; public static Item batonStruggleMagie; public static Item cdDearlyOblivied; public static Item cdPassion; public static Item cdPassionSingle; public static Item cdLazyAfternoons; public static Item cdSinisterSundown; public static Item cdTheEscapade; public static Item cdDiveIntoTheHeart; public static Item cdFragmentsOfSorrow; public static Item cdTensionRising; public static Item itemCIN1; //DÉCLARATION DES VARIABLES DES Blocks KINGDOM HEARTS 2 public static Block blockHayner; public static Block blockSetzer; //DÉCLARATION DES VARIABLES DES BLOCKS public static Block blocktutoriel; public static Block blockSpeed; public static Block blockmineraiuranium; //DÉCLARATION DES VARIABLES DES BLOCKS FUNPSC MOD public static Block test1; //DÉCLARATION DES VARIABLES DES ARMURES public static Item casqueEmeraude; public static Item plastronEmeraude; public static Item jambiereEmeraude; public static Item bottesEmeraude; public static BiomeGenBase[] biomes = { BiomeGenBase.plains, BiomeGenBase.extremeHills, BiomeGenBase.beach, BiomeGenBase.desert, BiomeGenBase.desertHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.icePlains, BiomeGenBase.iceMountains, BiomeGenBase.river, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, BiomeGenBase.coldBeach, BiomeGenBase.coldTaiga, BiomeGenBase.coldTaigaHills, BiomeGenBase.deepOcean, BiomeGenBase.extremeHillsPlus, BiomeGenBase.jungleEdge, BiomeGenBase.megaTaiga, BiomeGenBase.megaTaigaHills, BiomeGenBase.mesa, BiomeGenBase.mesaPlateau, BiomeGenBase.mesaPlateau_F, BiomeGenBase.roofedForest, BiomeGenBase.savanna, BiomeGenBase.savannaPlateau, BiomeGenBase.stoneBeach }; //DÉCLARATION DU TOOLMATERIAL public static ArmorMaterial emeraude = EnumHelper.addArmorMaterial("emeraude", 66, new int[] {6, 16, 12, 6}, 40);//En fait c'est une armure qui a les mêmes valeurs que celle en diams mais doublée sauf pour l'enchantement protected static final BiomeGenBase.Height height_Super = new BiomeGenBase.Height(0.2F, 0.2F); //DÉCLARATION DES VARIABLES DIVERSES DU MOD @SidedProxy(clientSide = "mrplaigon.psccraft.minesagasmod.client.KeyBindingsSolo", serverSide = "mrplaigon.psccraft.minesagasmod.common.KeyBindingsServer") public static KeyBindingsServer keyboard; public static final PacketManager packetHandler = new PacketManager("mrplaigon.psccraft.minesagasmod.common", "minesagasmod", "MSM"); public static CreativeTabs mineSagasModCreativeTabs = new mineSagasModCreativeTabs("mineSagasModCreativeTabs"); public static BiomeGenBase superbiome; //DÉCLARATION DES VARIABLES DIVERSES DU MOD FUNPSC MOD public static CreativeTabs TutorialCreativeTabs = new FunPSCModCreativeTabs("PSCCreativeTabs"); @EventHandler public void preInit(FMLPreInitializationEvent event) { System.out.println("preinit"); commonproxy.initialiseTickHandler(); //DÉCLARATION PRINCIPALES DES ITEMS itemtutoriel = new ItemTutoriel().setUnlocalizedName("tutoriel").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":itemtutoriel"); GameRegistry.registerItem(itemtutoriel, "item_tutoriel"); batonDeMineur = new ItemBatonMineur().setUnlocalizedName("batonDeMineur").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":batondemineur"); GameRegistry.registerItem(batonDeMineur, "batonDeMineur"); baguette = new ItemBaguette().setUnlocalizedName("baguette").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":batondemineur"); GameRegistry.registerItem(baguette, "baguette"); itemGun = new ItemGun().setUnlocalizedName("itemGun").setFull3D().setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setMaxDamage(29).setTextureName(MineSagasMod.MODID + ":itemGun").setMaxStackSize(1);//la valeur du .setMaxDamage doit être soustrait d'une unité pour cause : un bug du jeu. Le pistolet (ou le gun) a une durabilité de 30, il s'utilise 30 fois GameRegistry.registerItem(itemGun, "itemGun"); munitionGun = new ItemTutoriel().setUnlocalizedName("munitionGun").setMaxStackSize(10).setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":munitionGun"); GameRegistry.registerItem(munitionGun, "munitionGun"); //DÉCLARATION PRINCIPALES DES ITEMS FUNPSC MOD test = new itemTest().setUnlocalizedName("test").setCreativeTab(TutorialCreativeTabs).setTextureName(MineSagasMod.MODID + ":test"); GameRegistry.registerItem(test, "test"); vodka = new itemVodka(0, 0.0F, true).setPotionEffect(Potion.blindness.id, 7, 3, 1.0F).setUnlocalizedName("vodka").setCreativeTab(TutorialCreativeTabs).setTextureName(MineSagasMod.MODID + ":vodka"); GameRegistry.registerItem(vodka, "vodka"); lecteurDj = new itemLecteurDj().setUnlocalizedName("lecteurDj").setMaxStackSize(1).setCreativeTab(TutorialCreativeTabs).setTextureName(MineSagasMod.MODID + ":lecteurDj"); GameRegistry.registerItem(lecteurDj, "lecteurDj"); epeePersonnage = new itemEpeePersonnage(Item.ToolMaterial.IRON).setUnlocalizedName("epeePersonnage").setCreativeTab(TutorialCreativeTabs).setTextureName(MineSagasMod.MODID + ":epeePersonnage"); GameRegistry.registerItem(epeePersonnage, "epeePersonnage"); cdNewWorldSound = new itemCdNewWorldSound("New World Sound - 1st Track FunPSC Mod").setUnlocalizedName("cdNewWorldSound").setTextureName(MineSagasMod.MODID + ":cdNewWorldSound").setCreativeTab(TutorialCreativeTabs); GameRegistry.registerItem(cdNewWorldSound, "cdNewWorldSound"); cdDareShakira = new itemCdDareShakira("Dare Dare, Shakira - 2nd Track FunPSC Mod").setUnlocalizedName("cdDareShakira").setTextureName(MineSagasMod.MODID + ":cdDareShakira").setCreativeTab(TutorialCreativeTabs); GameRegistry.registerItem(cdDareShakira, "cdDareShakira"); cdMerciQui = new itemCdMerciQui("Merci Qui - 3rd Track FunPSC Mod").setUnlocalizedName("cdMerciQui").setTextureName(MineSagasMod.MODID + ":cdMerciQui").setCreativeTab(TutorialCreativeTabs); GameRegistry.registerItem(cdMerciQui, "cdMerciQui"); cdFeatTheMagicInTheAir = new itemCdFeatTheMagicInTheAir("Feat the magic in the air - 4th Track FunPSC Mod").setUnlocalizedName("cdFeatTheMagicInTheAir").setTextureName(MineSagasMod.MODID + ":cdFeatTheMagicInTheAir").setCreativeTab(TutorialCreativeTabs); GameRegistry.registerItem(cdFeatTheMagicInTheAir, "cdFeatTheMagicInTheAir"); //DÉCLARATION PRINCIPALES DES ITEMS KINGDOM HEARTS 2 chaineRoyale = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("chaineRoyale").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":chaine royale"); GameRegistry.registerItem(chaineRoyale, "chaineRoyale"); tendrePromesse = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("tendrePromesse").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":tendre promesse"); GameRegistry.registerItem(tendrePromesse, "tendrePromesse"); stella = new ItemStella(ToolMaterial.EMERALD).setUnlocalizedName("stella").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":stella"); GameRegistry.registerItem(stella, "stella"); dragonTapis = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("dragonTapis").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":dragonTapis"); GameRegistry.registerItem(dragonTapis, "dragonTapis"); emblemeDeHeros = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("emblemeDeHeros").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":emblemeDeHeros"); GameRegistry.registerItem(emblemeDeHeros, "emblemeDeHeros"); gouvernail = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("gouvernail").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":gouvernail"); GameRegistry.registerItem(gouvernail, "gouvernail"); cercleVital = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("cercleVital").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cercleVital"); GameRegistry.registerItem(cercleVital, "cercleVital"); souvenirPerdu = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("souvenirPerdu").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":souvenirPerdu"); GameRegistry.registerItem(souvenirPerdu, "souvenirPerdu"); debuggerPhoton = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("debuggerPhoton").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":debuggerPhoton"); GameRegistry.registerItem(debuggerPhoton, "debuggerPhoton"); monochrome = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("monochrome").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":monochrome"); GameRegistry.registerItem(monochrome, "monochrome"); roseDeCombat = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("roseDeCombat").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":roseDeCombat"); GameRegistry.registerItem(roseDeCombat, "roseDeCombat"); albatros = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("albatros").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":albatros"); GameRegistry.registerItem(albatros, "albatros"); lionAssoupi = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("lionAssoupi").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":lionAssoupi"); GameRegistry.registerItem(lionAssoupi, "lionAssoupi"); citrouilleDeNoel = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("citrouilleDeNoel").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":citrouilleDeNoel"); GameRegistry.registerItem(citrouilleDeNoel, "citrouilleDeNoel"); lampeMagique = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("lampeMagique").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":lampeMagique"); GameRegistry.registerItem(lampeMagique, "lampeMagique"); ameDeGardien = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("ameDeGardien").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":ameDeGardien"); GameRegistry.registerItem(ameDeGardien, "ameDeGardien"); batonStruggleAttaque = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("batonStruggleAttaque").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":baton struggle attaque"); GameRegistry.registerItem(batonStruggleAttaque, "batonStruggleAttaque"); batonStruggleDefense = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("batonStruggleDefense").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":baton struggle defense"); GameRegistry.registerItem(batonStruggleDefense, "batonStruggleDefense"); batonStruggleMagie = new ItemSword(ToolMaterial.EMERALD).setUnlocalizedName("batonStruggleMagie").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":baton struggle magie"); GameRegistry.registerItem(batonStruggleMagie, "batonStruggleMagie"); itemCIN1 = new itemCIN1().setUnlocalizedName("itemCIN1").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":itemCIN1"); GameRegistry.registerItem(itemCIN1, "itemCIN1"); cdDearlyOblivied = new itemCDDearlyOblivied("Dearly Oblivied - 1st Song").setUnlocalizedName("cdDearlyOblivied").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdDearlyOblivied"); GameRegistry.registerItem(cdDearlyOblivied, "cdDearlyOblivied"); cdPassion = new itemCDPassion("Passion Orchestra Instrumental Version - 2nd Song").setUnlocalizedName("cdPassion").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdPassion"); GameRegistry.registerItem(cdPassion, "cdPassion"); cdPassionSingle = new itemCDPassionSingle("Dearly Passion Single Version - 3rd Song").setUnlocalizedName("cdPassionSingle").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdPassionSingle"); GameRegistry.registerItem(cdPassionSingle, "cdPassionSingle"); cdLazyAfternoons = new itemCDLazyAfternoons("Lazy Afternoons - 4th Song").setUnlocalizedName("cdLazyAfternoons").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdLazyAfternoons"); GameRegistry.registerItem(cdLazyAfternoons, "cdLazyAfternoons"); cdSinisterSundown = new itemCDSinisterSundown("Sinister Sundown - 5th Song").setUnlocalizedName("cdSinisterSundown").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdSinisterSundown"); GameRegistry.registerItem(cdSinisterSundown, "cdSinisterSundown"); cdTheEscapade = new itemCDTheEscapade("The Escapade - 6th Song").setUnlocalizedName("cdTheEscapade").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdTheEscapade"); GameRegistry.registerItem(cdTheEscapade, "cdTheEscapade"); cdDiveIntoTheHeart = new itemCDDiveIntoTheHeart("Dive Into The Heart - 7th Song").setUnlocalizedName("cdDiveIntoTheHeart").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdDiveIntoTheHeart"); GameRegistry.registerItem(cdDiveIntoTheHeart, "cdDiveIntoTheHeart"); cdFragmentsOfSorrow = new itemCDFragmentsOfSorrow("Fragments Of Sorrow - 8th Song").setUnlocalizedName("cdFragmentsOfSorrow").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdFragmentsOfSorrow"); GameRegistry.registerItem(cdFragmentsOfSorrow, "cdFragmentsOfSorrow"); cdTensionRising = new itemCDTensionRising("Tension Rising - 9th Song").setUnlocalizedName("cdTensionRising").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":cdTensionRising"); GameRegistry.registerItem(cdTensionRising, "cdTensionRising"); //DÉCLARATION PRINCIPALES DES BLOCKS KINGDOM HEARTS 2 blockHayner = new BlockHayner(Material.rock).setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setBlockName("blockHayner").setBlockTextureName(MineSagasMod.MODID + ":blockHayner"); GameRegistry.registerBlock(blockHayner, "blockHayner"); blockSetzer = new BlockSetzer(Material.rock).setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setBlockName("blockSetzer").setBlockTextureName(MineSagasMod.MODID + ":blockHayner"); GameRegistry.registerBlock(blockSetzer, "blockSetzer"); //DÉCLARATION PRINCIPALES DES BLOCKS blocktutoriel = new BlockTutoriel(Material.grass).setBlockName("blocktutoriel").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setBlockTextureName(MineSagasMod.MODID + ":blocktutoriel"); GameRegistry.registerBlock(blocktutoriel, "blocktutoriel"); blockSpeed = new BlockSpeed(Material.glass).setBlockName("blockSpeed").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setBlockTextureName(MineSagasMod.MODID + ":blockSpeed"); GameRegistry.registerBlock(blockSpeed, "blockSpeed"); blockmineraiuranium = new BlockMineraiUranium(Material.rock).setBlockName("blockmineraiuranium").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setBlockTextureName(MineSagasMod.MODID + ":blockmineraiuranium").setHardness(10.0F).setResistance(5.0F).setLightLevel(2.0F); GameRegistry.registerBlock(blockmineraiuranium, "blockmineraiuranium"); //DÉCLARATION PRINCIPALES DES BLOCKS FUNPSC MOD test1 = new blockTest(Material.rock).setCreativeTab(TutorialCreativeTabs).setBlockName("test1").setBlockTextureName("MineSagasMod:test1"); GameRegistry.registerBlock(test1, "test1"); //DÉCLARATION PRINCIPALE DES ARMURES casqueEmeraude = new ItemArmorEmeraude(this.emeraude, 0).setUnlocalizedName("casqueEmeraude").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":casqueEmeraude");//0 est une valeur qui ne doit pas être changée au fil des déclarations d'armure car forge s'en charge lui-même plastronEmeraude = new ItemArmorEmeraude(this.emeraude, 1).setUnlocalizedName("plastronEmeraude").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":plastronEmeraude"); jambiereEmeraude = new ItemArmorEmeraude(this.emeraude, 2).setUnlocalizedName("jambiereEmeraude").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":jambiereEmeraude"); bottesEmeraude = new ItemArmorEmeraude(this.emeraude, 3).setUnlocalizedName("bottesEmeraude").setCreativeTab(MineSagasMod.mineSagasModCreativeTabs).setTextureName(MineSagasMod.MODID + ":bottesEmeraude"); GameRegistry.registerItem(casqueEmeraude, "casqueEmeraude"); GameRegistry.registerItem(plastronEmeraude, "plastronEmeraude"); GameRegistry.registerItem(jambiereEmeraude, "jambiereEmeraude"); GameRegistry.registerItem(bottesEmeraude, "bottesEmeraude"); //ENREGISTREMENT DES TILE ENTITY GameRegistry.registerTileEntity(TileEntityBlockHayner.class, "blockHayner"); GameRegistry.registerTileEntity(TileEntityBlockSetzer.class, "blockSetzer"); GameRegistry.addRecipe(new ItemStack(plastronEmeraude, 1), new Object[] { "X X", "XXX", "XXX", Character.valueOf('X'), Items.emerald }); GameRegistry.addRecipe(new ItemStack(casqueEmeraude, 1), new Object[] { "XXX", "X X", Character.valueOf('X'), Items.emerald }); GameRegistry.addRecipe(new ItemStack(jambiereEmeraude, 1), new Object[] { "XXX", "X X", "X X", Character.valueOf('X'), Items.emerald }); GameRegistry.addRecipe(new ItemStack(bottesEmeraude, 1), new Object[] { "X X", "X X", Character.valueOf('X'), Items.emerald }); GameRegistry.registerWorldGenerator(worldgeneration, 0); } @EventHandler public void init(FMLInitializationEvent event) { System.out.println("init"); commonproxy.registerEntityRenderer(); commonproxy.registerItemRenderer(); commonproxy.registerTileEntitySpecialRenderer(); keyboard.registerKey(); //DÉCLARATION PRINCIPALES DES ENTITÉES EntityRegistry.registerGlobalEntityID(EntityMobTutoriel.class, "mobTutoriel", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityMobTutoriel.class, "mobTutoriel", 420, this.instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityAragog.class, "aragog", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityAragog.class, "aragog", 421, this.instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityChocogrenouille.class, "chocogrenouille", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityChocogrenouille.class, "chocogrenouille", 422, this.instance, 40, 1, true); /**EntityRegistry.registerGlobalEntityID(EntityServeuse.class, "serveuse", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityServeuse.class, "serveuse", 423, this.instance, 40, 1, true);*/ EntityRegistry.registerGlobalEntityID(EntityBadman.class, "badman", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityBadman.class, "badman", 424, this.instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityVlad.class, "vlad", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityVlad.class, "vlad", 425, this.instance, 40, 1, true); //EntityRegistry.addSpawn(EntityVlad.class, 5, 1, 3, EnumCreatureType.monster, this.biomes); //DÉCLARATION PRINCIPALES DES ENTITÉES FUNPSC MOD EntityRegistry.registerGlobalEntityID(EntityTest.class, "test2", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(79, 255, 35).getRGB()); EntityRegistry.registerModEntity(EntityTest.class, "test2", 426, instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityBarMan.class, "barman", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 255, 255).getRGB()); EntityRegistry.registerModEntity(EntityBarMan.class, "barman", 428, instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityDj.class, "dj", EntityRegistry.findGlobalUniqueEntityId(), new Color(127, 51, 0).getRGB(), new Color(0, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityDj.class, "dj", 429, instance, 40, 1, true); EntityRegistry.registerGlobalEntityID(EntityPute.class, "pute", EntityRegistry.findGlobalUniqueEntityId(), new Color(255, 223, 201).getRGB(), new Color(124, 82, 53).getRGB()); EntityRegistry.registerModEntity(EntityPute.class, "pute", 430, instance, 40, 1, true); superbiome = new BiomeSuper(137).setBiomeName("superbiome").setTemperatureRainfall(1.2F, 0.9F); BiomeDictionary.registerBiomeType(superbiome, Type.FOREST); BiomeManager.addSpawnBiome(superbiome); if(event.getSide().isClient()) { MinecraftForge.EVENT_BUS.register(new MineSagasEventHandler(Minecraft.getMinecraft())); } FMLCommonHandler.instance().bus().register(new MineSagasEventHandler(Minecraft.getMinecraft())); MinecraftForge.EVENT_BUS.register(new MineSagasEventHandler(Minecraft.getMinecraft())); } @EventHandler public void postInit(FMLPostInitializationEvent event) { System.out.println("postinit"); } } ```</entityplayer,>
-
Ta fonction
public static void init() { testTouche = new KeyBinding("key.openGUI", Keyboard.KEY_Z, "MineSagas Mod -Test de touches"); ClientRegistry.registerKeyBinding(testTouche); }
n’est jamais appelé, donc normal que la touche n’existe pas …
Cette fonction devrait êtrepublic void registerKey()
-
@‘robin4002’:
Ta fonction
public static void init() { testTouche = new KeyBinding("key.openGUI", Keyboard.KEY_Z, "MineSagas Mod -Test de touches"); ClientRegistry.registerKeyBinding(testTouche); }
n’est jamais appelé, donc normal que la touche n’existe pas …
Cette fonction devrait êtrepublic void registerKey()
Oh oui désolé je n’avais pas remarqué c’est comme le common et le client proxy qui doit hériter des mêmes méthodes. Bon désolé la prochaine fois, VRAIMENT je regarderai plus attentivement avant de demander votre aider, encore désolé du dérangement assez débile et je te remercie robin
Comme dans mon client proxy la prochaine fois je penserai à Override mes méthodes, n’est-ce pas?
Cette fois ci j’ai du mal à voir la touche a bien été remise dans les configs(logique) mais il n’y a rien du tout lorsqu’elle est appuyé je suis passé un event handler sur chaque side comme le fait le od UGS mais rien à faire. Il manquerait une condition dans l’event handler ou quoi?
mon event hander en client
package mrplaigon.psccraft.minesagasmod.client; import mrplaigon.psccraft.minesagasmod.common.MineSagasMod; import net.minecraft.client.Minecraft; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; public class MineSagasEventHandlerClient { private Minecraft mc = FMLClientHandler.instance().getClient(); @SubscribeEvent public void onTickPlayer(TickEvent.PlayerTickEvent event) { if (event.phase == TickEvent.Phase.END) { if(MineSagasMod.keyboard.testToucheKeyDown(event.player)) { MineSagasMod.keyboard.sendKeyUpdate(); event.player.setFire(7); } } } }
et celui en common
package mrplaigon.psccraft.minesagasmod.common; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingDeathEvent; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.server.FMLServerHandler; public class MineSagasEventHandlerCommon { public static boolean zIsPressed = false; @SubscribeEvent public void onEntityJoin(EntityJoinWorldEvent event) { /**System.out.println("une entité (" + event.entity.getCommandSenderName() + ") a rejoint le monde"); if(event.entity instanceof EntityCreeper) { event.setCanceled(true); }*/ if(event.entity instanceof EntityPlayer) { World worldEvent = event.world; worldEvent.getGameRules().setOrCreateGameRule("keepInventory", "false"); } } /**@SubscribeEvent @SideOnly(Side.CLIENT) public void onTooltip(ItemTooltipEvent event) { if(event.itemStack.getItem() == Items.dye && event.itemStack.getItemDamage() == 15 ) { event.toolTip.add("clic droit sur les plantes pour les faire pousser"); } /**else if(event.itemStack.getItem() == Item.getItemFromBlock(Blocks.obsidian)) { if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { event.toolTip.add("Bloc très résistant aux exposions"); event.toolTip.add("Résistance : 2000"); } else { event.toolTip.add("Maintenir shift gauche pour plus d'information"); } }*/ @SubscribeEvent public void onDeath(LivingDeathEvent event) { if(event.entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer)event.entity; if(player.inventory.hasItem(MineSagasMod.stella)) { System.out.println("tu es mort"); this.dropInventory(player.inventory); player.worldObj.getGameRules().setOrCreateGameRule("keepInventory", "true"); } } } private void dropInventory(InventoryPlayer inventory) { int i; for(i = 0; i < inventory.mainInventory.length; ++i) { if(inventory.mainInventory* != null) { if(inventory.mainInventory*.getItem() != MineSagasMod.stella) { inventory.player.func_146097_a(inventory.mainInventory*, true, false); inventory.mainInventory* = null; } } } for(i = 0; i < inventory.armorInventory.length; ++i) { if(inventory.armorInventory* != null) { inventory.player.func_146097_a(inventory.armorInventory*, true, false); inventory.armorInventory* = null; } } } /**@SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent event) { if(KeyBindings.openGUI.isPressed()) { if(mc.thePlayer != null) { zIsPressed = true; System.out.println("KEY Z"); //mc.thePlayer.setHealth(20.0F); //mc.thePlayer.inventory.addItemStackToInventory(new ItemStack(MineSagasMod.ameDeGardien)); /**EntityWolf wolf = new EntityWolf(mc.theWorld); wolf.setLocationAndAngles(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch); mc.theWorld.spawnEntityInWorld(wolf); //mc.thePlayer.setDead(); //mc.thePlayer.addPotionEffect(new PotionEffect(Potion.poison.id, 6 * 20, 10));//2eme argument en int c'est la durée , 3ème argument c'est la puissance de l'effet Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentText("lol, it works")); } } else { zIsPressed = false; } }*/ /**@SubscribeEvent public void onDestroyItem(PlayerDestroyItemEvent event) { if (event.entityPlayer.getItemInUse().isItemEqual(p_77969_1_)) }*/ @SubscribeEvent public void onTickPlayer(TickEvent.PlayerTickEvent event) { if(MineSagasMod.keyboard.testToucheKeyDown(event.player)) { if(event.phase == TickEvent.Phase.START && event.side == Side.SERVER) { System.out.println("touche z pressé tu me vois?"); event.player.setFire(7); } } } }
Encore autre chose le jeu quand le mod est installé crash en me disant qu’il ne trouve pas les class de la ffmt lib donc j’ai mis le .jar dans le dossier mods et ce n’est pas mieux il crash avec ça :
–-- Minecraft Crash Report ---- // My bad. Time: 02/11/14 20:15 Description: Exception in server tick loop java.lang.AbstractMethodError: fr.minecraftforgefrance.ffmtlibs.network.FFMTPacket.getDiscriminator()I at fr.minecraftforgefrance.ffmtlibs.network.PacketManager.registerPacket(PacketManager.java:125) at fr.minecraftforgefrance.ffmtlibs.network.PacketManager.<init>(PacketManager.java:68) at mrplaigon.psccraft.minesagasmod.common.MineSagasMod.<clinit>(MineSagasMod.java:185) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:420) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at cpw.mods.fml.common.Loader.loadMods(Loader.java:492) at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:87) at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:313) at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:169) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:624) at java.lang.Thread.run(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_71, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 826593568 bytes (788 MB) / 1029701632 bytes (982 MB) up to 1029701632 bytes (982 MB) JVM Flags: 2 total; -Xmx1G -Xms1G AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.25.1199 Minecraft Forge 10.13.0.1199 12 mods loaded, 12 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{7.10.25.1199} [Forge Mod Loader] (cauldron-1.7.10-1.1199.01.149-server.jar) Unloaded->Constructed Forge{10.13.0.1199} [Minecraft Forge] (cauldron-1.7.10-1.1199.01.149-server.jar) Unloaded->Constructed PlayerAPI{1.0} [Player API] (minecraft.jar) Unloaded->Constructed Backpack{2.0.0} [Backpack] (backpack-2.0.0-1.7.x.jar) Unloaded->Constructed BiomesOPlenty{2.1.0} [Biomes O' Plenty] (BiomesOPlenty-1.7.10-2.1.0.963-universal.jar) Unloaded->Constructed CustomSpawner{3.3.0} [DrZhark's CustomSpawner] (CustomMobSpawner 3.3.0.zip) Unloaded->Constructed DeathCounter{4.0.0} [DeathCounter] (DeathCounter-4.0.0.jar) Unloaded->Constructed MoCreatures{6.3.0} [DrZhark's Mo'Creatures Mod] (DrZharks MoCreatures Mod v6.3.0.zip) Unloaded->Constructed ffmtlibs{1.5.0.113} [FFMT Library] (FFMT-libs-1.5.0.113-mc1.7.10-dev.jar) Unloaded->Constructed minesagasmod{1.0.0} [MineSagasMod] (MineSagasMod-1.0.0.jar) Unloaded sports{1.3} [SportsMod] (SportsMod.jar) Unloaded Profiler Position: N/A (disabled) Is Modded: Definitely; Server brand changed to 'cauldron,craftbukkit,mcpc,fml,forge' Type: Dedicated Server (map_server.txt)
Donc je me demande si il n’aurai pas fallu mettre les .java comme ce que j’avais fait avant, ou alors quoi? La ligne 185 indique l’initialisation de mon packetManager</clinit></init>
-
UP svp je vous ai mis toutes les informations nécessaires plz help
-
Tu as mit le -dev sur minecraft, normal que ça ne fonctionne pas …
-dev c’est pour Eclipse seulement (dev = développeurs)
prend la version universel : http://ci.mcnanotech.fr/job/FFMT-libs/113/Pour les touches, tu as enregistré la classe MineSagasEventHandlerClient avec FML ?
-
Oui c est vrai qu avec un .jar avec des .java au lieu de .class normal que mon jeu galere un peu !!!
Je ne l ai pas sous les yeux mais de memoire je crois m avoir enregistré comme dans le mod usg dans le client ent proxy enfin de memoire je te redirai tout sûrement mercredi merci quand même de ta réponse ^^
-
Ok merci c est sur qu avec un .jar avec des .java au lieu des .class mon minecraft ne risque pas trop de fonctionner ><
Sinon je n ai pas mon client proxy sous les yeux donc je ne pourrai te dire que mercredi -
Pour l’installation de la ffmt libs ça marche plus aucun crash au lancement du jeu, merci
Sinon voici ma méthode qui enregistre l’event handler side client, crée dans mon client proxy @Override public void initialiseTickHandler() { // Our ClientProxy method only gets run on the client side, so it is safe to register our RenderTickHandler here //ENREGISTREMENT DE LA CLASSE GERANT LES TICK HANDLER ATTENTION : ceci doit être enregistré seulement dans une classé n'étant pas excécuté par le serveur de ce fait, dans le client proxy et surtout pas dans le mod exécuté par les 2 sides du jeu, tout comme le commonProxy !!!!! super.initialiseTickHandler(); FMLCommonHandler.instance().bus().register(new MineSagasEventHandlerClient()); MinecraftForge.EVENT_BUS.register(new MineSagasEventHandlerClient()); FMLCommonHandler.instance().bus().register(new RenderTickHandler()); }
au cas où tu te poserai la question elle y est bien aussi dans mon common sinon avec l’override y’aurait une erreur