Rendu complexe de bloc via TESR
-
Il apparait très bien pourtant sous Firefox et sous Internet Explorer.
-
Je l’ai moi aussi, (sur Chrome).
-
Salut robin , depuis que j’ai suivi ce tuto , j’obtiens cette erreur dans la console :
Exception in thread "main" java.lang.NullPointerException at GradleStart.setupAssets(GradleStart.java:218) at GradleStart.startClient(GradleStart.java:81) at GradleStart.main(GradleStart.java:55) Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
-
Le problème vient de gradle, refait un setup avec la plus récente version de forge
-
Bien , apres avoir fait ca , j’arrive à lancer le jeu , mais voila :
[16:42:53] [Netty Client IO #1/ERROR] [FML]: ChannelRegistrationHandler exception java.lang.ClassCastException: Cannot cast net.minecraft.client.network.NetHandlerLoginClient to net.minecraft.client.network.NetHandlerPlayClient at java.lang.Class.cast(Unknown Source) ~[?:1.8.0] at cpw.mods.fml.common.network.FMLNetworkEvent$CustomPacketRegistrationEvent.<init>(FMLNetworkEvent.java:93) ~[FMLNetworkEvent$CustomPacketRegistrationEvent.class:?] at cpw.mods.fml.client.FMLClientHandler.fireNetRegistrationEvent(FMLClientHandler.java:860) ~[FMLClientHandler.class:?] at cpw.mods.fml.common.FMLCommonHandler.fireNetRegistrationEvent(FMLCommonHandler.java:590) ~[FMLCommonHandler.class:?] at cpw.mods.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:28) ~[ChannelRegistrationHandler.class:?] at cpw.mods.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:15) ~[ChannelRegistrationHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:257) [NetworkDispatcher.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:185) [NetworkDispatcher.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:43) [NetworkDispatcher.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) [SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:313) [LocalChannel.class:?] at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:43) [LocalChannel.class:?] at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:299) [LocalChannel$6.class:?] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [SingleThreadEventExecutor.class:?] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:348) [NioEventLoop.class:?] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [SingleThreadEventExecutor$2.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0] [16:42:53] [Netty Client IO #1/ERROR] [FML]: FMLIndexedMessageCodec exception caught java.lang.ClassCastException: Cannot cast net.minecraft.client.network.NetHandlerLoginClient to net.minecraft.client.network.NetHandlerPlayClient at java.lang.Class.cast(Unknown Source) ~[?:1.8.0] at cpw.mods.fml.common.network.FMLNetworkEvent$CustomPacketRegistrationEvent.<init>(FMLNetworkEvent.java:93) ~[FMLNetworkEvent$CustomPacketRegistrationEvent.class:?] at cpw.mods.fml.client.FMLClientHandler.fireNetRegistrationEvent(FMLClientHandler.java:860) ~[FMLClientHandler.class:?] at cpw.mods.fml.common.FMLCommonHandler.fireNetRegistrationEvent(FMLCommonHandler.java:590) ~[FMLCommonHandler.class:?] at cpw.mods.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:28) ~[ChannelRegistrationHandler.class:?] at cpw.mods.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:15) ~[ChannelRegistrationHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:257) [NetworkDispatcher.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:185) [NetworkDispatcher.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:43) [NetworkDispatcher.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) [SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:313) [LocalChannel.class:?] at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:43) [LocalChannel.class:?] at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:299) [LocalChannel$6.class:?] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [SingleThreadEventExecutor.class:?] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:348) [NioEventLoop.class:?] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [SingleThreadEventExecutor$2.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0] [16:42:53] [Netty Client IO #1/ERROR] [FML]: HandshakeMessageHandler exception java.lang.ClassCastException: Cannot cast net.minecraft.client.network.NetHandlerLoginClient to net.minecraft.client.network.NetHandlerPlayClient at java.lang.Class.cast(Unknown Source) ~[?:1.8.0] at cpw.mods.fml.common.network.FMLNetworkEvent$CustomPacketRegistrationEvent.<init>(FMLNetworkEvent.java:93) ~[FMLNetworkEvent$CustomPacketRegistrationEvent.class:?] at cpw.mods.fml.client.FMLClientHandler.fireNetRegistrationEvent(FMLClientHandler.java:860) ~[FMLClientHandler.class:?] at cpw.mods.fml.common.FMLCommonHandler.fireNetRegistrationEvent(FMLCommonHandler.java:590) ~[FMLCommonHandler.class:?] at cpw.mods.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:28) ~[ChannelRegistrationHandler.class:?] at cpw.mods.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:15) ~[ChannelRegistrationHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:257) [NetworkDispatcher.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:185) [NetworkDispatcher.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:43) [NetworkDispatcher.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) [SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:313) [LocalChannel.class:?] at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:43) [LocalChannel.class:?] at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:299) [LocalChannel$6.class:?] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [SingleThreadEventExecutor.class:?] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:348) [NioEventLoop.class:?] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [SingleThreadEventExecutor$2.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0] [16:42:53] [Netty Client IO #1/ERROR] [FML]: NetworkDispatcher exception java.lang.ClassCastException: Cannot cast net.minecraft.client.network.NetHandlerLoginClient to net.minecraft.client.network.NetHandlerPlayClient at java.lang.Class.cast(Unknown Source) ~[?:1.8.0] at cpw.mods.fml.common.network.FMLNetworkEvent$CustomPacketRegistrationEvent.<init>(FMLNetworkEvent.java:93) ~[FMLNetworkEvent$CustomPacketRegistrationEvent.class:?] at cpw.mods.fml.client.FMLClientHandler.fireNetRegistrationEvent(FMLClientHandler.java:860) ~[FMLClientHandler.class:?] at cpw.mods.fml.common.FMLCommonHandler.fireNetRegistrationEvent(FMLCommonHandler.java:590) ~[FMLCommonHandler.class:?] at cpw.mods.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:28) ~[ChannelRegistrationHandler.class:?] at cpw.mods.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:15) ~[ChannelRegistrationHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:257) ~[NetworkDispatcher.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:185) ~[NetworkDispatcher.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:43) ~[NetworkDispatcher.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:313) [LocalChannel.class:?] at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:43) [LocalChannel.class:?] at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:299) [LocalChannel$6.class:?] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [SingleThreadEventExecutor.class:?] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:348) [NioEventLoop.class:?] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [SingleThreadEventExecutor$2.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0] [16:42:54] [Netty Client IO #1/INFO] [FML]: Server protocol version 1 [16:42:56] [Netty IO #3/INFO] [FML]: Client protocol version 1 [16:42:54] [Netty Client IO #2/INFO] [FML]: Server protocol version 1 [16:42:56] [Netty IO #5/INFO] [FML]: Client protocol version 1 [16:42:56] [Netty Client IO #2/INFO] [FML]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S00PacketKeepAlive [16:42:56] [Netty IO #3/INFO] [FML]: Client attempting to join with 4 mods : FML@7.10.84.1217,Forge@10.13.1.1217,mcp@9.05,modularblocks@1.0.0 [16:42:56] [Netty IO #5/INFO] [FML]: Client attempting to join with 4 mods : FML@7.10.84.1217,Forge@10.13.1.1217,mcp@9.05,modularblocks@1.0.0 [16:42:56] [Netty IO #5/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [16:42:56] [Netty IO #3/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [16:42:56] [Netty IO #5/INFO] [FML]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.client.C00PacketKeepAlive [16:42:56] [Netty Client IO #1/INFO] [FML]: Attempting connection with missing mods [] at SERVER [16:42:56] [Netty Client IO #2/INFO] [FML]: Attempting connection with missing mods [] at SERVER [16:42:56] [Netty Client IO #2/INFO] [FML]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S00PacketKeepAlive [16:42:56] [Netty IO #5/INFO] [FML]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.client.C00PacketKeepAlive [16:42:56] [Netty Client IO #2/ERROR] [FML]: NetworkDispatcher exception java.util.ConcurrentModificationException at java.util.ArrayDeque$DeqIterator.next(Unknown Source) ~[?:1.8.0] at cpw.mods.fml.common.network.internal.FMLNetworkHandler.forwardHandshake(FMLNetworkHandler.java:179) ~[FMLNetworkHandler.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:261) ~[NetworkDispatcher.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:185) ~[NetworkDispatcher.class:?] at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:43) ~[NetworkDispatcher.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:313) [LocalChannel.class:?] at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:43) [LocalChannel.class:?] at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:299) [LocalChannel$6.class:?] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [SingleThreadEventExecutor.class:?] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:348) [NioEventLoop.class:?] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [SingleThreadEventExecutor$2.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0] [16:42:56] [Server thread/INFO]: ForgeDevName lost connection: TextComponent{text='Disconnected', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null}} [16:42:57] [Server thread/INFO]: ForgeDevName left the game ```</init></init></init></init>
-
Forge a des problèmes avec Java 8, repasse sous Java 7.
-
Ah , le truc , c’est que j’ai les deux d’installés , je vais voir pour endre le 7 en défaut (sur minecraft , je l’ai deja fait)
Edit : Dans mon path j’utilise Java 7
Re-Edit : Il fallait le changer dans Eclipse , merci du conseil
Yesssss , ca fonctionne merci robin et kevin_68 !Re-Re-Edit : En suivant le tuto par défaut , la texture doit bien se trouver dans src/ressources/textures/blocks ? car mon render n’a aucunne texture
-
Ben tu as cette ligne dans le TESR de ton bloc
public static final ResourceLocation textureLocation = new ResourceLocation("modtutoriel", "textures/blocks/modelTutoriel.png");
Donc tout dépends de ce que tu as mis
-
bonjour, j’ai un problème, le rendu dans la main ne se fait pas
voici mes class :main
@EventHandler public void init(FMLInitializationEvent event) { EntityRegistry.registerGlobalEntityID(EntityMino.class, "mobmino", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityMino.class, "mobmino", 424, this.instance, 40, 1, true); proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityForza.class, "mobforza", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityForza.class, "mobforza", 425, this.instance, 40, 1, true); proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityChest.class, "mobchest", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityChest.class, "mobchest", 426, this.instance, 40, 1, true); proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityDragon.class, "mobdragon", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityDragon.class, "mobdragon", 427, this.instance, 40, 1, true); proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityEnderBoss.class, "mobender", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityEnderBoss.class, "mobender", 428, this.instance, 40, 1, true); proxy.registerRender(); proxy.registerTileEntityRender(); }
BlockCaisse
package mod.kingdom.common; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import mod.kingdom.proxy.ClientProxy; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class BlockCaisse extends Block { public BlockCaisse(Material rockid) { super(Material.wood); } public TileEntity createTileEntity(World world, int metadata) { return new TileEntityCaisse(); } public boolean hasTileEntity(int metadata) { return true; } public boolean renderAsNormalBlock() { return false; } public boolean isOpaqueCube() { return false; } @SideOnly(Side.CLIENT) public int getRenderType() { return ClientProxy.renderInventoryCaisse; } public IIcon getIcon(int side, int metadata) { return Blocks.wooden_slab.getIcon(0, 0); } }
ClientProxy
public class ClientProxy extends CommonProxy { public static int renderInventoryCaisse; @Override public void registerRender() { RenderingRegistry.registerEntityRenderingHandler(EntityMino.class, new RenderMino(new ModelMino(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityForza.class, new RenderForza(new ModelForza(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityChest.class, new RenderChest(new ModelChest(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityDragon.class, new RenderDragon(new ModelDragon(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityEnderBoss.class, new RenderEnderBoss(new ModelEnderBoss(), 0.5F)); renderInventoryCaisse = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new CaisseInventoryRenderer()); } @Override public void registerTileEntityRender() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCaisse.class, new TileEntityCaisseSpecialRender()); CaisseInventoryRenderer.blockCaisse.put(new TESRIndex(Kingdom.blockCaisse, 0), new TileEntityCaisseSpecialRender()); } }
TileEntityCaisseSpecialRender
public class TileEntityCaisseSpecialRender extends TileEntitySpecialRenderer implements IInventoryRenderer { private final CaisseModel model = new CaisseModel(); public static final ResourceLocation textureLocation = new ResourceLocation("kingdom:textures/blocks/caisse.png"); public TileEntityCaisseSpecialRender() { this.func_147497_a(TileEntityRendererDispatcher.instance); } @Override public void renderInventory(double x, double y, double z) { // TODO Auto-generated method stub this.renderTileEntityCaisseAt(null, x, y, z, 0.0F); } @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float tick) { this.renderTileEntityCaisseAt((TileEntityCaisse)te, x, y, z, tick); } public void renderTileEntityCaisseAt(TileEntityCaisse te, double x, double y, double z, float tick) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5F, y + 1.5F, z + 0.5F); this.bindTexture(textureLocation); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); this.model.render(0.0625F); GL11.glPopMatrix(); } }
CaisseInventoryRenderer
public class CaisseInventoryRenderer implements ISimpleBlockRenderingHandler { public static class TESRIndex { Block block; int metadata; public TESRIndex(Block block, int metadata) { this.block = block; this.metadata = metadata; } @Override public int hashCode() { return block.hashCode() + metadata; } @Override public boolean equals(Object o) { if(!(o instanceof TESRIndex)) return false; TESRIndex tesr = (TESRIndex)o; return tesr.block == block && tesr.metadata == metadata; } } public static HashMap <tesrindex, iinventoryrenderer="">blockCaisse = new HashMap<tesrindex, iinventoryrenderer="">(); @Override public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { } @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { return true; } public boolean shouldRender3DInInventory(int modelId) { return true; } @Override public int getRenderId() { return ClientProxy.renderInventoryCaisse; } }
Voilà si vous voulez d’autres class demandez moi et merci d’avance pour votre aide et bonne journée :)</tesrindex,></tesrindex,>
-
Tu peux envoyer la classe Main entière et nous montrer un log ?
-
main
package mod.kingdom.common; import java.awt.Color; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.EnumCreatureType; import net.minecraft.init.Blocks; 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.ItemFood; import net.minecraft.item.ItemSeeds; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import mod.kingdom.proxy.ClientProxy; import mod.kingdom.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 cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "kingdom", name = "Kingdom", version = "1.0.0") public class Kingdom { @Instance("kingdom") public static Kingdom instance; @SidedProxy(clientSide = "mod.kingdom.proxy.ClientProxy", serverSide = "mod.kingdom.proxy.CommonProxy") public static ClientProxy proxy; public static Item bowTest; public static Block blockOrgeCulture; public static Item itemOrge, orgeSeed; public static Block blockRaisinCulture; public static Item itemRaisin, raisinSeed; public static Block blockAzuriteOre; public static Block blockPyriteOre; public static Block blockPyrite; public static Block blockPlatine; public static Block blockAzurite; public static Block blockCaisse; public static Item azuriteSword; public static Item pyriteSword; public static Item platineSword; public static Item itemBeer; public static Item itemVin; public static Item malt; public static Item azuriteHammer; public static Item pyriteHammer; public static Item platineHammer; public static Item pieceOr; public static Item pieceArgent; public static Item pieceBronze; public static Item itemAzurite; public static Item itemPyrite; public static Item itemPlatine; public static Item itemAzuriteHelmet; public static Item itemAzuriteChestplate; public static Item itemAzuriteLeggings; public static Item itemAzuriteBoots; public static Item itemPyriteHelmet; public static Item itemPyriteChestplate; public static Item itemPyriteLeggings; public static Item itemPyriteBoots; public static Item itemPlatineHelmet; public static Item itemPlatineChestplate; public static Item itemPlatineLeggings; public static Item itemPlatineBoots; public static ArmorMaterial armorAzurite = EnumHelper.addArmorMaterial("armorAzurite", 35, new int[] {4, 6, 5, 4}, 10); public static ArmorMaterial armorPyrite = EnumHelper.addArmorMaterial("armorPyrite", 40, new int[] {4, 6, 5, 4}, 8); public static ArmorMaterial armorPlatine = EnumHelper.addArmorMaterial("armorPlatine", 45, new int[] {4, 6, 5, 4}, 6); static ToolMaterial swordAzuriteMaterial = EnumHelper.addToolMaterial("swordAzuriteMaterial", 3, 1300, 8.0F, 4.0F, 10); static ToolMaterial swordPyriteMaterial = EnumHelper.addToolMaterial("swordPyriteMaterial", 3, 1800, 8.0F, 5.0F, 8); static ToolMaterial swordPlatineMaterial = EnumHelper.addToolMaterial("swordPlatineMaterial", 3, 2500, 8.0F, 6.0F, 6); static ToolMaterial hammerAzuriteMaterial = EnumHelper.addToolMaterial("hammerAzuriteMaterial", 1300, 854, 8.0F, 5.0F, 10); static ToolMaterial hammerPyriteMaterial = EnumHelper.addToolMaterial("hammerPyriteMaterial", 1800, 854, 8.0F, 6.0F, 8); static ToolMaterial hammerPlatineMaterial = EnumHelper.addToolMaterial("hammerPlatineMaterial", 2500, 854, 8.0F, 7.0F, 6); public static Enchantment enchantSlowdown; public static Enchantment enchantConfusion; public static Enchantment enchantBlindness; public static Enchantment enchantHunger; public static Enchantment enchantWeakness; public static Enchantment enchantPoison; public static Enchantment enchantWither; @EventHandler public void preInit(FMLPreInitializationEvent event) { blockOrgeCulture = new BlockOrgeCulture().setBlockName("block_orgeCulture").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("kingdom:orgeculture"); blockRaisinCulture = new BlockRaisinCulture().setBlockName("block_raisinCulture").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("kingdom:raisinculture"); MinecraftForge.EVENT_BUS.register(new EnchantmentManager()); enchantSlowdown = new EnchantmentSlowdown().setName("enchantSlowdown"); enchantConfusion = new EnchantmentConfusion().setName("enchantConfusion"); enchantBlindness = new EnchantmentBlindness().setName("enchantBlindness"); enchantHunger = new EnchantmentHunger().setName("enchantHunger"); enchantWeakness = new EnchantmentWeakness().setName("enchantWeakness"); enchantPoison = new EnchantmentPoison().setName("enchantPoison"); enchantWither = new EnchantmentWither().setName("enchantWither"); itemBeer = new ItemBeer(4, 4, false).setUnlocalizedName("beer").setTextureName("kingdom:beer"); itemVin = new ItemVin(4, 4, false).setUnlocalizedName("vin").setTextureName("kingdom:vin"); malt = new Item().setUnlocalizedName("malt").setTextureName("kingdom:malt"); itemAzurite = new ItemAzurite().setUnlocalizedName("azurite").setTextureName("kingdom:azurite").setCreativeTab(CreativeTabs.tabMaterials); itemPyrite = new ItemPyrite().setUnlocalizedName("pyrite").setTextureName("kingdom:pyrite").setCreativeTab(CreativeTabs.tabMaterials); itemPlatine = new ItemPlatine().setUnlocalizedName("platine").setTextureName("kingdom:platine").setCreativeTab(CreativeTabs.tabMaterials); bowTest = new BowTest().setUnlocalizedName("bowtest").setCreativeTab(CreativeTabs.tabCombat); orgeSeed = new ItemSeeds(Kingdom.blockOrgeCulture, Blocks.farmland).setUnlocalizedName("seedorge").setTextureName("kingdom:seed_orge").setCreativeTab(CreativeTabs.tabMaterials); itemOrge = new Item().setUnlocalizedName("itemorge").setTextureName("kingdom:orge").setCreativeTab(CreativeTabs.tabMaterials); raisinSeed = new ItemSeeds(Kingdom.blockRaisinCulture, Blocks.farmland).setUnlocalizedName("seedraisin").setTextureName("kingdom:seed_raisin").setCreativeTab(CreativeTabs.tabMaterials); itemRaisin = new Item().setUnlocalizedName("itemraisin").setTextureName("kingdom:raisin").setCreativeTab(CreativeTabs.tabMaterials); pieceOr = new PieceOr().setUnlocalizedName("pieceor").setTextureName("kingdom:or").setCreativeTab(CreativeTabs.tabMaterials); pieceArgent = new PieceArgent().setUnlocalizedName("pieceargent").setTextureName("kingdom:argent").setCreativeTab(CreativeTabs.tabMaterials); pieceBronze = new PieceBronze().setUnlocalizedName("piecebronze").setTextureName("kingdom:bronze").setCreativeTab(CreativeTabs.tabMaterials); azuriteSword = new AzuriteSword(swordAzuriteMaterial).setUnlocalizedName("azuritesword").setTextureName("kingdom:azurite_sword").setCreativeTab(CreativeTabs.tabCombat); pyriteSword = new PyriteSword(swordPyriteMaterial).setUnlocalizedName("pyritesword").setTextureName("kingdom:pyrite_sword").setCreativeTab(CreativeTabs.tabCombat); platineSword = new PlatineSword(swordPlatineMaterial).setUnlocalizedName("platinesword").setTextureName("kingdom:platine_sword").setCreativeTab(CreativeTabs.tabCombat); azuriteHammer = new AzuriteHammer(hammerAzuriteMaterial).setUnlocalizedName("azuritehammer").setCreativeTab(CreativeTabs.tabCombat); pyriteHammer = new PyriteHammer(hammerPyriteMaterial).setUnlocalizedName("pyritehammer").setCreativeTab(CreativeTabs.tabCombat); platineHammer = new PlatineHammer(hammerPlatineMaterial).setUnlocalizedName("platinehammer").setCreativeTab(CreativeTabs.tabCombat); blockAzuriteOre = new BlockAzuriteOre(Material.rock).setBlockName("azuriteore").setHardness(3.0F).setResistance(5.0F).setBlockTextureName("kingdom:block_azuriteore").setCreativeTab(CreativeTabs.tabBlock); blockPyriteOre = new BlockPyriteOre(Material.rock).setBlockName("pyriteore").setHardness(3.0F).setResistance(5.0F).setBlockTextureName("kingdom:block_pyriteore").setCreativeTab(CreativeTabs.tabBlock); blockPyrite = new BlockPyrite(Material.rock).setBlockName("pyrite").setHardness(3.0F).setResistance(5.0F).setBlockTextureName("kingdom:block_pyrite").setCreativeTab(CreativeTabs.tabBlock); blockPlatine = new BlockPlatine(Material.rock).setBlockName("platine").setHardness(3.0F).setResistance(5.0F).setBlockTextureName("kingdom:block_platine").setCreativeTab(CreativeTabs.tabBlock); blockAzurite = new BlockAzurite(Material.rock).setBlockName("azurite").setHardness(3.0F).setResistance(5.0F).setBlockTextureName("kingdom:azurite").setCreativeTab(CreativeTabs.tabBlock); blockCaisse = new BlockCaisse(Material.wood).setBlockName("caisse").setHardness(3.0F).setCreativeTab(CreativeTabs.tabBlock); itemAzuriteHelmet = new ItemAzuriteArmor(armorAzurite, 0).setUnlocalizedName("helmetAzurite").setTextureName("kingdom:helmetAzurite").setCreativeTab(CreativeTabs.tabCombat); itemAzuriteChestplate = new ItemAzuriteArmor(armorAzurite, 1).setUnlocalizedName("chestPlateAzurite").setTextureName("kingdom:helmetAzurite").setCreativeTab(CreativeTabs.tabCombat); itemAzuriteLeggings = new ItemAzuriteArmor(armorAzurite, 2).setUnlocalizedName("leggingsAzurite").setTextureName("kingdom:helmetAzurite").setCreativeTab(CreativeTabs.tabCombat); itemAzuriteBoots = new ItemAzuriteArmor(armorAzurite, 3).setUnlocalizedName("bootsAzurite").setTextureName("kingdom:helmetAzurite").setCreativeTab(CreativeTabs.tabCombat); itemPyriteHelmet = new ItemPyriteArmor(armorPyrite, 0).setUnlocalizedName("helmetPyrite").setTextureName("kingdom:helmetPyrite").setCreativeTab(CreativeTabs.tabCombat); itemPyriteChestplate = new ItemPyriteArmor(armorPyrite, 1).setUnlocalizedName("chestPlatePyrite").setTextureName("kingdom:helmetPyrite").setCreativeTab(CreativeTabs.tabCombat); itemPyriteLeggings = new ItemPyriteArmor(armorPyrite, 2).setUnlocalizedName("leggingsPyrite").setTextureName("kingdom:helmetPyrite").setCreativeTab(CreativeTabs.tabCombat); itemPyriteBoots = new ItemPyriteArmor(armorPyrite, 3).setUnlocalizedName("bootsPyrite").setTextureName("kingdom:helmetPyrite").setCreativeTab(CreativeTabs.tabCombat); itemPlatineHelmet = new ItemPlatineArmor(armorPlatine, 0).setUnlocalizedName("helmetPlatine").setTextureName("kingdom:helmetPlatine").setCreativeTab(CreativeTabs.tabCombat); itemPlatineChestplate = new ItemPlatineArmor(armorPlatine, 1).setUnlocalizedName("chestPlatePlatine").setTextureName("kingdom:helmetPlatine").setCreativeTab(CreativeTabs.tabCombat); itemPlatineLeggings = new ItemPlatineArmor(armorPlatine, 2).setUnlocalizedName("leggingsPlatine").setTextureName("kingdom:helmetPlatine").setCreativeTab(CreativeTabs.tabCombat); itemPlatineBoots = new ItemPlatineArmor(armorPlatine, 3).setUnlocalizedName("bootsPlatine").setTextureName("kingdom:helmetPlatine").setCreativeTab(CreativeTabs.tabCombat); GameRegistry.registerItem(itemAzurite, "item_azurite"); GameRegistry.registerItem(itemPyrite, "item_pyrite"); GameRegistry.registerItem(itemPlatine, "item_platine"); GameRegistry.registerBlock(blockAzuriteOre, "block_azuriteore"); GameRegistry.registerBlock(blockPyriteOre, "block_pyriteore"); GameRegistry.registerBlock(blockPyrite, "block_pyrite"); GameRegistry.registerBlock(blockPlatine, "block_platine"); GameRegistry.registerBlock(blockAzurite, "block_azurite"); GameRegistry.registerItem(itemPlatineHelmet, "platine_helmet"); GameRegistry.registerItem(itemPlatineChestplate, "platine_chestplate"); GameRegistry.registerItem(itemPlatineLeggings, "platine_leggings"); GameRegistry.registerItem(itemPlatineBoots, "platine_boots"); GameRegistry.registerItem(itemPyriteHelmet, "pyrite_helmet"); GameRegistry.registerItem(itemPyriteChestplate, "pyrite_chestplate"); GameRegistry.registerItem(itemPyriteLeggings, "pyrite_leggings"); GameRegistry.registerItem(itemPyriteBoots, "pyrite_boots"); GameRegistry.registerItem(itemAzuriteHelmet, "azurite_helmet"); GameRegistry.registerItem(itemAzuriteChestplate, "azurite_chestplate"); GameRegistry.registerItem(itemAzuriteLeggings, "azurite_leggings"); GameRegistry.registerItem(itemAzuriteBoots, "azurite_boots"); GameRegistry.registerItem(azuriteSword, "azurite_sword"); GameRegistry.registerItem(pyriteSword, "pyrite_sword"); GameRegistry.registerItem(platineSword, "platine_sword"); GameRegistry.registerItem(azuriteHammer, "azurite_hammer"); GameRegistry.registerItem(pyriteHammer, "pyrite_hammer"); GameRegistry.registerItem(platineHammer, "platine_hammer"); GameRegistry.registerItem(orgeSeed, "orge_seed"); GameRegistry.registerItem(itemOrge, "orge"); GameRegistry.registerBlock(blockOrgeCulture, "block_orge"); GameRegistry.registerBlock(blockCaisse, "block_caisse"); GameRegistry.registerItem(itemBeer, "item_beer"); GameRegistry.registerItem(itemVin, "item_vin"); GameRegistry.registerItem(malt, "item_malt"); GameRegistry.registerItem(pieceOr, "or"); GameRegistry.registerItem(pieceArgent, "argent"); GameRegistry.registerItem(pieceBronze, "bronze"); GameRegistry.registerItem(bowTest, "bow_test"); GameRegistry.addRecipe(new ItemStack(itemAzuriteHelmet, 1), new Object[] {"XXX", "X X", 'X',itemAzurite}); GameRegistry.addRecipe(new ItemStack(itemAzuriteChestplate, 1), new Object[] {"X X", "XXX", "XXX", 'X',itemAzurite}); GameRegistry.addRecipe(new ItemStack(itemAzuriteLeggings, 1), new Object[] {"XXX", "X X", "X X", 'X',itemAzurite}); GameRegistry.addRecipe(new ItemStack(itemAzuriteBoots, 1), new Object[] {"X X", "X X", 'X',itemAzurite}); GameRegistry.addRecipe(new ItemStack(itemPyriteHelmet, 1), new Object[] {"XXX", "X X", 'X',itemPyrite}); GameRegistry.addRecipe(new ItemStack(itemPyriteChestplate, 1), new Object[] {"X X", "XXX", "XXX", 'X',itemPyrite}); GameRegistry.addRecipe(new ItemStack(itemPyriteLeggings, 1), new Object[] {"XXX", "X X", "X X", 'X',itemPyrite}); GameRegistry.addRecipe(new ItemStack(itemPyriteBoots, 1), new Object[] {"X X", "X X", 'X',itemPyrite}); GameRegistry.addRecipe(new ItemStack(itemPlatineHelmet, 1), new Object[] {"XXX", "X X", 'X',itemPlatine}); GameRegistry.addRecipe(new ItemStack(itemPlatineChestplate, 1), new Object[] {"X X", "XXX", "XXX", 'X',itemPlatine}); GameRegistry.addRecipe(new ItemStack(itemPlatineLeggings, 1), new Object[] {"XXX", "X X", "X X", 'X',itemPlatine}); GameRegistry.addRecipe(new ItemStack(itemPlatineBoots, 1), new Object[] {"X X", "X X", 'X',itemPlatine}); GameRegistry.addRecipe(new ItemStack(blockPyrite, 1), new Object[] {"XXX", "XXX","XXX", 'X',itemPyrite}); GameRegistry.addRecipe(new ItemStack(blockAzurite, 1), new Object[] {"XXX", "XXX","XXX", 'X',itemAzurite}); GameRegistry.addRecipe(new ItemStack(blockPlatine, 1), new Object[] {"XXX", "XXX","XXX", 'X',itemPlatine}); GameRegistry.addRecipe(new ItemStack(pieceArgent, 1), new Object[] {"XXX", "XXX","XXX", 'X',pieceBronze}); GameRegistry.addRecipe(new ItemStack(pieceOr, 1), new Object[] {"XXX", "XXX","XXX", 'X',pieceArgent}); GameRegistry.addRecipe(new ItemStack(pieceArgent, 9), new Object[] {"X", 'X',pieceOr}); GameRegistry.addRecipe(new ItemStack(pieceBronze, 9), new Object[] {"X", 'X',pieceArgent}); GameRegistry.addRecipe(new ItemStack(azuriteSword, 1), new Object[] {"X", "X", "Y", 'X', itemAzurite, 'Y', Items.stick}); GameRegistry.addRecipe(new ItemStack(pyriteSword, 1), new Object[] {"X", "X", "Y", 'X', itemPyrite, 'Y', Items.stick}); GameRegistry.addRecipe(new ItemStack(platineSword, 1), new Object[] {"X", "X", "Y", 'X', itemPlatine, 'Y', Items.stick}); GameRegistry.addRecipe(new ItemStack(azuriteHammer, 1), new Object[] {"XXX", "XYX", " Y ", 'X', itemAzurite, 'Y', Items.stick}); GameRegistry.addRecipe(new ItemStack(pyriteHammer, 1), new Object[] {"XXX", "XYX", " Y ", 'X', itemPyrite, 'Y', Items.stick}); GameRegistry.addRecipe(new ItemStack(platineHammer, 1), new Object[] {"XXX", "XYX", " Y ", 'X', itemPlatine, 'Y', Items.stick}); GameRegistry.addSmelting(itemOrge, new ItemStack(malt, 1), 3.5F); GameRegistry.registerTileEntity(TileEntityCaisse.class, "Caisse"); } @EventHandler public void init(FMLInitializationEvent event) { EntityRegistry.registerGlobalEntityID(EntityMino.class, "mobmino", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityMino.class, "mobmino", 424, this.instance, 40, 1, true); proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityForza.class, "mobforza", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityForza.class, "mobforza", 425, this.instance, 40, 1, true); proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityChest.class, "mobchest", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityChest.class, "mobchest", 426, this.instance, 40, 1, true); proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityDragon.class, "mobdragon", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityDragon.class, "mobdragon", 427, this.instance, 40, 1, true); proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityEnderBoss.class, "mobender", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityEnderBoss.class, "mobender", 428, this.instance, 40, 1, true); proxy.registerRender(); proxy.registerTileEntityRender(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } public static final String MODID = "kingdom"; }
-
svp
-
@SidedProxy(clientSide = “mod.kingdom.proxy.ClientProxy”, serverSide = “mod.kingdom.proxy.CommonProxy”)
public static ClientProxy proxy;
Déjà ici il devrait avoir CommonProxy et non ClientProxy. J’ai pas vu d’autre erreur. -
malheureusement ça ne change rien mais merci quand même
-
J’ai trouvé le problème, dans CaisseInventoryRenderer
Ta fonction renderInventoryBlock devrait être comme ça : TESRIndex index = new TESRIndex(block, metadata); if(blockCaisse.containsKey(index)) { blockCaisse.get(index).renderInventory(-0.5, -0.5, -0.5); }
-
merci je vais essayer ça
-
ça fonctionne niquel merci et j’ai une petite question ,j’ai entendu que pour créer un block de plus de 1 * 1 block (porte, lit) c’est assez compliqué. Je me demandais si ça se faisait avec une entity (comme les portes armures et les enclumes) et merci encore de ton aide
-
Pas forcement, la porte et le lit par exemple utilise plusieurs blocs, en fait quand tu poses un bloc, ça en pose un autre en même temps, et quand tu en casse un, l’autre se détruit avec.
-
c’est pas trop compliqué même quand il y a 16 blocs à poser ?
-
16 blocs ça non, il va falloir pleins de condition.