Crash serveur
-
@VDD(Déso mais je n’arriverai jamais à réécrire ton pseudo xD)
La balise de citation est pour reprendre les paroles de quelqu’un, sisi j’te jure. Nan je pense qu’il faut mieux utiliser la balise code, comme ceci :tu copies-colles ton rapport de crash ici@mosca
Tu as raison, c’est un problème lié au serveur qui veut accéder à la classe RenderGlobal, qui est uniquement client. Envoie nous ta classe Addon, le problème semble venir de la ligne 52 -
@‘Plaigon’:
@VDD(Déso mais je n’arriverai jamais à réécrire ton pseudo xD)
La balise de citation est pour reprendre les paroles de quelqu’un, sisi j’te jure. Nan je pense qu’il faut mieux utiliser la balise code, comme ceci :tu copies-colles ton rapport de crash ici@mosca
Tu as raison, c’est un problème lié au serveur qui veut accéder à la classe RenderGlobal, qui est uniquement client. Envoie nous ta classe Addon, le problème semble venir de la ligne 52Voici mon code merdi d’avance :
package Emox; import Init.BlocksMod; import Init.ItemMod; import ItemsMod.ChestFinder; import Proxy.CommonProxy; import WorldMod.WorldGen; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; 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.GameRegistry; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = "1.0.1") public class Addon { public static final String Textures = null; @Instance("Mod") public static Mod insatance; @SidedProxy(clientSide = "Proxy.ClientProxy", serverSide = "Proxy.CommonProxy") public static CommonProxy proxy; public static final CreativeTabs TabEmoxium = new CreativeTabs("Emoxium"){ @Override public Item getTabIconItem(){ return ItemMod.Pomme2; } public int getItemIconDamage(){ return 4; } }; @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { ItemMod.init(); ItemMod.register(); BlocksMod.init(); BlocksMod.register(); WorldGen.register(); FMLCommonHandler.instance().bus().register(new ChestFinder()); MinecraftForge.EVENT_BUS.register(new ChestFinder()); } @Mod.EventHandler public void Init(FMLInitializationEvent event) { proxy.registersRender(); GameRegistry.addRecipe(new ItemStack(ItemMod.Pomme, 1), new Object[] {"AAA", "AXA", "AAA", Character.valueOf('X'), Items.apple, Character.valueOf('A'), (BlocksMod.BlockM)}); GameRegistry.addRecipe(new ItemStack(ItemMod.Pomme2, 1), new Object[]{"YYY", "YXY", "YYY", Character.valueOf('X'), Items.apple, Character.valueOf('Y'), BlocksMod.BlockE}); //Craft Epee GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword, 1), new Object[]{" X ", " X ", " S ", 'X', ItemMod.lingot1, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword2, 1), new Object[]{" X ", " X ", " S ", 'X', ItemMod.lingot2, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword3, 1), new Object[]{" X ", " X ", " S ", 'X', ItemMod.lingot3, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword4, 1), new Object[]{" X ", " X ", " S ", 'X', ItemMod.lingot4, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword, 1), new Object[]{"X ", "X ", "S ", 'X', ItemMod.lingot1, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword2, 1), new Object[]{"X ", "X ", "S ", 'X', ItemMod.lingot2, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword3, 1), new Object[]{"X ", "X ", "S ", 'X', ItemMod.lingot3, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword4, 1), new Object[]{"X ", "X ", "S ", 'X', ItemMod.lingot4, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword, 1), new Object[]{" X", " X", " S", 'X', ItemMod.lingot1, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword2, 1), new Object[]{" X", " X", " S", 'X', ItemMod.lingot2, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword3, 1), new Object[]{" X", " X", " S", 'X', ItemMod.lingot3, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword4, 1), new Object[]{" X", " X", " S", 'X', ItemMod.lingot4, 'S', Items.stick}); //Pioche GameRegistry.addRecipe(new ItemStack(ItemMod.itempickaxe, 1), new Object[]{"xxx", " s ", " s ", 'x', ItemMod.lingot1, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itempickaxe2, 1), new Object[]{"xxx", " s ", " s ", 'x', ItemMod.lingot2, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itempickaxe3, 1), new Object[]{"xxx", " s ", " s ", 'x', ItemMod.lingot3, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itempickaxe4, 1), new Object[]{"xxx", " s ", " s ", 'x', ItemMod.lingot4, 's', Items.stick}); //hache GameRegistry.addRecipe(new ItemStack(ItemMod.itemaxe1, 1), new Object[]{"xx ", "xs ", " s ", 'x', ItemMod.lingot2, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemaxe2, 1), new Object[]{"xx ", "xs ", " s ", 'x', ItemMod.lingot1, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemaxe3, 1), new Object[]{"xx ", "xs ", " s ", 'x', ItemMod.lingot3, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemaxe4, 1), new Object[]{"xx ", "xs ", " s ", 'x', ItemMod.lingot4, 's', Items.stick}); //Blocks GameRegistry.addRecipe(new ItemStack(BlocksMod.BlockM, 1), new Object[]{"xxx", "xxx", "xxx",'x', ItemMod.lingot1}); GameRegistry.addRecipe(new ItemStack(BlocksMod.BlockF, 1), new Object[]{"xxx", "xxx", "xxx",'x', ItemMod.lingot3}); GameRegistry.addRecipe(new ItemStack(BlocksMod.BlockA, 1), new Object[]{"xxx", "xxx", "xxx",'x', ItemMod.lingot4}); GameRegistry.addRecipe(new ItemStack(BlocksMod.BlockE, 1), new Object[]{"xxx", "xxx", "xxx",'x', ItemMod.lingot2}); } public void postInit(FMLPostInitializationEvent event) {} } -
La ligne 52 est bien celle-ci ?
FMLCommonHandler.instance().bus().register(new ChestFinder());
Si c’est le cas, il semblerait que l’event dans ChestFinder est client-side onyl. File moi ta classe ChestFinder, stp -
@‘Plaigon’:
La ligne 52 est bien celle-ci ?
FMLCommonHandler.instance().bus().register(new ChestFinder());
Si c’est le cas, il semblerait que l’event dans ChestFinder est client-side onyl. File moi ta classe ChestFinder, stppackage ItemsMod; import Finder.finder; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderWorldLastEvent; public class ChestFinder extends Item { public ChestFinder() { this.setMaxStackSize(1); this.setMaxDamage(108); } @SubscribeEvent public void onWorldRender(RenderWorldLastEvent ev) { if ((Minecraft.getMinecraft().thePlayer.getHeldItem() != null) && ((Minecraft.getMinecraft().thePlayer.getHeldItem().getItem() instanceof ChestFinder)) && (Minecraft.getMinecraft().theWorld.isRemote)) { if (Minecraft.getMinecraft().theWorld != null) { for (int i = 0; i < Minecraft.getMinecraft().theWorld.loadedTileEntityList.size(); i++) { if ((Minecraft.getMinecraft().theWorld.loadedTileEntityList.get(i) instanceof TileEntity)) { TileEntity chest = (TileEntity) Minecraft.getMinecraft().theWorld.loadedTileEntityList.get(i); finder.drawChestESP(chest.xCoord - Minecraft.getMinecraft().thePlayer.lastTickPosX, chest.yCoord - Minecraft.getMinecraft().thePlayer.lastTickPosY, chest.zCoord - Minecraft.getMinecraft().thePlayer.lastTickPosZ); } } } } } @Override public void onUpdate(ItemStack stack, World world, Entity entity, int slotIndex, boolean isInHand) { super.onUpdate(stack, world, entity, slotIndex, isInHand); if (isInHand) { if (world.getTotalWorldTime() % 20 == 0) { if (stack.getItemDamageForDisplay() < stack.getMaxDamage()) { if (!world.isRemote) stack.damageItem(1, (EntityPlayer) entity); } else { ((EntityPlayer) entity).destroyCurrentEquippedItem(); } } } } } -
Rajoute if(event.getSide() == Side.CLIENT) avant la ligne MinecraftForge.EVENT_BUS.register(new ChestFinder());
Et au passage la ligne juste d’avant (FMLCommonHandler.blabla), ne te sert plus à rien, puisque l’event RenderWorldLastEvent est sur le bus MinecraftForge et non FML
-
Rajoute @SideOnly(Side.CLIENT) au-dessus de ta fonction onWorldRender pour voir si ça résout le problème
-
Bah comme ça t’as l’embarra du choix. Les deux solutions devraient fonctionner

Revois aussi ta convention Java, car un nom de classe tel que finder, qui comme par une minuscule…C’est juste impossible
-
@‘Plaigon’:
Rajoute if(event.getSide() == Side.CLIENT) avant la ligne MinecraftForge.EVENT_BUS.register(new ChestFinder());
Et au passage la ligne juste d’avant (FMLCommonHandler.blabla), ne te sert plus à rien, puisque l’event RenderWorldLastEvent est sur le bus MinecraftForge et non FML
Merci ça marche bien

Y’aurais moyen que tu rejettes un coup d’oeil sur mon launcheur a tête de wither ? -
Mets la balise résolue et je passerai jeter un coup d’œil

#LesBonRéflexesFontLesBonsAmis -
Encore une copie de mon code xD
C’est pas comme ça que tu apprendras.