[ BLOCK RENDER SPECIAL ]
-
Bonjour
J’ai essayé de créer un bloc avec un model custom mais ça ne fonctionnent pas, pourtant j’ai lu et relu votre tuto mais je comprend pas ce
dis fonctionnement%(#3366ff)[Mon Code :]
%(#ff3333)[TileEntityLanternSpecialRenderer :]
%(#333333)[package com.google.SpyMan.Mechanicalcraft.common.Lantern; ] import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class TileEntityLanternSpecialRenderer extends TileEntitySpecialRenderer { @SideOnly(Side.CLIENT) public static ModelLantern ModelLantern = new ModelLantern(); public static ResourceLocation texture = new ResourceLocation( "modmechanicalcraft:textures/models/blocks/Lantern.png"); public TileEntityLanternSpecialRenderer() { this.func_147497_a(TileEntityRendererDispatcher.instance); } private void renderTileEntityTileLanternAt(TileLantern tile, double x, double y, double z, float partialRenderTick) { GL11.glPushMatrix(); GL11.glTranslated(x, y, z); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); ModelLantern.renderAll(); this.bindTexture(texture); GL11.glPopMatrix(); } public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialRenderTick) { this.renderTileEntityTileLanternAt((TileLantern) tile, x, y, z, partialRenderTick); } %(#333333)[}]
%(#ff3333)[bloc Lantern :]
package com.google.SpyMan.Mechanicalcraft.common.Lantern; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy; import com.google.SpyMan.Mechanicalcraft.common.*; import com.google.SpyMan.Mechanicalcraft.common.Lantern.*; public class Lantern extends Block { public Lantern(Material material) { super(material); setResistance(3.0F); setLightLevel(20.0F); } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } public int getRenderType() { return -1; } public TileEntity createNewTileEntity(World world, int metadata) { return new TileLantern(); } public boolean hasTileEntity(int metadata) { return true; } }
%(#ff3333)[ClientProxy :]
package com.google.SpyMan.Mechanicalcraft.proxy; import com.google.SpyMan.Mechanicalcraft.common.Lantern.TileEntityLanternSpecialRenderer; import com.google.SpyMan.Mechanicalcraft.common.Lantern.TileLantern; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends CommonProxy { public static int tesrRenderId; @Override public void registerRender() { ClientRegistry.bindTileEntitySpecialRenderer(TileLantern.class, new TileEntityLanternSpecialRenderer()); tesrRenderId = RenderingRegistry.getNextAvailableRenderId(); } }
TileEntity :
package com.google.SpyMan.Mechanicalcraft.common.Lantern; import net.minecraft.tileentity.TileEntity; public class TileLantern extends TileEntity{ }
%(#ff3333)[*Model : *]
package com.google.SpyMan.Mechanicalcraft.common.Lantern; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelLantern extends ModelBase { ModelRenderer compartimentCandel; ModelRenderer Base; ModelRenderer Shape3; ModelRenderer Shape4; ModelRenderer Shape5; ModelRenderer Shape6; ModelRenderer BaseTop; ModelRenderer Candel; ModelRenderer PoignerCoté1; ModelRenderer Shape10; ModelRenderer poignerTop; public ModelLantern() { textureWidth = 64; textureHeight = 32; compartimentCandel = new ModelRenderer(this, 25, 12); compartimentCandel.addBox(0F, 0F, 0F, 6, 8, 6); compartimentCandel.setRotationPoint(-3F, 15F, -3F); compartimentCandel.setTextureSize(64, 32); setRotation(compartimentCandel, 0F, 0F, 0F); Base = new ModelRenderer(this, 0, 0); Base.addBox(0F, 0F, 0F, 8, 1, 8); Base.setRotationPoint(-4F, 23F, -4F); Base.setTextureSize(64, 32); setRotation(Base, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 8, 17); Shape3.addBox(0F, 0F, 0F, 1, 8, 1); Shape3.setRotationPoint(-4F, 15F, 3F); Shape3.setTextureSize(64, 32); setRotation(Shape3, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 8, 17); Shape4.addBox(0F, 0F, 0F, 1, 8, 1); Shape4.setRotationPoint(-4F, 15F, -4F); Shape4.setTextureSize(64, 32); setRotation(Shape4, 0F, 0F, 0F); Shape5 = new ModelRenderer(this, 8, 17); Shape5.addBox(0F, 0F, 0F, 1, 8, 1); Shape5.setRotationPoint(3F, 15F, -4F); Shape5.setTextureSize(64, 32); setRotation(Shape5, 0F, 0F, 0F); Shape6 = new ModelRenderer(this, 8, 17); Shape6.addBox(0F, 0F, 0F, 1, 8, 1); Shape6.setRotationPoint(3F, 15F, 3F); Shape6.setTextureSize(64, 32); setRotation(Shape6, 0F, 0F, 0F); BaseTop = new ModelRenderer(this, 32, 0); BaseTop.addBox(0F, 0F, 0F, 8, 1, 8); BaseTop.setRotationPoint(-4F, 14F, -4F); BaseTop.setTextureSize(64, 32); setRotation(BaseTop, 0F, 0F, 0F); Candel = new ModelRenderer(this, 15, 17); Candel.addBox(0F, 0F, 0F, 2, 5, 2); Candel.setRotationPoint(-1F, 18F, -1F); Candel.setTextureSize(64, 32); setRotation(Candel, 0F, 0F, 0F); PoignerCoté1 = new ModelRenderer(this, 0, 10); PoignerCoté1.addBox(0F, 0F, 0F, 1, 2, 2); PoignerCoté1.setRotationPoint(-3F, 12F, -1F); PoignerCoté1.setTextureSize(64, 32); setRotation(PoignerCoté1, 0F, 0F, 0F); Shape10 = new ModelRenderer(this, 0, 10); Shape10.addBox(0F, 0F, 0F, 1, 2, 2); Shape10.setRotationPoint(2F, 12F, -1F); Shape10.setTextureSize(64, 32); setRotation(Shape10, 0F, 0F, 0F); poignerTop = new ModelRenderer(this, 7, 10); poignerTop.addBox(0F, 0F, 0F, 4, 1, 2); poignerTop.setRotationPoint(-2F, 11F, -1F); poignerTop.setTextureSize(64, 32); setRotation(poignerTop, 0F, 0F, 0F); } public void renderAll() { compartimentCandel.render(0.625F); Base.render(0.625F); Shape3.render(0.625F); Shape4.render(0.625F); Shape5.render(0.625F); Shape6.render(0.625F); BaseTop.render(0.625F); Candel.render(0.625F); PoignerCoté1.render(0.625F); Shape10.render(0.625F); poignerTop.render(0.625F); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } }
-
La fonction getRenderType de ton block doit retourner l’id dans ton ClientProxy : tesrRenderId = RenderingRegistry.getNextAvailableRenderId();
Pour les ResourceLocation, c’est plus propre de faire new ResourceLocation(“tonModid”, “lienVersTaTexture”).
Je te conseille aussi d’utiliser ce script pour corriger ton model techne.
-
Ça ne résout pas mon problème
[20:12:41] [main/INFO] [GradleStart]: Extra: []
[20:12:41] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Family/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[20:12:41] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[20:12:41] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[20:12:41] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[20:12:41] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[20:12:41] [main/INFO] [FML]: Forge Mod Loader version 7.99.18.1452 for Minecraft 1.7.10 loading
[20:12:41] [main/INFO] [FML]: Java is Java HotSpot 64-Bit Server VM, version 1.8.0_45, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre1.8.0_45
[20:12:41] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[20:12:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[20:12:41] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
[20:12:41] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[20:12:41] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[20:12:41] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[20:12:41] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[20:12:41] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[20:12:41] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[20:12:41] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[20:12:42] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[20:12:49] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[20:12:49] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[20:12:49] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[20:12:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[20:12:51] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
[20:12:51] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
[20:12:51] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[20:12:54] [main/INFO]: Setting user: Player819
[20:12:57] [Client thread/INFO]: LWJGL Version: 2.9.1
[20:13:03] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: –-- Minecraft Crash Report ----
// Why did you do that?Time: 30/06/15 20:13
Description: Loading screen debug infoThis is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
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.8.0_45, Oracle Corporation
Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 940465424 bytes (896 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 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:
GL info: ’ Vendor: ‘Intel’ Version: ‘2.1.0 - Build 8.15.10.2302’ Renderer: ‘Mobile Intel 4 Series Express Chipset Family’
[20:13:03] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[20:13:03] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1452 Initialized
[20:13:03] [Client thread/INFO] [FML]: Replaced 183 ore recipies
[20:13:04] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[20:13:04] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[20:13:04] [Client thread/INFO] [FML]: Searching C:\Users\Family\Desktop\forge-1.7.10-10.13.4.1452-1.7.10-src\eclipse\mods for mods
[20:13:05] [Client thread/INFO] [FML]: Attempting to reparse the mod container bin
[20:13:11] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[20:13:12] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, modmechanicalcraft] at CLIENT
[20:13:12] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, modmechanicalcraft] at SERVER
[20:13:13] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:MechanicalCraft
[20:13:13] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[20:13:13] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
[20:13:13] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
[20:13:13] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[20:13:13] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[20:13:14] [Client thread/INFO] [FML]: Applying holder lookups
[20:13:14] [Client thread/INFO] [FML]: Holder lookups applied
[20:13:14] [Client thread/INFO] [FML]: Injecting itemstacks
[20:13:14] [Client thread/INFO] [FML]: Itemstack injection complete
[20:13:14] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[20:13:14] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
[20:13:14] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[20:13:14] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[20:13:18] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[20:13:18] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[20:13:18] [Sound Library Loader/INFO]: Sound engine started
[20:13:22] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[20:13:22] [Client thread/INFO]: Created: 512x256 textures/items-atlas
[20:13:22] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from INITIALIZATION to POSTINITIALIZATION. Loading cannot continue
[20:13:22] [Client thread/ERROR] [FML]:
States: ‘U’ = Unloaded ‘L’ = Loaded ‘C’ = Constructed ‘H’ = Pre-initialized ‘I’ = Initialized ‘J’ = Post-initialized ‘A’ = Available ‘D’ = Disabled ‘E’ = Errored
UCHI mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCHI FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1452-1.7.10.jar)
UCHI Forge{10.13.4.1452} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1452-1.7.10.jar)
UCHE modmechanicalcraft{1.0.0} [MechanicalCraft] (bin)
[20:13:22] [Client thread/ERROR] [FML]: The following problems were captured during this phase
[20:13:22] [Client thread/ERROR] [FML]: Caught exception from modmechanicalcraft
java.lang.ExceptionInInitializerError
at com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy.registerRender(ClientProxy.java:13) ~[bin/:?]
at com.google.SpyMan.Mechanicalcraft.common.mod_mechanicalcraft.init(mod_mechanicalcraft.java:704) ~[bin/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) ~[forgeSrc-1.7.10-10.13.4.1452-1.7.10.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[forgeSrc-1.7.10-10.13.4.1452-1.7.10.jar:?]
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[forgeSrc-1.7.10-10.13.4.1452-1.7.10.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737) [Loader.class:?]
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:597) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:942) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
at GradleStart.main(Unknown Source) [start/:?]
Caused by: java.lang.NullPointerException
at com.google.SpyMan.Mechanicalcraft.common.Lantern.ModelLantern.<init>(ModelLantern.java:32) ~[ModelLantern.class:?]
at com.google.SpyMan.Mechanicalcraft.common.Lantern.TileEntityLanternSpecialRenderer.<clinit>(TileEntityLanternSpecialRenderer.java:15) ~[TileEntityLanternSpecialRenderer.class:?]
… 41 more
[20:13:22] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ----
// Everything’s going to plan. No, really, that was supposed to happen.Time: 30/06/15 20:13
Description: There was a severe problem during mod loading that has caused the game to failcpw.mods.fml.common.LoaderException: java.lang.ExceptionInInitializerError
at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:739)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
at net.minecraft.client.Minecraft.run(Minecraft.java:942)
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)
Caused by: java.lang.ExceptionInInitializerError
at com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy.registerRender(ClientProxy.java:13)
at com.google.SpyMan.Mechanicalcraft.common.mod_mechanicalcraft.init(mod_mechanicalcraft.java:704)
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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
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:212)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
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:119)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
… 12 more
Caused by: java.lang.NullPointerException
at com.google.SpyMan.Mechanicalcraft.common.Lantern.ModelLantern.<init>(ModelLantern.java:32)
at com.google.SpyMan.Mechanicalcraft.common.Lantern.TileEntityLanternSpecialRenderer.<clinit>(TileEntityLanternSpecialRenderer.java:15)
… 41 moreA 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.8.0_45, Oracle Corporation
Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 886614440 bytes (845 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 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.99.99 Minecraft Forge 10.13.4.1452 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
UCHI mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCHI FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1452-1.7.10.jar)
UCHI Forge{10.13.4.1452} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1452-1.7.10.jar)
UCHE modmechanicalcraft{1.0.0} [MechanicalCraft] (bin)
GL info: ’ Vendor: ‘Intel’ Version: ‘2.1.0 - Build 8.15.10.2302’ Renderer: ‘Mobile Intel 4 Series Express Chipset Family’
[20:13:22] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Family\Desktop\forge-1.7.10-10.13.4.1452-1.7.10-src\eclipse.\crash-reports\crash-2015-06-30_20.13.22-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release</clinit></init></clinit></init> -
Renvoi ton code.
-
%(#ff3333)[TileEntityLanternSpecielRederer :]
package com.google.SpyMan.Mechanicalcraft.common.Lantern; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class TileEntityLanternSpecialRenderer extends TileEntitySpecialRenderer { @SideOnly(Side.CLIENT) public static ModelLantern modelLantern = new ModelLantern(); public static ResourceLocation texture = new ResourceLocation( "modmechanicalcraft:textures/models/blocks/Lantern.png"); public TileEntityLanternSpecialRenderer() { this.func_147497_a(TileEntityRendererDispatcher.instance); } private void renderTileEntityTileLanternAt(TileLantern tile, double x, double y, double z, float partialRenderTick) { GL11.glPushMatrix(); GL11.glTranslated(x, y, z); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); modelLantern.renderAll(); this.bindTexture(texture); GL11.glPopMatrix(); } public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialRenderTick) { this.renderTileEntityTileLanternAt((TileLantern) tile, x, y, z, partialRenderTick); } }
%(#ff3333)[BlockLantern :]
package com.google.SpyMan.Mechanicalcraft.common.Lantern; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy; import com.google.SpyMan.Mechanicalcraft.common.*; import com.google.SpyMan.Mechanicalcraft.common.Lantern.*; public class Lantern extends Block { public Lantern(Material material) { super(material); setResistance(3.0F); setLightLevel(20.0F); } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } public int getRenderType() { return ClientProxy.tesrRenderId; } public TileEntity createNewTileEntity(World world, int metadata) { return new TileLantern(); } public boolean hasTileEntity(int metadata) { return true; } }
%(#ff3333)[ClientProxy :]
package com.google.SpyMan.Mechanicalcraft.proxy; import com.google.SpyMan.Mechanicalcraft.common.Lantern.TileEntityLanternSpecialRenderer; import com.google.SpyMan.Mechanicalcraft.common.Lantern.TileLantern; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends CommonProxy { public static int tesrRenderId; @Override public void registerRender() { ClientRegistry.bindTileEntitySpecialRenderer(TileLantern.class, new TileEntityLanternSpecialRenderer()); tesrRenderId = RenderingRegistry.getNextAvailableRenderId(); } }
-
Caused by: java.lang.NullPointerException
at com.google.SpyMan.Mechanicalcraft.common.Lantern.ModelLantern.<init>(ModelLantern.java:32)
at com.google.SpyMan.Mechanicalcraft.common.Lantern.TileEntityLanternSpecialRenderer.<clinit>(TileEntityLanternSpecialRenderer.java:15)
… 41 moreTu as un npe dans ton modèle ligne 32.</clinit></init>
-
a la ligne 32 c’est
this.base.mirror = true;
je suis sensé supprimer cette ligne ?
-
Tu peux utiliser le correcteur de SCAREX pour les modèles : http://www.scarex.fr/model_corrector.php
-
je lai déjà fait, et même si je suppr la ligne le jeu crash.
-
Vérifie que tout les <nom du=“” morceau=“”>.mirror se trouve bien après la ligne <nom du=“” morceau=“”>= new ModelRenderer(this, valeur, valeur);
D’ailleurs évite aussi les accents dans les noms de ces morceaux.</nom></nom> -
je lai fait mais çà ne change rien
-
Renvoi code + crash report alors.
-
prend le code que j’ai deja mit il na pas changé
-
Le NPE était à une ligne que tu as supprimé, donc je ne peux pas deviner ce que tu as mis à la place. Et le crash report ?
-
%(#ff3333)[TileEntityRendererSpecial]
package com.google.SpyMan.Mechanicalcraft.common.Lantern; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class TileEntityLanternSpecialRenderer extends TileEntitySpecialRenderer { @SideOnly(Side.CLIENT) public static ModelLantern modelLantern = new ModelLantern(); public static ResourceLocation texture = new ResourceLocation( "modmechanicalcraft:textures/models/blocks/Lantern.png"); public TileEntityLanternSpecialRenderer() { this.func_147497_a(TileEntityRendererDispatcher.instance); } private void renderTileEntityTileLanternAt(TileLantern tile, double x, double y, double z, float partialRenderTick) { GL11.glPushMatrix(); GL11.glTranslated(x, y, z); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); modelLantern.renderAll(); this.bindTexture(texture); GL11.glPopMatrix(); } public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialRenderTick) { this.renderTileEntityTileLanternAt((TileLantern) tile, x, y, z, partialRenderTick); } }
%(#ff3333)[Block :]
package com.google.SpyMan.Mechanicalcraft.common.Lantern; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy; import com.google.SpyMan.Mechanicalcraft.common.*; import com.google.SpyMan.Mechanicalcraft.common.Lantern.*; public class Lantern extends Block { public Lantern(Material material) { super(material); setResistance(3.0F); setLightLevel(20.0F); } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } public int getRenderType() { return ClientProxy.tesrRenderId; } public TileEntity createNewTileEntity(World world, int metadata) { return new TileLantern(); } public boolean hasTileEntity(int metadata) { return true; } }
%(#ff3333)[Model:]
package com.google.SpyMan.Mechanicalcraft.common.Lantern; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelLantern extends ModelBase { ModelRenderer compartimentCandel; ModelRenderer Base; ModelRenderer Shape3; ModelRenderer Shape4; ModelRenderer Shape5; ModelRenderer Shape6; ModelRenderer BaseTop; ModelRenderer Candel; ModelRenderer PoignerCoté1; ModelRenderer Shape10; ModelRenderer poignerTop; public ModelLantern() { textureWidth = 64; textureHeight = 32; compartimentCandel = new ModelRenderer(this, 25, 12); compartimentCandel.addBox(0F, 0F, 0F, 6, 8, 6); compartimentCandel.setRotationPoint(-3F, 15F, -3F); compartimentCandel.setTextureSize(64, 32); compartimentCandel.mirror = true; setRotation(compartimentCandel, 0F, 0F, 0F); Base = new ModelRenderer(this, 0, 0); Base.mirror = false; Base.addBox(0F, 0F, 0F, 8, 1, 8); Base.setRotationPoint(-4F, 23F, -4F); Base.setTextureSize(64, 32); setRotation(Base, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 8, 17); Shape5.mirror = false; Shape3.addBox(0F, 0F, 0F, 1, 8, 1); Shape3.setRotationPoint(-4F, 15F, 3F); Shape3.setTextureSize(64, 32); setRotation(Shape3, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 8, 17); Shape4.mirror = false; Shape4.addBox(0F, 0F, 0F, 1, 8, 1); Shape4.setRotationPoint(-4F, 15F, -4F); Shape4.setTextureSize(64, 32); setRotation(Shape4, 0F, 0F, 0F); Shape5 = new ModelRenderer(this, 8, 17); Shape5.mirror = false; Shape5.addBox(0F, 0F, 0F, 1, 8, 1); Shape5.setRotationPoint(3F, 15F, -4F); Shape5.setTextureSize(64, 32); setRotation(Shape5, 0F, 0F, 0F); Shape6 = new ModelRenderer(this, 8, 17); Shape6.mirror = false; Shape6.addBox(0F, 0F, 0F, 1, 8, 1); Shape6.setRotationPoint(3F, 15F, 3F); Shape6.setTextureSize(64, 32); setRotation(Shape6, 0F, 0F, 0F); BaseTop = new ModelRenderer(this, 32, 0); BaseTop.mirror = false; BaseTop.addBox(0F, 0F, 0F, 8, 1, 8); BaseTop.setRotationPoint(-4F, 14F, -4F); BaseTop.setTextureSize(64, 32); setRotation(BaseTop, 0F, 0F, 0F); Candel = new ModelRenderer(this, 15, 17); Candel.mirror = false; Candel.addBox(0F, 0F, 0F, 2, 5, 2); Candel.setRotationPoint(-1F, 18F, -1F); Candel.setTextureSize(64, 32); setRotation(Candel, 0F, 0F, 0F); PoignerCoté1 = new ModelRenderer(this, 0, 10); PoignerCoté1.mirror = false; PoignerCoté1.addBox(0F, 0F, 0F, 1, 2, 2); PoignerCoté1.setRotationPoint(-3F, 12F, -1F); PoignerCoté1.setTextureSize(64, 32); setRotation(PoignerCoté1, 0F, 0F, 0F); Shape10 = new ModelRenderer(this, 0, 10); Shape10.mirror = false; Shape10.addBox(0F, 0F, 0F, 1, 2, 2); Shape10.setRotationPoint(2F, 12F, -1F); Shape10.setTextureSize(64, 32); setRotation(Shape10, 0F, 0F, 0F); poignerTop = new ModelRenderer(this, 7, 10); poignerTop.mirror = false; poignerTop.addBox(0F, 0F, 0F, 4, 1, 2); poignerTop.setRotationPoint(-2F, 11F, -1F); poignerTop.setTextureSize(64, 32); setRotation(poignerTop, 0F, 0F, 0F); } public void renderAll() { compartimentCandel.render(0.0625F); Base.render(0.0625F); Shape3.render(0.0625F); Shape4.render(0.0625F); Shape5.render(0.0625F); Shape6.render(0.0625F); BaseTop.render(0.0625F); Candel.render(0.0625F); PoignerCoté1.render(0.0625F); Shape10.render(0.0625F); poignerTop.render(0.0625F); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } }
%(#ff3333)[ClientProxy :]
package com.google.SpyMan.Mechanicalcraft.proxy; import com.google.SpyMan.Mechanicalcraft.common.Lantern.TileEntityLanternSpecialRenderer; import com.google.SpyMan.Mechanicalcraft.common.Lantern.TileLantern; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends CommonProxy { public static int tesrRenderId; @Override public void registerRender() { ClientRegistry.bindTileEntitySpecialRenderer(TileLantern.class, new TileEntityLanternSpecialRenderer()); tesrRenderId = RenderingRegistry.getNextAvailableRenderId(); } }
-
%(#33cc33)[Crash Report :]
%(#333333)[[22:58:37] [main/INFO] [GradleStart]: Extra: []
]
%(#333333)[[22:58:37] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Family/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]]
%(#333333)[[22:58:37] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker]
%(#333333)[[22:58:37] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker]
%(#333333)[[22:58:37] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker]
%(#333333)[[22:58:37] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker]
%(#333333)[[22:58:37] [main/INFO] [FML]: Forge Mod Loader version 7.99.18.1452 for Minecraft 1.7.10 loading]
%(#333333)[[22:58:37] [main/INFO] [FML]: Java is Java HotSpot 64-Bit Server VM, version 1.8.0_45, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre1.8.0_45]
%(#333333)[[22:58:37] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation]
%(#333333)[[22:58:37] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker]
%(#333333)[[22:58:37] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin]
%(#333333)[[22:58:37] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin]
%(#333333)[[22:58:37] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker]
%(#333333)[[22:58:37] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker]
%(#333333)[[22:58:37] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker]
%(#333333)[[22:58:37] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker]
%(#333333)[[22:58:37] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker]
%(#333333)[[22:58:37] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper]
%(#333333)[[22:58:38] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!]
%(#333333)[[22:58:44] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing]
%(#333333)[[22:58:44] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper]
%(#333333)[[22:58:44] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker]
%(#333333)[[22:58:46] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker]
%(#333333)[[22:58:46] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker]
%(#333333)[[22:58:46] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker]
%(#333333)[[22:58:46] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}]
%(#333333)[[22:58:49] [main/INFO]: Setting user: Player836]
%(#333333)[[22:58:56] [Client thread/INFO]: LWJGL Version: 2.9.1]
%(#333333)[[22:59:01] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: –-- Minecraft Crash Report ----]
%(#333333)[// I blame Dinnerbone.]%(#333333)
-
“Shape5” alors que çà devrait être Shape3, vérifie tout ton fichier, il peut y avoir d’autres erreurs comme celle là
-
PoignerCoté1 = new ModelRenderer(this, 0, 10);
Tu n’as toujours pas viré les accents. -
J’ai corrigé les erreurs mais j’ai toujours pas de model qui est appliqué a mon block
-
tu as mis le bindTexture après le rendu du model.