Résolu Encore un crash report
-
Bonjour alors j’ai un crash report quand j’ouvre mon onglet créatif mais j’ai je penses la class en question, la fonction et je crois avoir compris que c’est un NPE mais je ne suis pas sur de ou et pourquoi c’est un NPE.
Mes classes:
package com.degraduck.minefus.block.slab; import com.degraduck.minefus.init.M_Block; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; public class ItemBlockMStoneSlab extends ItemBlock { private final boolean isFullBlock; private final Block theHalfSlab; private final Block doubleSlab; public ItemBlockMStoneSlab(Block block) { super(block); this.theHalfSlab = M_Block.SingleSlabMStone; this.doubleSlab = M_Block.DoubleSlabMStone; if(block == M_Block.DoubleSlabMStone) { this.isFullBlock = true; } else { this.isFullBlock = false; } this.setMaxDamage(0); this.setHasSubtypes(true); } @SideOnly(Side.CLIENT) public IIcon getIconFromDamage(int metadata) { return this.field_150939_a.getIcon(2, metadata); } public int getMetadata(int metadata) { return metadata; } public String getUnlocalizedName(ItemStack stack) { return ((BlockSlabMStone)theHalfSlab).func_150002_b(stack.getItemDamage()); } public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float par8, float par9, float par10) { if(this.isFullBlock) { return super.onItemUse(stack, player, world, x, y, z, side, par8, par9, par10); } else if(stack.stackSize == 0) { return false; } else if(!player.canPlayerEdit(x, y, z, side, stack)) { return false; } else { Block i1 = world.getBlock(x, y, z); int j1 = world.getBlockMetadata(x, y, z); int k1 = j1 & 7; boolean flag = (j1 & 8) != 0; if((side == 1 && !flag || side == 0 && flag) && i1 == this.theHalfSlab && k1 == stack.getItemDamage()) { if(world.checkNoEntityCollision(this.doubleSlab.getCollisionBoundingBoxFromPool(world, x, y, z)) && world.setBlock(x, y, z, this.doubleSlab, k1, 3)) { world.playSoundEffect((double)((float)x + 0.5F), (double)((float)y + 0.5F), (double)((float)z + 0.5F), this.doubleSlab.stepSound.getStepResourcePath(), (this.doubleSlab.stepSound.getVolume() + 1.0F) / 2.0F, this.doubleSlab.stepSound.getPitch() * 0.8F); –stack.stackSize; } return true; } else { return this.placeDoubleSlabFromTop(stack, player, world, x, y, z, side) ? true : super.onItemUse(stack, player, world, x, y, z, side, par8, par9, par10); } } } @SideOnly(Side.CLIENT) public boolean func_150936_a(World world, int x, int y, int z, int side, EntityPlayer player, ItemStack stack) { int i1 = x; int j1 = y; int k1 = z; Block id = world.getBlock(x, y, z); int meta = world.getBlockMetadata(x, y, z); int j2 = meta & 7; boolean flag = (meta & 8) != 0; if((side == 1 && !flag || side == 0 && flag) && id == this.theHalfSlab && j2 == stack.getItemDamage()) { return true; } else { if(side == 0) { --y; } if(side == 1) { ++y; } if(side == 2) { --z; } if(side == 3) { ++z; } if(side == 4) { --x; } if(side == 5) { ++x; } id = world.getBlock(x, y, z); meta = world.getBlockMetadata(x, y, z); j2 = meta & 7; flag = (meta & 8) != 0; return id == this.theHalfSlab && j2 == stack.getItemDamage() ? true : super.func_150936_a(world, i1, j1, k1, side, player, stack); } } private boolean placeDoubleSlabFromTop(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side) { if(side == 0) { --y; } if(side == 1) { ++y; } if(side == 2) { --z; } if(side == 3) { ++z; } if(side == 4) { --x; } if(side == 5) { ++x; } Block i1 = world.getBlock(x, y, z); int j1 = world.getBlockMetadata(x, y, z); int k1 = j1 & 7; if(i1 == this.theHalfSlab && k1 == stack.getItemDamage()) { if(world.checkNoEntityCollision(this.doubleSlab.getCollisionBoundingBoxFromPool(world, x, y, z)) && world.setBlock(x, y, z, this.doubleSlab, k1, 3)) { world.playSoundEffect((double)((float)x + 0.5F), (double)((float)y + 0.5F), (double)((float)z + 0.5F), this.doubleSlab.stepSound.getStepResourcePath(), (this.doubleSlab.stepSound.getVolume() + 1.0F) / 2.0F, this.doubleSlab.stepSound.getPitch() * 0.8F); --stack.stackSize; } return true; } else { return false; } } }
package com.degraduck.minefus.block.slab; import java.util.List; import java.util.Random; import com.degraduck.minefus.Minefus; import com.degraduck.minefus.init.M_Block; import net.minecraft.block.Block; import net.minecraft.block.BlockSlab; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockSlabMStone extends BlockSlab { public static final String[] StepTypes = new String[] {"m_stone", "m_stone2", "m_dirt"}; public BlockSlabMStone(boolean isdouble, Material material) { super(isdouble, material); this.setCreativeTab(Minefus.BlockMinefusCreativeTabs); if(!this.field_150004_a) { this.setLightOpacity(0); } } @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { int k = metadata & 7; return k == 0 ? M_Block.m_stone.getBlockTextureFromSide(side) : k == 1 ? M_Block.m_stone2.getBlockTextureFromSide(side) : k == 2 ? M_Block.m_dirt.getBlockTextureFromSide(side) : Blocks.iron_block.getBlockTextureFromSide(side); } @SideOnly(Side.CLIENT) private static boolean func_150003_a(Block block) { return block == M_Block.SingleSlabMStone; } @SideOnly(Side.CLIENT) public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { return func_150003_a(this) ? Item.getItemFromBlock(M_Block.SingleSlabMStone) : Item.getItemFromBlock(M_Block.DoubleSlabMStone); } public Item getItemDropped(int metadata, Random rand, int fortune) { return Item.getItemFromBlock(Blocks.stone_slab); } protected ItemStack createStackedBlock(int metadata) { return new ItemStack(M_Block.SingleSlabMStone, 2, metadata & 7); } @SideOnly(Side.CLIENT) public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) { if(item != Item.getItemFromBlock(M_Block.DoubleSlabMStone)) { for(int i = 0; i < StepTypes.length; i++) { list.add(new ItemStack(item, 1, i)); } } } @Override public String func_150002_b(int metadata) { if(metadata < 0 || metadata >= StepTypes.length) { metadata = 0; } return super.getUnlocalizedName() + "." + StepTypes[metadata]; } }
Le crash report:
:::
–-- Minecraft Crash Report ----
// SorryTime: 20/08/16 13:55
Description: Rendering screenjava.lang.NullPointerException: Rendering screen
at com.degraduck.minefus.block.slab.ItemBlockMStoneSlab.getUnlocalizedName(ItemBlockMStoneSlab.java:50)
at net.minecraft.item.Item.getUnlocalizedNameInefficiently(Item.java:607)
at net.minecraft.item.Item.getItemStackDisplayName(Item.java:744)
at net.minecraft.item.ItemStack.getDisplayName(ItemStack.java:537)
at net.minecraft.item.ItemStack.getTooltip(ItemStack.java:605)
at net.minecraft.client.gui.GuiScreen.renderToolTip(GuiScreen.java:124)
at net.minecraft.client.gui.inventory.GuiContainerCreative.renderToolTip(GuiContainerCreative.java:769)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:186)
at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44)
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067)
at net.minecraft.client.Minecraft.run(Minecraft.java:962)
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:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)A detailed walkthrough of the error, its code path and all known details is as follows:
– Head –
Stacktrace:
at com.degraduck.minefus.block.slab.ItemBlockMStoneSlab.getUnlocalizedName(ItemBlockMStoneSlab.java:50)
at net.minecraft.item.Item.getUnlocalizedNameInefficiently(Item.java:607)
at net.minecraft.item.Item.getItemStackDisplayName(Item.java:744)
at net.minecraft.item.ItemStack.getDisplayName(ItemStack.java:537)
at net.minecraft.item.ItemStack.getTooltip(ItemStack.java:605)
at net.minecraft.client.gui.GuiScreen.renderToolTip(GuiScreen.java:124)
at net.minecraft.client.gui.inventory.GuiContainerCreative.renderToolTip(GuiContainerCreative.java:769)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:186)
at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44)
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673)– Screen render details –
Details:
Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative
Mouse location: Scaled: (154, 105). Absolute: (308, 269)
Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2– Affected level –
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP[‘Player5’/418, l=‘MpServer’, x=41,50, y=66,62, z=232,50]]
Chunk stats: MultiplayerChunkCache: 345, 345
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (44,64,224), Chunk: (at 12,4,0 in 2,14; contains blocks 32,0,224 to 47,255,239), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 2891 game time, 2891 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 141 total; [EntitySkeleton[‘Squelette’/256, l=‘MpServer’, x=94,38, y=16,00, z=178,41], EntityZombie[‘Zombie’/257, l=‘MpServer’, x=94,50, y=16,00, z=181,50], EntityChicken[‘Poule’/258, l=‘MpServer’, x=94,59, y=68,00, z=241,47], EntitySkeleton[‘Squelette’/259, l=‘MpServer’, x=93,69, y=18,00, z=289,66], EntitySkeleton[‘Squelette’/260, l=‘MpServer’, x=93,69, y=19,00, z=291,41], EntityCreeper[‘Creeper’/261, l=‘MpServer’, x=81,99, y=42,00, z=294,55], EntityCreeper[‘Creeper’/262, l=‘MpServer’, x=84,50, y=41,00, z=295,50], EntityZombie[‘Zombie’/264, l=‘MpServer’, x=104,50, y=38,00, z=156,94], EntitySkeleton[‘Squelette’/265, l=‘MpServer’, x=97,31, y=16,00, z=176,31], EntityChicken[‘Poule’/266, l=‘MpServer’, x=109,47, y=69,00, z=205,53], EntityChicken[‘Poule’/267, l=‘MpServer’, x=108,19, y=69,00, z=210,44], EntityChicken[‘Poule’/268, l=‘MpServer’, x=110,43, y=69,00, z=215,44], EntityChicken[‘Poule’/269, l=‘MpServer’, x=96,56, y=67,00, z=235,59], EntityChicken[‘Poule’/270, l=‘MpServer’, x=104,59, y=68,00, z=243,75], EntityChicken[‘Poule’/271, l=‘MpServer’, x=99,81, y=68,00, z=248,50], EntityCreeper[‘Creeper’/272, l=‘MpServer’, x=98,44, y=21,00, z=298,44], EntityEnderman[‘Enderman’/273, l=‘MpServer’, x=97,66, y=22,00, z=300,91], EntitySkeleton[‘Squelette’/274, l=‘MpServer’, x=111,50, y=37,00, z=290,50], EntityBat[‘Chauve-souris’/275, l=‘MpServer’, x=111,75, y=27,10, z=307,25], EntityCreeper[‘Creeper’/278, l=‘MpServer’, x=105,56, y=24,00, z=305,44], EntityZombie[‘Zombie’/279, l=‘MpServer’, x=104,56, y=24,00, z=305,94], EntityZombie[‘Zombie’/280, l=‘MpServer’, x=106,50, y=24,00, z=305,50], EntitySkeleton[‘Squelette’/287, l=‘MpServer’, x=112,28, y=36,00, z=158,06], EntityBat[‘Chauve-souris’/288, l=‘MpServer’, x=117,75, y=37,02, z=156,71], EntityBat[‘Chauve-souris’/290, l=‘MpServer’, x=114,25, y=34,10, z=163,47], EntityZombie[‘Zombie’/291, l=‘MpServer’, x=119,41, y=54,00, z=160,00], EntityCow[‘Vache’/294, l=‘MpServer’, x=118,23, y=80,00, z=170,56], EntityCreeper[‘Creeper’/295, l=‘MpServer’, x=118,50, y=40,00, z=187,50], EntityBat[‘Chauve-souris’/296, l=‘MpServer’, x=116,63, y=36,02, z=181,06], EntitySkeleton[‘Squelette’/297, l=‘MpServer’, x=116,56, y=36,00, z=180,23], EntityBat[‘Chauve-souris’/298, l=‘MpServer’, x=116,82, y=36,28, z=180,19], EntityChicken[‘Poule’/300, l=‘MpServer’, x=113,47, y=68,00, z=220,47], EntityCow[‘Vache’/301, l=‘MpServer’, x=114,53, y=67,00, z=239,31], EntityCow[‘Vache’/302, l=‘MpServer’, x=117,53, y=67,00, z=239,88], EntityCow[‘Vache’/303, l=‘MpServer’, x=116,59, y=68,00, z=227,53], EntityCow[‘Vache’/304, l=‘MpServer’, x=119,13, y=68,00, z=244,13], EntityZombie[‘Zombie’/306, l=‘MpServer’, x=117,43, y=20,00, z=283,83], EntityCreeper[‘Creeper’/309, l=‘MpServer’, x=118,50, y=39,69, z=291,40], EntitySkeleton[‘Squelette’/310, l=‘MpServer’, x=115,75, y=37,58, z=290,54], EntityBat[‘Chauve-souris’/311, l=‘MpServer’, x=119,42, y=36,98, z=294,76], EntityCow[‘Vache’/312, l=‘MpServer’, x=116,50, y=71,00, z=302,50], EntityCow[‘Vache’/313, l=‘MpServer’, x=119,50, y=71,00, z=303,50], EntityCow[‘Vache’/314, l=‘MpServer’, x=115,50, y=64,00, z=304,50], EntityZombie[‘Zombie’/91, l=‘MpServer’, x=-33,50, y=29,00, z=207,50], EntityCow[‘Vache’/98, l=‘MpServer’, x=-17,50, y=67,00, z=154,50], EntityCow[‘Vache’/99, l=‘MpServer’, x=-20,50, y=66,00, z=155,50], EntitySquid[‘Poulpe’/104, l=‘MpServer’, x=-23,33, y=55,11, z=192,26], EntitySquid[‘Poulpe’/105, l=‘MpServer’, x=-20,05, y=55,00, z=188,90], EntityCow[‘Vache’/107, l=‘MpServer’, x=-32,61, y=64,00, z=308,16], EntityCreeper[‘Creeper’/116, l=‘MpServer’, x=-6,03, y=52,00, z=158,25], EntitySpider[‘Araignée’/117, l=‘MpServer’, x=-10,84, y=52,00, z=159,13], EntityCow[‘Vache’/118, l=‘MpServer’, x=-14,47, y=70,00, z=153,53], EntityZombie[‘Zombie’/119, l=‘MpServer’, x=-6,13, y=52,00, z=162,59], EntityZombie[‘Zombie’/120, l=‘MpServer’, x=-2,56, y=52,00, z=165,75], EntityBat[‘Chauve-souris’/121, l=‘MpServer’, x=3,44, y=55,01, z=163,48], EntityCow[‘Vache’/122, l=‘MpServer’, x=-5,75, y=68,00, z=172,28], EntityCow[‘Vache’/123, l=‘MpServer’, x=-11,06, y=67,00, z=173,91], EntityBat[‘Chauve-souris’/124, l=‘MpServer’, x=-5,50, y=23,10, z=180,13], EntityBat[‘Chauve-souris’/125, l=‘MpServer’, x=-10,75, y=48,77, z=182,16], EntityCow[‘Vache’/126, l=‘MpServer’, x=-9,84, y=67,00, z=179,09], EntityCow[‘Vache’/127, l=‘MpServer’, x=-11,81, y=65,00, z=184,53], EntityZombie[‘Zombie’/128, l=‘MpServer’, x=-0,99, y=43,05, z=206,63], EntityItem[‘item.item.bone’/129, l=‘MpServer’, x=-4,19, y=45,13, z=201,44], EntityZombie[‘Zombie’/130, l=‘MpServer’, x=-6,41, y=38,00, z=216,34], EntitySkeleton[‘Squelette’/131, l=‘MpServer’, x=-0,97, y=48,00, z=235,03], EntityChicken[‘Poule’/132, l=‘MpServer’, x=-2,50, y=64,00, z=298,50], EntityChicken[‘Poule’/133, l=‘MpServer’, x=-4,41, y=64,00, z=291,56], EntityChicken[‘Poule’/134, l=‘MpServer’, x=-14,53, y=64,00, z=304,56], EntityCow[‘Vache’/144, l=‘MpServer’, x=6,53, y=70,00, z=154,53], EntityCow[‘Vache’/145, l=‘MpServer’, x=13,22, y=67,00, z=153,75], EntitySpider[‘Araignée’/146, l=‘MpServer’, x=11,50, y=31,00, z=161,06], EntityCreeper[‘Creeper’/147, l=‘MpServer’, x=9,50, y=33,00, z=165,03], EntityZombie[‘Zombie’/148, l=‘MpServer’, x=1,31, y=48,00, z=170,69], EntityZombie[‘Zombie’/149, l=‘MpServer’, x=1,31, y=48,00, z=169,78], EntityCreeper[‘Creeper’/150, l=‘MpServer’, x=14,50, y=49,00, z=161,00], EntityCow[‘Vache’/151, l=‘MpServer’, x=13,81, y=66,00, z=164,91], EntityCow[‘Vache’/152, l=‘MpServer’, x=13,25, y=73,00, z=162,50], EntityCreeper[‘Creeper’/153, l=‘MpServer’, x=7,53, y=45,00, z=183,00], EntityCreeper[‘Creeper’/154, l=‘MpServer’, x=13,13, y=45,00, z=179,72], EntityZombie[‘Zombie’/155, l=‘MpServer’, x=8,69, y=45,00, z=179,78], EntityZombie[‘Zombie’/156, l=‘MpServer’, x=8,31, y=45,00, z=184,25], EntitySquid[‘Poulpe’/157, l=‘MpServer’, x=10,94, y=58,00, z=182,54], EntitySquid[‘Poulpe’/158, l=‘MpServer’, x=9,18, y=56,00, z=189,42], EntityZombie[‘Zombie’/159, l=‘MpServer’, x=14,57, y=21,00, z=193,47], EntityZombie[‘Zombie’/160, l=‘MpServer’, x=11,47, y=21,00, z=192,31], EntityChicken[‘Poule’/161, l=‘MpServer’, x=11,16, y=63,00, z=205,66], EntityChicken[‘Poule’/162, l=‘MpServer’, x=14,63, y=63,00, z=204,59], EntitySquid[‘Poulpe’/163, l=‘MpServer’, x=4,48, y=57,28, z=197,49], EntityChicken[‘Poule’/164, l=‘MpServer’, x=10,25, y=63,00, z=207,31], EntityClientPlayerMP[‘Player5’/418, l=‘MpServer’, x=41,50, y=66,62, z=232,50], EntitySquid[‘Poulpe’/165, l=‘MpServer’, x=4,63, y=57,50, z=194,36], EntitySquid[‘Poulpe’/166, l=‘MpServer’, x=5,53, y=56,31, z=196,47], EntityChicken[‘Poule’/167, l=‘MpServer’, x=13,56, y=63,00, z=211,44], EntityChicken[‘Poule’/168, l=‘MpServer’, x=8,16, y=62,48, z=207,90], EntityBat[‘Chauve-souris’/169, l=‘MpServer’, x=3,32, y=64,32, z=214,67], EntityEnderman[‘Enderman’/170, l=‘MpServer’, x=14,28, y=11,00, z=230,34], EntityBat[‘Chauve-souris’/171, l=‘MpServer’, x=12,65, y=12,63, z=235,58], EntitySkeleton[‘Squelette’/172, l=‘MpServer’, x=4,47, y=46,00, z=238,16], EntityChicken[‘Poule’/173, l=‘MpServer’, x=10,44, y=65,00, z=299,47], EntityChicken[‘Poule’/174, l=‘MpServer’, x=5,53, y=65,00, z=296,50], EntityZombie[‘Zombie’/186, l=‘MpServer’, x=30,91, y=55,00, z=166,50], EntityEnderman[‘Enderman’/187, l=‘MpServer’, x=29,72, y=55,00, z=167,50], EntityEnderman[‘Enderman’/188, l=‘MpServer’, x=28,69, y=55,00, z=166,03], EntityEnderman[‘Enderman’/189, l=‘MpServer’, x=24,42, y=56,10, z=166,72], EntityZombie[‘Zombie’/190, l=‘MpServer’, x=34,35, y=55,79, z=166,69], EntitySkeleton[‘Squelette’/191, l=‘MpServer’, x=25,50, y=27,00, z=190,50], EntityCreeper[‘Creeper’/192, l=‘MpServer’, x=20,00, y=51,00, z=179,59], EntityZombie[‘Zombie’/193, l=‘MpServer’, x=18,44, y=33,00, z=193,56], EntityZombie[‘Zombie’/194, l=‘MpServer’, x=29,41, y=55,00, z=201,34], EntityChicken[‘Poule’/195, l=‘MpServer’, x=24,47, y=63,00, z=205,56], EntityHorse[‘Cheval’/196, l=‘MpServer’, x=16,97, y=62,00, z=203,03], EntityHorse[‘Cheval’/197, l=‘MpServer’, x=21,13, y=62,00, z=209,00], EntityBouftou[‘entity.bouftou.name’/198, l=‘MpServer’, x=22,31, y=63,00, z=228,01], EntityBouftou[‘entity.bouftou.name’/199, l=‘MpServer’, x=29,00, y=64,00, z=222,16], EntityZombie[‘Zombie’/200, l=‘MpServer’, x=16,97, y=12,00, z=229,69], EntityZombie[‘Zombie’/201, l=‘MpServer’, x=17,06, y=13,00, z=239,50], EntityBouftou[‘entity.bouftou.name’/202, l=‘MpServer’, x=21,72, y=63,00, z=224,63], EntityChicken[‘Poule’/203, l=‘MpServer’, x=21,47, y=65,00, z=265,91], EntityChicken[‘Poule’/204, l=‘MpServer’, x=27,59, y=65,00, z=258,38], EntityChicken[‘Poule’/205, l=‘MpServer’, x=24,56, y=64,00, z=265,59], EntityChicken[‘Poule’/206, l=‘MpServer’, x=29,06, y=65,00, z=268,72], EntityEnderman[‘Enderman’/219, l=‘MpServer’, x=31,74, y=55,00, z=166,72], EntityZombie[‘Zombie’/220, l=‘MpServer’, x=41,09, y=24,00, z=182,41], EntitySkeleton[‘Squelette’/221, l=‘MpServer’, x=45,50, y=25,00, z=178,50], EntityCreeper[‘Creeper’/222, l=‘MpServer’, x=36,98, y=27,00, z=188,63], EntityChicken[‘Poule’/223, l=‘MpServer’, x=32,63, y=63,00, z=197,56], EntityChicken[‘Poule’/224, l=‘MpServer’, x=38,44, y=64,00, z=232,59], EntityBouftou[‘entity.bouftou.name’/225, l=‘MpServer’, x=36,34, y=64,00, z=226,25], EntityCow[‘Vache’/226, l=‘MpServer’, x=45,50, y=72,00, z=291,50], EntityCow[‘Vache’/227, l=‘MpServer’, x=44,51, y=73,00, z=293,50], EntityBat[‘Chauve-souris’/237, l=‘MpServer’, x=57,67, y=28,90, z=161,56], EntityBat[‘Chauve-souris’/238, l=‘MpServer’, x=65,05, y=22,05, z=189,65], EntityBouftou[‘entity.bouftou.name’/239, l=‘MpServer’, x=54,19, y=64,00, z=209,38], EntityCow[‘Vache’/240, l=‘MpServer’, x=49,22, y=70,00, z=280,25], EntityCow[‘Vache’/241, l=‘MpServer’, x=52,47, y=67,00, z=284,44], EntityChicken[‘Poule’/246, l=‘MpServer’, x=77,56, y=70,00, z=175,56], EntityChicken[‘Poule’/247, l=‘MpServer’, x=75,25, y=68,00, z=178,47], EntityChicken[‘Poule’/248, l=‘MpServer’, x=76,63, y=64,90, z=182,60], EntityChicken[‘Poule’/249, l=‘MpServer’, x=79,47, y=69,00, z=188,47], EntityBouftou[‘entity.bouftou.name’/250, l=‘MpServer’, x=68,09, y=64,00, z=210,03], EntityZombie[‘Zombie’/251, l=‘MpServer’, x=65,49, y=42,00, z=292,36]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566)
at net.minecraft.client.Minecraft.run(Minecraft.java:984)
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:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)– System Details –
Details:
Minecraft Version: 1.7.10
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_101, Oracle Corporation
Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 748012192 bytes (713 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 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: 13, tallocated: 95
FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active
States: ‘U’ = Unloaded ‘L’ = Loaded ‘C’ = Constructed ‘H’ = Pre-initialized ‘I’ = Initialized ‘J’ = Post-initialized ‘A’ = Available ‘D’ = Disabled ‘E’ = Errored
UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)
UCHIJAAAA Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)
UCHIJAAAA modminefus{1.0.0} [Mod Minefus] (bin)
GL info: ’ Vendor: ‘NVIDIA Corporation’ Version: ‘4.5.0 NVIDIA 372.54’ Renderer: ‘GeForce GTX 960M/PCIe/SSE2’
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: GeForce GTX 960M/PCIe/SSE2 GL version 4.5.0 NVIDIA 372.54, NVIDIA Corporation
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: []
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: Off (1)
::: -
Montre nous ta classe où tu initialises tes items et tes blocs.
Je pense que ça vient du fait que M_Block.SingleSlabMStone n’est pas initialisé correctement lorsque tu crées l’item. -
package com.degraduck.minefus.init; import com.degraduck.minefus.block.slab.BlockSlabMStone; import com.degraduck.minefus.block.slab.ItemBlockMStoneSlab; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class M_BlockSlab { public static Block DoubleSlabMStone, SingleSlabMStone; public static void init() { DoubleSlabMStone = new BlockSlabMStone(true, Material.rock).setHardness(2.0F).setResistance(10.0F).setStepSound(Block.soundTypeStone).setBlockName("DoubleSlabMStone"); SingleSlabMStone = new BlockSlabMStone(false, Material.rock).setHardness(2.0F).setResistance(10.0F).setStepSound(Block.soundTypeStone).setBlockName("DoubleSlabMStone"); register(); } public static void register() { GameRegistry.registerBlock(DoubleSlabMStone, ItemBlockMStoneSlab.class, "DoubleSlabMStone"); GameRegistry.registerBlock(SingleSlabMStone, ItemBlockMStoneSlab.class, "SingleSlabMStone"); } }
Voila
-
Il faut aussi celles des items.
Et quitte à faire, envoie la classe de base de ton mod
-
J’ai pas d’item dans mon mod
classe principal:
package com.degraduck.minefus; import java.awt.Color; import com.degraduck.minefus.creativetabs.BlockMinefusCreativeTabs; import com.degraduck.minefus.creativetabs.LootMinefusCreativeTabs; import com.degraduck.minefus.entity.mobs.EntityBouftou; import com.degraduck.minefus.init.M_Block; import com.degraduck.minefus.init.M_BlockMulti; import com.degraduck.minefus.init.M_BlockSlab; import com.degraduck.minefus.init.M_Loot; import com.degraduck.minefus.init.M_Mob; import com.degraduck.minefus.proxy.CommonProxy; 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 net.minecraft.creativetab.CreativeTabs; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION) public class Minefus { @Instance("modminefus") public static Minefus instance; @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) public static CommonProxy proxy; public static CreativeTabs BlockMinefusCreativeTabs = new BlockMinefusCreativeTabs("blockminefus_creative_tabs"); public static CreativeTabs LootMinefusCreativeTabs = new LootMinefusCreativeTabs("lootminefus_creative_tabs"); @EventHandler public void preInit(FMLPreInitializationEvent event) { M_Block.init(); M_BlockMulti.init(); M_Loot.init(); M_BlockSlab.init(); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRender(); M_Mob.init(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } }
hier ça marchait super et la ça ne marche plus ^^
-
Résolu
-
Merci d’expliquer la solution pour ceux qui pourraient avoir le même problème