Rendu d'item avec un model techne
-
#RTSiT’esTriste
-
Ce qui serai bien ce serait de n’utiliser que les Tesselator comme Minecraft fait.
-
Bientôt, on va devoir faire un .json à la place de la classe Render ! (fake bien sûr, je ne fais qu’utiliser mon talent d’exagérateur)
-
C’est exactement pourquoi je n’utillise pas la 1.8.
-
@‘DiabolicaTrix’:
C’est exactement pourquoi je n’utillise pas la 1.8.
Pourtant, un jour, tu y seras confronté.
-
Y’a pas une version 1.7.10 ?
-
Non, mais c’est un peu prêt identique en 1.7.10.
-
j’ai un petit soucis ici
GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.func_110577_a(texture); model.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break;
la fonction func_110577_a() n’existe pas en 1.7.10
-
Ça doit étre bind() ou bindTexture()
-
Merci je n’étais pas sur
EDIT: c’est quoi ducoup pour enregistrer le render dans le client proxy ?
-
Merci je n’étais pas sur
EDIT: c’est quoi ducoup pour enregistrer le render dans le client proxy ?
-
Pas sur mais au lieu de MinecraftForgeClient ça doit etre RenderingRegistry
-
ca ne doit pas etre RenderingRegistry… je vois pas de method approprié
-
ça n’a pas changé, c’est toujours MinecraftForgeClient.registerItemRenderer(item, instance du rendu);
-
J’ai un NPE à la ligne 130 de mon model 3D
[23:50:55] [Client thread/ERROR] [FML]: An error occured trying to load a proxy into {serverSide=com.google.SpyMan.Mechanicalcraft.proxy.CommonProxy, clientSide=com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy}.com.google.SpyMan.Mechanicalcraft.common.MechanicalCraft java.lang.NullPointerException at com.google.SpyMan.Mechanicalcraft.common.items.itemsTools.chainsaw.ModelChainsaw.setRotation(ModelChainsaw.java:130) ~[ModelChainsaw.class:?] at com.google.SpyMan.Mechanicalcraft.common.items.itemsTools.chainsaw.ModelChainsaw.<init>(ModelChainsaw.java:93) ~[ModelChainsaw.class:?] at com.google.SpyMan.Mechanicalcraft.common.items.itemsTools.chainsaw.ChainsawItemRenderer.<init>(ChainsawItemRenderer.java:18) ~[ChainsawItemRenderer.class:?] at com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy.<init>(ClientProxy.java:12) ~[ClientProxy.class:?] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_66] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_66] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_66] at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_66] at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_66] at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:59) [ProxyInjector.class:?] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:512) [FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66] 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) [LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) [LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66] 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.loadMods(Loader.java:513) [Loader.class:?] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [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_66] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
[font=Source Code Pro Mediumpublic class ]ModelChainsaw extends %(#345f99)[ModelBase ]{ ModelRenderer Shape11%(#aaa9a7)[; ] ModelRenderer Shape2%(#aaa9a7)[; ] ModelRenderer Shape1%(#aaa9a7)[; ] ModelRenderer Shape3%(#aaa9a7)[; ] ModelRenderer Shape4%(#aaa9a7)[; ] ModelRenderer Shape51%(#aaa9a7)[; ] ModelRenderer Shape5%(#aaa9a7)[; ] ModelRenderer Shape61%(#aaa9a7)[; ] ModelRenderer Shape7%(#aaa9a7)[; ] ModelRenderer Shape6%(#aaa9a7)[; ] ModelRenderer Shape81%(#aaa9a7)[; ] ModelRenderer Shape8%(#aaa9a7)[; ] ModelRenderer Shape9%(#aaa9a7)[; ] public ModelChainsaw() { textureWidth = 64%(#aaa9a7)[; ] textureHeight = 32%(#aaa9a7)[; ] Shape1 = new ModelRenderer(this, 4, 0)%(#aaa9a7)[; ] Shape1.addBox(0F, 0F, 0F, 11, 1, 1)%(#aaa9a7)[; ] Shape1.setRotationPoint(-4F, 22F, 0F)%(#aaa9a7)[; ] Shape1.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape1.mirror = true%(#aaa9a7)[; ] setRotation(Shape1, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape2 = new ModelRenderer(this, 0, 0)%(#aaa9a7)[; ] Shape2.addBox(0F, 0F, 0F, 1, 3, 1)%(#aaa9a7)[; ] Shape2.setRotationPoint(7F, 19F, 0F)%(#aaa9a7)[; ] Shape2.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape2.mirror = true%(#aaa9a7)[; ] setRotation(Shape2, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape11 = new ModelRenderer(this, 4, 0)%(#aaa9a7)[; ] Shape11.addBox(0F, 0F, 0F, 11, 1, 1)%(#aaa9a7)[; ] Shape11.setRotationPoint(-4F, 18F, 0F)%(#aaa9a7)[; ] Shape11.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape11.mirror = true%(#aaa9a7)[; ] setRotation(Shape1, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape3 = new ModelRenderer(this, 0, 7)%(#aaa9a7)[; ] Shape3.addBox(0F, 0F, 0F, 11, 3, 1)%(#aaa9a7)[; ] Shape3.setRotationPoint(-4F, 19F, 0F)%(#aaa9a7)[; ] Shape3.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape3.mirror = true%(#aaa9a7)[; ] setRotation(Shape3, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape4 = new ModelRenderer(this, 0, 14)%(#aaa9a7)[; ] Shape4.addBox(0F, 0F, 0F, 7, 7, 5)%(#aaa9a7)[; ] Shape4.setRotationPoint(-11F, 17F, -2F)%(#aaa9a7)[; ] Shape4.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape4.mirror = true%(#aaa9a7)[; ] setRotation(Shape4, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape5 = new ModelRenderer(this, 0, 14)%(#aaa9a7)[; ] Shape5.addBox(1F, 3F, 0F, 7, 5, 1)%(#aaa9a7)[; ] Shape5.setRotationPoint(-12F, 15F, 3F)%(#aaa9a7)[; ] Shape5.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape5.mirror = true%(#aaa9a7)[; ] setRotation(Shape5, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape51 = new ModelRenderer(this, 0, 14)%(#aaa9a7)[; ] Shape51.addBox(0F, 0F, 0F, 7, 5, 1)%(#aaa9a7)[; ] Shape51.setRotationPoint(-11F, 18F, -3F)%(#aaa9a7)[; ] Shape51.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape51.mirror = true%(#aaa9a7)[; ] setRotation(Shape5, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape6 = new ModelRenderer(this, 25, 7)%(#aaa9a7)[; ] Shape6.addBox(0F, 0F, 0F, 1, 2, 1)%(#aaa9a7)[; ] Shape6.setRotationPoint(-8F, 15F, -2F)%(#aaa9a7)[; ] Shape6.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape6.mirror = true%(#aaa9a7)[; ] setRotation(Shape6, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape7 = new ModelRenderer(this, 25, 7)%(#aaa9a7)[; ] Shape7.addBox(0F, 0F, 0F, 1, 1, 3)%(#aaa9a7)[; ] Shape7.setRotationPoint(-8F, 14F, -1F)%(#aaa9a7)[; ] Shape7.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape7.mirror = true%(#aaa9a7)[; ] setRotation(Shape7, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape61 = new ModelRenderer(this, 25, 7)%(#aaa9a7)[; ] Shape61.addBox(0F, 0F, -1F, 1, 2, 1)%(#aaa9a7)[; ] Shape61.setRotationPoint(-8F, 15F, 3F)%(#aaa9a7)[; ] Shape61.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape61.mirror = true%(#aaa9a7)[; ] setRotation(Shape6, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape8 = new ModelRenderer(this, 25, 7)%(#aaa9a7)[; ] Shape8.addBox(0F, 0F, 0F, 2, 1, 1)%(#aaa9a7)[; ] Shape8.setRotationPoint(-13F, 17F, 0F)%(#aaa9a7)[; ] Shape8.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape8.mirror = true%(#aaa9a7)[; ] setRotation(Shape81, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape81 = new ModelRenderer(this, 25, 7)%(#aaa9a7)[; ] Shape81.addBox(0F, 0F, 0F, 2, 1, 1)%(#aaa9a7)[; ] Shape81.setRotationPoint(-13F, 23F, 0F)%(#aaa9a7)[; ] Shape81.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape81.mirror = true%(#aaa9a7)[; ] setRotation(Shape8, 0F, 0F, 0F)%(#aaa9a7)[; ] Shape9 = new ModelRenderer(this, 25, 7)%(#aaa9a7)[; ] Shape9.addBox(0F, 0F, 0F, 1, 5, 1)%(#aaa9a7)[; ] Shape9.setRotationPoint(-14F, 18F, 0F)%(#aaa9a7)[; ] Shape9.setTextureSize(64, 32)%(#aaa9a7)[; ] Shape9.mirror = true%(#aaa9a7)[; ] setRotation(Shape9, 0F, 0F, 0F)%(#aaa9a7)[; ] } public void render(Entity *entity*, float *f*, float *f1*, float *f2*, float *f3*, float *f4*, float *f5*) { super.render(*entity*, *f*, *f1*, *f2*, *f3*, *f4*, *f5*)%(#aaa9a7)[; ] setRotationAngles(*f*, *f1*, *f2*, *f3*, *f4*, *f5*, *entity*)%(#aaa9a7)[; ] Shape1.render(*f5*)%(#aaa9a7)[; ] Shape2.render(*f5*)%(#aaa9a7)[; ] Shape1.render(*f5*)%(#aaa9a7)[; ] Shape3.render(*f5*)%(#aaa9a7)[; ] Shape4.render(*f5*)%(#aaa9a7)[; ] Shape5.render(*f5*)%(#aaa9a7)[; ] Shape5.render(*f5*)%(#aaa9a7)[; ] Shape6.render(*f5*)%(#aaa9a7)[; ] Shape7.render(*f5*)%(#aaa9a7)[; ] Shape6.render(*f5*)%(#aaa9a7)[; ] Shape8.render(*f5*)%(#aaa9a7)[; ] Shape8.render(*f5*)%(#aaa9a7)[; ] Shape9.render(*f5*)%(#aaa9a7)[; ] } private void setRotation(ModelRenderer *model*, float *x*, float *y*, float *z*) { *model*.rotateAngleX = *x*%(#aaa9a7)[; ] *model*.rotateAngleY = *y*%(#aaa9a7)[; ] *model*.rotateAngleZ = *z*%(#aaa9a7)[; ] } public void setRotationAngles(float *f*, float *f1*, float *f2*, float *f3*, float *f4*, float *f5*, Entity *entity*) { super.setRotationAngles(*f*, *f1*, *f2*, *f3*, *f4*, *f5*, *entity*)%(#aaa9a7)[; ] } } ```</init></init></init>
-
T’essaye de rotate une shape qui as pas été définit,
Comme les lignes sont décalée,je vois pas laquelle, mais c’est à la ligne 93 -
Shape8 = new ModelRenderer(this, 25, 7); Shape8.addBox(0F, 0F, 0F, 2, 1, 1); Shape8.setRotationPoint(-13F, 17F, 0F); Shape8.setTextureSize(64, 32); Shape8.mirror = true; setRotation(Shape81, 0F, 0F, 0F); Shape81 = new ModelRenderer(this, 25, 7); Shape81.addBox(0F, 0F, 0F, 2, 1, 1); Shape81.setRotationPoint(-13F, 23F, 0F); Shape81.setTextureSize(64, 32); Shape81.mirror = true; setRotation(Shape8, 0F, 0F, 0F);
Shape8 et Shape81 sont inversé ici.