Texture dans TileEntityRender
-
Tu l’isole de la fonction .render
-
Ah oui merci !
désoler si j’ignore tout mais de quelle façon faire que j’affiche le shape X si un bloc est détecte a X endroit ?
je dois mettre un if je pense mais je sais pas trop comment sa marche -
Tu crees une condition pour chaque cas de figure possible ( si tel block de cable est derrière ou a la gauche….) et pour ce faire dans chacune conditions tu dois donc recuperer le block avec ses coordonnées tu as pour ce faire ce code if(world.getBlock(x + 1,y,z) ==[size=large this)]
Et pour le code a effectuer dans chacune condition c est ce que t as dit robin en haut
-
pour l’instant j’ai sa :
public void render(float f, World world, int x, int y, int z) { if(world.getBlock(x + 1,y,z) == Robotic.pipetest) { Shape1.render(f); return; } else { Shape4.render(f); return; } //Shape1.render(f); //Shape2.render(f); //Shape3.render(f); //Shape4.render(f); //Shape5.render(f); //Shape6.render(f); //Shape7.render(f); }
seul problème dans TileEntityPipeTestSpecialRender sa me donne une erreur
public void renderTileEntityBlockPipeTestAt(TileEntityBlockPipeTest 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(); }
a render ( en rouge ) et sa me dit :
quelqu’un sait pourquoi ? qu’est ce que j’ai mal fait
-
tu ajoute te.wordObj, (int)x, (int)y, (int)z
Sérieux, c’est de la programmation ça, il serait temps d’apprendre comment fonctionne java (voir n’importe quelle langage)
-
je vais m’y remettre a l’apprentissage de Java
par contre j’ai pas compris ou je dois l’ajouter
-
@‘Bowser338’:
je vais m’y remettre a l’apprentissage de Java
par contre j’ai pas compris ou je dois l’ajouter
Ce n’est pas compliqué la méthode render a juste 4 arguments : un float, un world, et 3 int. Ici dans ton code
[size=xx-small**this**][size=xx-small.][size=xx-smallmodel][size=xx-small.][size=xx-small*render]*[size=xx-small(][size=xx-small0.0625F][size=xx-small); ]
Tu as juste un float donc juste 1 argument sur 5.
Pour corriger il te faudrait plus ceci[size=xx-small**this**][size=xx-small.][size=xx-smallmodel][size=xx-small.][size=xx-small*render]*[size=xx-small(][size=xx-small0.0625F, te.wordObj, (int)x, (int)y, (int)z][size=xx-small); ]
Comme ceci
-
Ok par contre maintenant sa me dit qu’il me manque un truc dans TileEntity
public static final World wordObj = null;
j’ai rajouté sa mais sa doit pas etre égal a “null” ?
-
@‘Bowser338’:
Ok par contre maintenant sa me dit qu’il me manque un truc dans TileEntity
public static final World wordObj = null;
j’ai rajouté sa mais sa doit pas etre égal a “null” ?
nan plutôt worldObj avec un ’ l ’
et retire la ligne qui que tu as crée précédemment
-
oups non, tu n’es pas sensé créé une variable, elle devrait déjà existé sauf qu’elle s’appelle worldObj, pas wordObj (erreur de ma part).
-
@‘robin4002’:
oups non, tu n’es pas sensé créé une variable, elle devrait déjà existé sauf qu’elle s’appelle worldObj, pas wordObj (erreur de ma part).
Oui pareil j’ai fait copié collé de ton code ^^’
-
maintenant sa me met worldObj en bleu et sa me dit :
“The field TileEntity.worldObj is not visible”
sa me propose de mettre getWorldObj a la placeje comprends pas trop la
-
Oui mets getWorldObj()
-
Ok y a plus d’erreur par contre sa me met un NPE Rendering Item quand je vais dans l’inventaire et que sa devrait afficher le bloc
Edit : j’ai désactivé le rendu en main c’est sa qui faisait crash
Time: 29/10/14 20:52 Description: Rendering item java.lang.NullPointerException: Rendering item at com.bowser.robotic.proxy.TileEntityBlockPipeTestSpecialRender.renderTileEntityBlockPipeTestAt(TileEntityBlockPipeTestSpecialRender.java:50) at com.bowser.robotic.proxy.TileEntityBlockPipeTestSpecialRender.renderInventory(TileEntityBlockPipeTestSpecialRender.java:31) at com.bowser.robotic.proxy.TESRInventoryRenderer.renderInventoryBlock(TESRInventoryRenderer.java:54) at cpw.mods.fml.client.registry.RenderingRegistry.renderInventoryBlock(RenderingRegistry.java:125) at net.minecraft.src.FMLRenderAccessLibrary.renderInventoryBlock(FMLRenderAccessLibrary.java:59) at net.minecraft.client.renderer.RenderBlocks.renderBlockAsItem(RenderBlocks.java:8361) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:463) at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585) at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:287) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:114) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1056) at net.minecraft.client.Minecraft.run(Minecraft.java:951) 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 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 GradleStart.bounce(GradleStart.java:107) at GradleStart.startClient(GradleStart.java:100) at GradleStart.main(GradleStart.java:65) A detailed walkthrough of the error, its code path and all known details is as follows: –------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.bowser.robotic.proxy.TileEntityBlockPipeTestSpecialRender.renderTileEntityBlockPipeTestAt(TileEntityBlockPipeTestSpecialRender.java:50) at com.bowser.robotic.proxy.TileEntityBlockPipeTestSpecialRender.renderInventory(TileEntityBlockPipeTestSpecialRender.java:31) at com.bowser.robotic.proxy.TESRInventoryRenderer.renderInventoryBlock(TESRInventoryRenderer.java:54) at cpw.mods.fml.client.registry.RenderingRegistry.renderInventoryBlock(RenderingRegistry.java:125) at net.minecraft.src.FMLRenderAccessLibrary.renderInventoryBlock(FMLRenderAccessLibrary.java:59) at net.minecraft.client.renderer.RenderBlocks.renderBlockAsItem(RenderBlocks.java:8361) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:463) -- Item being rendered -- Details: Item Type: net.minecraft.item.ItemBlock@73bfc16e Item Aux: 0 Item NBT: null Item Foil: false Stacktrace: at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585) at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:287) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:114) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673) -- Screen render details -- Details: Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative Mouse location: Scaled: (262, 66). Absolute: (525, 347) Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Bowser338'/427, l='MpServer', x=-40,07, y=71,62, z=246,79]] Chunk stats: MultiplayerChunkCache: 546, 546 Level seed: 0 Level generator: ID 00 - default, ver 1\. Features enabled: false Level generator options: Level spawn location: World: (-48,64,244), Chunk: (at 0,4,4 in -3,15; contains blocks -48,0,240 to -33,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 473 game time, 473 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 106 total; [EntitySheep['Sheep'/258, l='MpServer', x=16,97, y=68,00, z=248,03], EntitySheep['Sheep'/259, l='MpServer', x=20,66, y=67,00, z=249,63], EntitySheep['Sheep'/257, l='MpServer', x=24,78, y=67,00, z=255,25], EntityCreeper['Creeper'/262, l='MpServer', x=23,00, y=36,00, z=284,50], EntityBat['Bat'/263, l='MpServer', x=27,35, y=35,20, z=281,67], EntitySheep['Sheep'/260, l='MpServer', x=23,16, y=67,00, z=249,19], EntityZombie['Zombie'/261, l='MpServer', x=22,50, y=35,00, z=286,50], EntitySquid['Squid'/266, l='MpServer', x=17,50, y=56,75, z=278,50], EntitySquid['Squid'/264, l='MpServer', x=18,50, y=57,00, z=285,13], EntitySquid['Squid'/265, l='MpServer', x=20,69, y=56,00, z=284,06], EntitySquid['Squid'/268, l='MpServer', x=19,50, y=56,22, z=289,88], EntityZombie['Zombie'/294, l='MpServer', x=38,31, y=27,00, z=288,41], EntitySkeleton['Skeleton'/620, l='MpServer', x=-95,50, y=52,00, z=208,50], EntitySkeleton['Skeleton'/85, l='MpServer', x=-119,28, y=15,17, z=221,09], EntitySkeleton['Skeleton'/84, l='MpServer', x=-116,59, y=14,00, z=211,91], EntityZombie['Zombie'/87, l='MpServer', x=-119,22, y=15,00, z=219,91], EntitySpider['Spider'/86, l='MpServer', x=-119,28, y=15,00, z=221,09], EntitySkeleton['Skeleton'/83, l='MpServer', x=-121,10, y=15,00, z=223,40], EntitySkeleton['Skeleton'/82, l='MpServer', x=-118,44, y=14,00, z=212,44], EntityZombie['Zombie'/92, l='MpServer', x=-117,34, y=45,00, z=295,99], EntityZombie['Zombie'/91, l='MpServer', x=-117,47, y=14,00, z=296,66], EntityZombie['Zombie'/90, l='MpServer', x=-117,50, y=15,00, z=299,50], EntitySquid['Squid'/102, l='MpServer', x=-97,06, y=59,00, z=203,22], EntitySquid['Squid'/103, l='MpServer', x=-95,50, y=59,00, z=205,50], EntitySquid['Squid'/100, l='MpServer', x=-100,50, y=60,34, z=202,50], EntitySquid['Squid'/101, l='MpServer', x=-98,25, y=61,38, z=198,91], EntitySkeleton['Skeleton'/98, l='MpServer', x=-102,44, y=29,00, z=192,96], EntityCreeper['Creeper'/99, l='MpServer', x=-103,00, y=28,00, z=199,41], EntityCreeper['Creeper'/97, l='MpServer', x=-96,38, y=26,00, z=175,03], EntityPig['Pig'/110, l='MpServer', x=-106,53, y=116,00, z=250,56], EntityPig['Pig'/111, l='MpServer', x=-111,47, y=112,00, z=248,53], EntityPig['Pig'/108, l='MpServer', x=-105,59, y=116,00, z=252,03], EntityPig['Pig'/109, l='MpServer', x=-105,50, y=117,00, z=254,50], EntitySquid['Squid'/106, l='MpServer', x=-97,69, y=59,00, z=204,84], EntitySquid['Squid'/107, l='MpServer', x=-97,81, y=60,31, z=208,50], EntitySquid['Squid'/104, l='MpServer', x=-105,50, y=60,38, z=211,13], EntitySquid['Squid'/105, l='MpServer', x=-95,50, y=62,34, z=209,50], EntityBat['Bat'/115, l='MpServer', x=-95,75, y=24,61, z=293,50], EntityBat['Bat'/114, l='MpServer', x=-106,92, y=25,00, z=288,35], EntityBat['Bat'/113, l='MpServer', x=-100,32, y=24,31, z=290,58], EntityCreeper['Creeper'/112, l='MpServer', x=-111,56, y=13,00, z=301,16], EntitySkeleton['Skeleton'/127, l='MpServer', x=-95,50, y=14,00, z=198,50], EntityCreeper['Creeper'/126, l='MpServer', x=-89,94, y=14,00, z=203,34], EntityEnderman['Enderman'/125, l='MpServer', x=-84,47, y=35,00, z=191,66], EntitySkeleton['Skeleton'/124, l='MpServer', x=-95,13, y=30,00, z=188,47], EntitySheep['Sheep'/136, l='MpServer', x=-82,66, y=66,10, z=171,56], EntityBat['Bat'/139, l='MpServer', x=-63,49, y=35,49, z=182,42], EntityBat['Bat'/138, l='MpServer', x=-66,25, y=33,40, z=179,63], EntityBat['Bat'/141, l='MpServer', x=-68,89, y=23,73, z=186,68], EntityWitch['Witch'/140, l='MpServer', x=-70,50, y=24,00, z=202,91], EntitySkeleton['Skeleton'/143, l='MpServer', x=-79,50, y=17,00, z=220,50], EntityBat['Bat'/142, l='MpServer', x=-65,42, y=19,40, z=193,55], EntityCreeper['Creeper'/128, l='MpServer', x=-89,50, y=37,00, z=260,50], EntityCreeper['Creeper'/134, l='MpServer', x=-69,44, y=23,00, z=174,06], EntitySheep['Sheep'/158, l='MpServer', x=-49,13, y=67,00, z=170,56], EntityZombie['Zombie'/159, l='MpServer', x=-51,47, y=34,00, z=178,94], EntityCreeper['Creeper'/144, l='MpServer', x=-65,53, y=27,00, z=212,72], EntityZombie['Zombie'/145, l='MpServer', x=-70,66, y=25,00, z=210,75], EntityCreeper['Creeper'/146, l='MpServer', x=-69,38, y=25,00, z=210,56], EntitySheep['Sheep'/171, l='MpServer', x=-32,50, y=68,00, z=190,84], EntitySheep['Sheep'/170, l='MpServer', x=-34,19, y=68,00, z=191,50], EntitySheep['Sheep'/169, l='MpServer', x=-38,50, y=67,00, z=181,09], EntitySheep['Sheep'/168, l='MpServer', x=-41,50, y=67,00, z=172,50], EntitySheep['Sheep'/175, l='MpServer', x=-33,03, y=65,00, z=278,09], EntityZombie['Zombie'/174, l='MpServer', x=-38,85, y=20,00, z=199,46], EntityZombie['Zombie'/173, l='MpServer', x=-40,69, y=19,00, z=201,47], EntityZombie['Zombie'/172, l='MpServer', x=-36,09, y=19,00, z=199,00], EntitySpider['Spider'/163, l='MpServer', x=-61,57, y=31,00, z=196,93], EntityCreeper['Creeper'/162, l='MpServer', x=-54,97, y=25,00, z=204,53], EntityBat['Bat'/161, l='MpServer', x=-63,41, y=35,83, z=182,08], EntityBat['Bat'/160, l='MpServer', x=-49,43, y=41,14, z=186,39], EntitySheep['Sheep'/167, l='MpServer', x=-41,22, y=67,00, z=168,22], EntityZombie['Zombie'/166, l='MpServer', x=-57,50, y=28,00, z=306,50], EntitySkeleton['Skeleton'/165, l='MpServer', x=-55,50, y=27,00, z=305,50], EntitySkeleton['Skeleton'/164, l='MpServer', x=-59,50, y=32,00, z=192,50], EntityCreeper['Creeper'/184, l='MpServer', x=-41,09, y=24,00, z=321,50], EntitySheep['Sheep'/190, l='MpServer', x=-24,22, y=69,00, z=220,47], EntitySheep['Sheep'/191, l='MpServer', x=-25,81, y=69,00, z=219,22], EntityClientPlayerMP['Bowser338'/427, l='MpServer', x=-40,07, y=71,62, z=246,79], EntitySheep['Sheep'/189, l='MpServer', x=-31,25, y=68,00, z=190,38], EntitySkeleton['Skeleton'/178, l='MpServer', x=-37,88, y=24,00, z=311,50], EntityItem['item.tile.doublePlant.syringa'/179, l='MpServer', x=-42,97, y=67,13, z=310,91], EntityCreeper['Creeper'/176, l='MpServer', x=-39,50, y=24,00, z=317,50], EntitySkeleton['Skeleton'/177, l='MpServer', x=-38,50, y=23,00, z=316,06], EntityCreeper['Creeper'/182, l='MpServer', x=-43,63, y=25,00, z=324,28], EntityCreeper['Creeper'/180, l='MpServer', x=-40,30, y=25,69, z=323,47], EntityCreeper['Creeper'/181, l='MpServer', x=-40,31, y=24,00, z=322,03], EntitySheep['Sheep'/207, l='MpServer', x=-8,22, y=69,00, z=258,50], EntitySheep['Sheep'/206, l='MpServer', x=-9,72, y=70,00, z=252,22], EntityHorse['Horse'/197, l='MpServer', x=-29,50, y=63,00, z=288,19], EntityHorse['Horse'/196, l='MpServer', x=-30,87, y=64,00, z=285,13], EntitySkeleton['Skeleton'/193, l='MpServer', x=-20,44, y=22,00, z=223,94], EntitySheep['Sheep'/192, l='MpServer', x=-26,69, y=69,00, z=217,25], EntitySheep['Sheep'/195, l='MpServer', x=-26,19, y=70,00, z=224,84], EntityCreeper['Creeper'/194, l='MpServer', x=-18,69, y=22,00, z=227,97], EntitySheep['Sheep'/208, l='MpServer', x=-9,47, y=69,00, z=258,47], EntitySheep['Sheep'/209, l='MpServer', x=-10,50, y=69,00, z=259,53], EntitySheep['Sheep'/210, l='MpServer', x=-0,78, y=66,00, z=298,28], EntitySheep['Sheep'/211, l='MpServer', x=-0,09, y=64,00, z=295,03], EntityCreeper['Creeper'/248, l='MpServer', x=17,28, y=13,00, z=308,91], EntitySheep['Sheep'/249, l='MpServer', x=3,84, y=67,00, z=307,44], EntitySheep['Sheep'/246, l='MpServer', x=7,88, y=64,00, z=300,53], EntitySheep['Sheep'/244, l='MpServer', x=12,45, y=73,75, z=235,47], EntitySheep['Sheep'/245, l='MpServer', x=10,53, y=70,00, z=245,53], EntitySheep['Sheep'/242, l='MpServer', x=7,47, y=70,00, z=244,84], EntitySheep['Sheep'/243, l='MpServer', x=9,47, y=70,00, z=245,53]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2555) at net.minecraft.client.Minecraft.run(Minecraft.java:973) 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 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 GradleStart.bounce(GradleStart.java:107) at GradleStart.startClient(GradleStart.java:100) at GradleStart.main(GradleStart.java:65) – System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 637041888 bytes (607 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP v9.05 FML v7.10.85.1231 Minecraft Forge 10.13.2.1231 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1231} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1231.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1231} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1231.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available roboticmod{1.0.0} [Robotic Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: GeForce GTX 770/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1) [20:52:54] [Server thread/INFO] [FML]: Holder lookups applied [20:52:54] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Alexandre\Desktop\Ressources\Robotic Mod\forge-1.7.10\eclipse\.\crash-reports\crash-2014-10-29_20.52.54-client.txt [20:52:54] [Client thread/INFO] [FML]: Waiting for the server to terminate/save. [20:52:54] [Client thread/INFO] [FML]: Server terminated.
En tout cas merci de votre patience
-
tile est null dans le cas du rendu dans l’inventaire, il faudrait que tu sépare la partie inventaire et monde.
-
Ok mais je pense me contenter d’une texture de tuyau par contre j’ai l’impression qu’il s’en fou completement de ma condition
ou plutot qu’il ne detecte jamais le bloc meme si il y en a un car il rends toujours le shape central -
Ok merci mais je pense que je vais me contenter d’une simple texture pour le tuyaux en main
Par contre sa n’a pas l’air de marcher l’affichage des differentes shapes il m’affiche toujours le shape central peut importe les bloc qu’il y a autour je viens de penser il ne faudrait pas actualiser le rendu pour qu’il prenne en compte l’ajout d’un autre bloc a coté ?
-
Non, le rendu TESR sont mit à jour à chaque tick, c’est écrit dans le tutoriel.
C’est sûrement tes conditions qui ne sont pas bonne. -
j’ai mis sa pour tester
public void render(float f, World world, int x, int y, int z) { if(world.getBlock(x,y-1,z) == Robotic.pipetest) { Shape1.render(f); } else { Shape4.render(f); }
-
shape4 c’est le centre ?
Perso j’aurai plutôt mit les conditions dans le rendu plutôt que dans le modèle.