Jump to content

[Solved][1.16.4] Tileentityrenderer doesnt render when export mod


Recommended Posts

Posted (edited)

In eclipse when I run the game my te renders correctly but when I export the mod it doesnt render idk why, the te is a fluid tank and when I righ click with a bucket filled with fluid the fluid goes up until it reaches limit and with empty bucket it goes down until is 0

here are some pictures of the problem

  • In eclipse

https://imgur.com/A8zRuIA

  • Exported mod

https://imgur.com/RZHaCc8

Can somebody tell me why it doesnt render?

Edited by tigres810
Posted (edited)
14 minutes ago, ChampionAsh5357 said:

Please supply the debug logs of both environments and the relevant repository in question.

Okay here is the log for eclipse

Eclipse log

and here is the log for minecraft

Minecraft log

and the repository is this one

https://github.com/tigres810/TestMod-1.16.4/blob/main/src/main/java/com/tigres810/testmod/tileentitys/renders/RenderFluidTankBlock.java

except for the error about the loot table that I already fixed I dont see anything strange in the logs

Edited by tigres810
Posted
5 minutes ago, ChampionAsh5357 said:

If the cauldron block renders correctly, would you mind removing the fluid tank @OnlyIn annotation? It shouldn't be used regardless.

Okay I removed that and its the same thing on eclipse it works and when export both my tank and cauldron doesnt render.

Btw idk why I had onlyin seems I forgot to remove it.

Posted

Can you verify if the built mod is actually binding the renderer to the tile entity? Can you also verify the render method of the fluid tank is actually being called? Finally, can you use the same Forge version in both environments? That last one shouldn't have an effect, but it removes possible variables from the equation.

Posted (edited)
19 hours ago, ChampionAsh5357 said:

Can you verify if the built mod is actually binding the renderer to the tile entity? Can you also verify the render method of the fluid tank is actually being called? Finally, can you use the same Forge version in both environments? That last one shouldn't have an effect, but it removes possible variables from the equation.

So from the log it seems is being binded and is calling it 

[02ene2021 23:24:15.645] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, tigres810, --version, 1.16.4-forge-35.1.13, --gameDir, C:\Users\tutor\AppData\Roaming\.minecraft, --assetsDir, C:\Users\tutor\AppData\Roaming\.minecraft\assets, --assetIndex, 1.16, --uuid, dd2440d8a84e4ec3bd4279876cfa68e8, --accessToken, ????????, --userType, mojang, --versionType, release, --launchTarget, fmlclient, --fml.forgeVersion, 35.1.13, --fml.mcVersion, 1.16.4, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20201102.104115]
[02ene2021 23:24:15.649] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 8.0.6+85+master.325de55 starting: java version 1.8.0_51 by Oracle Corporation
[02ene2021 23:24:15.661] [main/WARN] [cpw.mods.modlauncher.SecureJarHandler/]: LEGACY JDK DETECTED, SECURED JAR HANDLING DISABLED
[02ene2021 23:24:15.969] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
[02ene2021 23:24:16.015] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/C:/Users/tutor/AppData/Roaming/.minecraft/libraries/org/spongepowered/mixin/0.8.2/mixin-0.8.2.jar Service=ModLauncher Env=CLIENT
[02ene2021 23:24:17.531] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlclient' with arguments [--version, 1.16.4-forge-35.1.13, --gameDir, C:\Users\tutor\AppData\Roaming\.minecraft, --assetsDir, C:\Users\tutor\AppData\Roaming\.minecraft\assets, --uuid, dd2440d8a84e4ec3bd4279876cfa68e8, --username, tigres810, --assetIndex, 1.16, --accessToken, ????????, --userType, mojang, --versionType, release]
[02ene2021 23:24:23.820] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[02ene2021 23:24:24.739] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: tigres810
[02ene2021 23:24:24.875] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.2.2 build 10
[02ene2021 23:24:25.680] [modloading-worker-9/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Forge mod loading, version 35.1.13, for MC 1.16.4 with MCP 20201102.104115
[02ene2021 23:24:25.680] [modloading-worker-9/INFO] [net.minecraftforge.common.MinecraftForge/FORGE]: MinecraftForge v35.1.13 Initialized
[02ene2021 23:24:30.081] [Render thread/ERROR] [net.minecraft.util.Util/]: No data fixer registered for flame
[02ene2021 23:24:30.081] [Render thread/ERROR] [net.minecraft.util.Util/]: No data fixer registered for robit
[02ene2021 23:24:30.081] [Render thread/ERROR] [net.minecraft.util.Util/]: No data fixer registered for baby_creeper
[02ene2021 23:24:30.082] [Render thread/ERROR] [net.minecraft.util.Util/]: No data fixer registered for baby_enderman
[02ene2021 23:24:30.082] [Render thread/ERROR] [net.minecraft.util.Util/]: No data fixer registered for baby_skeleton
[02ene2021 23:24:30.082] [Render thread/ERROR] [net.minecraft.util.Util/]: No data fixer registered for baby_stray
[02ene2021 23:24:30.082] [Render thread/ERROR] [net.minecraft.util.Util/]: No data fixer registered for baby_wither_skeleton
[02ene2021 23:24:30.082] [Render thread/ERROR] [net.minecraft.util.Util/]: No data fixer registered for balloon
[02ene2021 23:24:30.083] [Render thread/ERROR] [net.minecraft.util.Util/]: No data fixer registered for obsidian_tnt
[02ene2021 23:24:31.804] [Render thread/INFO] [com.mojang.text2speech.NarratorWindows/]: Narrator library for x64 successfully loaded
[02ene2021 23:24:31.864] [Render thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: Default, Mod Resources
[02ene2021 23:24:32.147] [Worker-Main-8/INFO] [Mekanism/]: Loaded 'Mekanism: Tools' module.
[02ene2021 23:24:32.183] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Starting version check at https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[02ene2021 23:24:32.200] [Worker-Main-12/INFO] [Mekanism/]: Version 10.0.18 initializing...
[02ene2021 23:24:32.302] [Worker-Main-9/INFO] [Mekanism/]: Loaded 'Mekanism: Additions' module.
[02ene2021 23:24:32.335] [Worker-Main-9/INFO] [Mekanism/]: Loaded 'Mekanism Generators' module.
[02ene2021 23:24:32.440] [Worker-Main-12/INFO] [Mekanism/]: Fake player readout: UUID = 46e82cd0-d480-3d48-800a-77431ede078e, name = [Mekanism]
[02ene2021 23:24:32.440] [Worker-Main-12/INFO] [Mekanism/]: Loading complete.
[02ene2021 23:24:32.457] [Worker-Main-12/INFO] [Mekanism/]: Mod loaded.
[02ene2021 23:24:32.708] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Found status: OUTDATED Current: 35.1.13 Target: 35.1.28
[02ene2021 23:24:32.708] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [tmod] Starting version check at http://myurl.me/
[02ene2021 23:24:33.031] [Forge Version Check/WARN] [net.minecraftforge.fml.VersionChecker/]: Failed to process update information
java.io.IOException: Server returned HTTP response code: 403 for URL: http://myurl.me/
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_51]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_51]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_51]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_51]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1889) ~[?:1.8.0_51]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1884) ~[?:1.8.0_51]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_51]
	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1883) ~[?:1.8.0_51]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1456) ~[?:1.8.0_51]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440) ~[?:1.8.0_51]
	at net.minecraftforge.fml.VersionChecker$1.openUrlStream(VersionChecker.java:171) ~[?:?]
	at net.minecraftforge.fml.VersionChecker$1.process(VersionChecker.java:187) [?:?]
	at net.minecraftforge.fml.VersionChecker$1$$Lambda$5081/516956475.accept(Unknown Source) [?:?]
	at java.lang.Iterable.forEach(Iterable.java:75) [?:1.8.0_51]
	at net.minecraftforge.fml.VersionChecker$1.run(VersionChecker.java:139) [?:?]
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://myurl.me/
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1839) ~[?:1.8.0_51]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440) ~[?:1.8.0_51]
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[?:1.8.0_51]
	at net.minecraftforge.fml.VersionChecker$1.openUrlStream(VersionChecker.java:155) ~[?:?]
	... 4 more
[02ene2021 23:24:33.051] [Worker-Main-11/INFO] [com.tigres810.testmod.Test/]: Binding tile entity's
[02ene2021 23:24:33.184] [Worker-Main-11/INFO] [com.tigres810.testmod.Test/]: Tile entity's binded.
[02ene2021 23:24:33.230] [Worker-Main-8/INFO] [Mekanism/]: Initialized HolidayManager.
[02ene2021 23:24:36.448] [Worker-Main-9/ERROR] [net.minecraft.client.renderer.texture.AtlasTexture/]: Using missing texture, unable to load minecraft:textures/block/concrete_powder_gray.png : java.io.FileNotFoundException: minecraft:textures/block/concrete_powder_gray.png
[02ene2021 23:24:36.535] [Worker-Main-13/ERROR] [net.minecraft.client.renderer.texture.AtlasTexture/]: Using missing texture, unable to load tmod:textures/blocks/flux_fluid.png : java.io.FileNotFoundException: tmod:textures/blocks/flux_fluid.png
[02ene2021 23:24:36.656] [Worker-Main-11/ERROR] [net.minecraft.client.renderer.texture.AtlasTexture/]: Using missing texture, unable to load tmod:textures/block/flux_fluid_overlay.png : java.io.FileNotFoundException: tmod:textures/block/flux_fluid_overlay.png
[02ene2021 23:24:39.152] [Render thread/INFO] [net.minecraft.client.audio.SoundSystem/]: OpenAL initialized.
[02ene2021 23:24:39.153] [Render thread/INFO] [net.minecraft.client.audio.SoundEngine/SOUNDS]: Sound engine started
[02ene2021 23:24:39.432] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 2048x1024x4 minecraft:textures/atlas/blocks.png-atlas
[02ene2021 23:24:39.486] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas
[02ene2021 23:24:39.487] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[02ene2021 23:24:39.488] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[02ene2021 23:24:39.489] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[02ene2021 23:24:39.490] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[02ene2021 23:24:39.490] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[02ene2021 23:24:40.486] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
[02ene2021 23:24:40.487] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
[02ene2021 23:24:40.488] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[02ene2021 23:24:49.101] [Render thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[02ene2021 23:24:49.102] [Render thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[02ene2021 23:24:49.103] [Render thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[02ene2021 23:24:49.104] [Render thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[02ene2021 23:24:49.105] [Render thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[02ene2021 23:24:49.109] [Render thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: Default, Mekanism-1.16.4-10.0.18.445.jar, forge-1.16.4-35.1.13-universal.jar, TestMod-1.16.4-1.0.jar, MekanismTools-1.16.4-10.0.18.445.jar, MekanismAdditions-1.16.4-10.0.18.445.jar, MekanismGenerators-1.16.4-10.0.18.445.jar
[02ene2021 23:24:50.227] [Render thread/INFO] [net.minecraft.item.crafting.RecipeManager/]: Loaded 30 recipes
[02ene2021 23:24:50.739] [Render thread/INFO] [net.minecraft.advancements.AdvancementList/]: Loaded 927 advancements
[02ene2021 23:24:52.440] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[02ene2021 23:24:52.480] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Starting integrated minecraft server version 1.16.4
[02ene2021 23:24:52.481] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Generating keypair
[02ene2021 23:24:52.768] [Server thread/INFO] [Mekanism ChunkManager/]: Loading 0 chunks for dimension minecraft:overworld
[02ene2021 23:24:52.775] [Server thread/INFO] [Mekanism ChunkManager/]: Loading 0 chunks for dimension minecraft:the_nether
[02ene2021 23:24:52.786] [Server thread/INFO] [Mekanism ChunkManager/]: Loading 0 chunks for dimension minecraft:the_end
[02ene2021 23:24:52.790] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing start region for dimension minecraft:overworld
[02ene2021 23:24:53.519] [Render thread/INFO] [net.minecraft.world.chunk.listener.LoggingChunkStatusListener/]: Preparando zona de aparición: 0 %
[02ene2021 23:24:53.519] [Render thread/INFO] [net.minecraft.world.chunk.listener.LoggingChunkStatusListener/]: Preparando zona de aparición: 0 %
[02ene2021 23:24:53.850] [Render thread/INFO] [net.minecraft.world.chunk.listener.LoggingChunkStatusListener/]: Time elapsed: 1032 ms
[02ene2021 23:24:54.146] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Changing view distance to 29, from 10
[02ene2021 23:24:56.305] [Netty Local Client IO #0/INFO] [net.minecraftforge.fml.network.NetworkHooks/]: Connected to a modded server.
[02ene2021 23:24:56.369] [Server thread/INFO] [net.minecraftforge.common.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.advancements.PlayerAdvancements@67b628a2
[02ene2021 23:24:56.393] [Server thread/INFO] [net.minecraft.server.management.PlayerList/]: tigres810[local:E:6d2b7668] logged in with entity id 141 at (5.699999988079071, 63.0, 124.61776617326284)
[02ene2021 23:24:56.423] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: tigres810 se ha unido a la partida
[02ene2021 23:24:56.857] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Saving and pausing game...
[02ene2021 23:24:56.884] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[Test mod]'/minecraft:overworld
[02ene2021 23:24:57.223] [Render thread/INFO] [net.minecraft.advancements.AdvancementList/]: Loaded 60 advancements
[02ene2021 23:24:57.330] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[Test mod]'/minecraft:the_nether
[02ene2021 23:24:57.331] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[Test mod]'/minecraft:the_end
[02ene2021 23:24:58.001] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.002] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:58.307] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.307] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:58.439] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.440] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:58.509] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.509] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:58.569] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.569] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:58.611] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.612] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:58.660] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.660] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:58.763] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.764] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:58.837] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.838] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:58.905] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.905] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:58.951] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.952] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:58.990] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:58.991] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.045] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.045] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.097] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.098] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.156] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.156] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.222] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.222] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.290] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.291] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.355] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.355] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.422] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.422] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.488] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.488] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.556] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.556] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.622] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.623] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.694] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.694] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.840] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.840] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.904] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.904] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:24:59.971] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:24:59.971] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.011] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.012] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.085] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.086] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.133] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.134] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.174] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.174] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.225] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.225] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.282] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.283] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.347] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.347] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.389] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.390] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.441] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.441] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.500] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.500] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.556] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.556] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.615] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.615] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.658] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.658] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.731] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.731] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.776] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.776] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.830] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.830] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.889] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:00.889] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:00.893] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Saving and pausing game...
[02ene2021 23:25:00.905] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[Test mod]'/minecraft:overworld
[02ene2021 23:25:01.041] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.041] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.091] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.092] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.130] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.130] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.170] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.170] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.200] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.200] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.239] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.239] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.291] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.291] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.335] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.335] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.368] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.368] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.386] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[Test mod]'/minecraft:the_nether
[02ene2021 23:25:01.387] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[Test mod]'/minecraft:the_end
[02ene2021 23:25:01.400] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.400] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.431] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.432] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.474] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.474] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.519] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.520] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.553] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.553] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.581] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.581] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.631] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.631] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.685] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.686] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.729] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.729] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.791] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.791] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.866] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.866] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.922] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.922] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:01.969] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:01.969] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.004] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.004] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.047] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.047] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.080] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.081] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.114] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.115] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.156] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.156] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.200] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.200] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.237] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.238] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.284] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.284] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.326] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.327] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.364] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.365] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.400] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.400] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.426] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.427] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.459] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.459] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.499] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.499] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.534] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.534] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.568] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.568] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.602] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.602] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.636] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.636] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.756] [Render thread/INFO] [com.tigres810.testmod.Test/]: Trying to render in fluidtank
[02ene2021 23:25:02.756] [Render thread/INFO] [com.tigres810.testmod.Test/]: Rendering in fluidtankblock...
[02ene2021 23:25:02.784] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Stopping!
[02ene2021 23:25:02.866] [Server thread/INFO] [net.minecraft.network.play.ServerPlayNetHandler/]: tigres810 lost connection: Desconectado
[02ene2021 23:25:02.866] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: tigres810 ha abandonado la partida
[02ene2021 23:25:02.884] [Server thread/INFO] [net.minecraft.network.play.ServerPlayNetHandler/]: Stopping singleplayer server as player logged out
[02ene2021 23:25:02.920] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Stopping server
[02ene2021 23:25:02.920] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving players
[02ene2021 23:25:02.921] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving worlds
[02ene2021 23:25:02.921] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[Test mod]'/minecraft:overworld
[02ene2021 23:25:04.582] [Server thread/INFO] [net.minecraft.world.server.ChunkManager/]: ThreadedAnvilChunkStorage (Test mod): All chunks are saved
[02ene2021 23:25:04.583] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[Test mod]'/minecraft:the_nether
[02ene2021 23:25:04.583] [Server thread/INFO] [net.minecraft.world.server.ChunkManager/]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[02ene2021 23:25:04.584] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[Test mod]'/minecraft:the_end
[02ene2021 23:25:04.584] [Server thread/INFO] [net.minecraft.world.server.ChunkManager/]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[02ene2021 23:25:04.618] [Server thread/INFO] [net.minecraft.world.server.ChunkManager/]: ThreadedAnvilChunkStorage (Test mod): All chunks are saved
[02ene2021 23:25:04.625] [Server thread/INFO] [net.minecraft.world.server.ChunkManager/]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[02ene2021 23:25:04.625] [Server thread/INFO] [net.minecraft.world.server.ChunkManager/]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved

I also changed the forge version but is the same thing it doesnt render

Edited by tigres810
Posted (edited)
23 hours ago, ChampionAsh5357 said:

Hmm, this is quite strange. However, I cannot reproduce the error:2021-01-02_18_37_41.thumb.png.2068ee0e998296d6698b786f44dca2f7.png

It could be that the fluid is not synched with the player? If is that so how I synch it do I need a packet or how I do it?

I remembered that I had similar issue in 1.12 but that used energy so idk how to synch fluid

Edited by tigres810
Posted
41 minutes ago, tigres810 said:

It could be that the fluid is not synched with the player? If is that so how I synch it do I need a packet or how I do it?

If the fluid was not synced across logical sides, then it would not appear in the picture I sent. It also updated as normal on both sides, so afaik there was no desynchronization. As such, I don't think its the issue. Can you describe the exact process done to the jar from being built using `gradlew build` to opening within the vanilla launcher?

Posted
31 minutes ago, ChampionAsh5357 said:

If the fluid was not synced across logical sides, then it would not appear in the picture I sent. It also updated as normal on both sides, so afaik there was no desynchronization. As such, I don't think its the issue. Can you describe the exact process done to the jar from being built using `gradlew build` to opening within the vanilla launcher?

So I have a .bat file with @echo on
gradlew build then another .bat with 

@echo on
SET var=%cd%
SET version="1.0"
IF exist %var%\build\libs\modid-1.0.jar (
  ren "%var%\build\libs\modid-1.0.jar" "TestMod-1.16.4-%version%.jar"
  cd %var%\build\libs\
  start .
 ) ELSE (
 echo "No se encontro el archivo especificado."
)

to rename the jar I cut the jar to minecraft mods and I open minecraft with forge 35.1.13 after minecraft has loaded I enter a test world I made and there it doesnt render no matter I add fluid or remove it

Posted (edited)
On 1/4/2021 at 4:05 AM, ChampionAsh5357 said:

Since I can't reproduce the error, I have relatively no clue what it could be. Apologies.

I fixed it! here the code 

package com.tigres810.testmod.tileentitys.renders;

import java.awt.Color;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.tigres810.testmod.tileentitys.TileFluidTankBlock;

import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.vector.Matrix3f;
import net.minecraft.util.math.vector.Matrix4f;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.math.vector.Vector3f;
import net.minecraftforge.fluids.FluidStack;

public class RenderFluidTankBlock extends TileEntityRenderer<TileFluidTankBlock> {
	
	public RenderFluidTankBlock(TileEntityRendererDispatcher rendererDispatcherIn) {
		super(rendererDispatcherIn);
	}
	
	@Override
	public void render(TileFluidTankBlock tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
		renderCubeUsingQuads(tileEntityIn, partialTicks, matrixStackIn, bufferIn, combinedLightIn, combinedOverlayIn);
	}

	public static final ResourceLocation TEXTURE = new ResourceLocation("tmod:textures/blocks/flux_fluid.png");
	
	public static void renderCubeUsingQuads(TileFluidTankBlock tileEntityMBE21, float partialTicks, MatrixStack matrixStack, IRenderTypeBuffer renderBuffers, int combinedLight, int combinedOverlay) {
		// draw the object as a cube, using quads
		// When render method is called, the origin [0,0,0] is at the current [x,y,z] of the block.
		
		// The cube-drawing method draws the cube in the region from [0,0,0] to [1,1,1] but we want it
		//   to be in the block one above this, i.e. from [0,1,0] to [1,2,1],
		//   so we need to translate up by one block, i.e. by [0,1,0]
		final Vector3d TRANSLATION_OFFSET = new Vector3d(.5, 0, .5);
		
		matrixStack.push(); // push the current transformation matrix + normals matrix
		matrixStack.translate(TRANSLATION_OFFSET.x,TRANSLATION_OFFSET.y,TRANSLATION_OFFSET.z); // translate
		Color gemColour = Color.white;
		
		drawCubeQuads(matrixStack, renderBuffers, gemColour, combinedLight, tileEntityMBE21);
		matrixStack.pop(); // restore the original transformation matrix + normals matrix
	}
	
	/**
	* Draw a cube from [0,0,0] to [1,1,1], same texture on all sides, using a supplied texture
	*/
	private static void drawCubeQuads(MatrixStack matrixStack, IRenderTypeBuffer renderBuffer, Color color, int combinedLight, TileFluidTankBlock tileEntityIn) {
		IVertexBuilder vertexBuilderBlockQuads = renderBuffer.getBuffer(RenderType.getEntityTranslucent(TEXTURE));
		// other typical RenderTypes used by TER are:
		// getEntityCutout, getBeaconBeam (which has translucency),
		
		FluidStack fluid = tileEntityIn.getTank().getFluid();
		
		Matrix4f matrixPos = matrixStack.getLast().getMatrix();     // retrieves the current transformation matrix
		Matrix3f matrixNormal = matrixStack.getLast().getNormal();  // retrieves the current transformation matrix for the normal vector
		
		// we use the whole texture
		Vector2f bottomLeftUV = new Vector2f(0.0F, 1.0F);
		float UVwidth = 1.0F;
		float UVheight = 1.0F;
		
		// all faces have the same height and width
		final float WIDTH = 1.0F;
		final float HEIGHT = 1.0F;
		
		float scale = (1.0f - WIDTH/2 - WIDTH) * fluid.getAmount() / (tileEntityIn.getTank().getCapacity());
		
		if(scale <= 0) { matrixStack.scale(.5f, Math.abs(scale) + .21f, .5f); }
		matrixStack.translate(-.5, 0, -.5);
		
		final Vector3d EAST_FACE_MIDPOINT = new Vector3d(1.0, 0.5, 0.5);
		final Vector3d WEST_FACE_MIDPOINT = new Vector3d(0.0, 0.5, 0.5);
		final Vector3d NORTH_FACE_MIDPOINT = new Vector3d(0.5, 0.5, 0.0);
		final Vector3d SOUTH_FACE_MIDPOINT = new Vector3d(0.5, 0.5, 1.0);
		final Vector3d UP_FACE_MIDPOINT = new Vector3d(0.5, 1.0, 0.5);
		final Vector3d DOWN_FACE_MIDPOINT = new Vector3d(0.5, 0.0, 0.5);
		
		addFace(Direction.EAST, matrixPos, matrixNormal, vertexBuilderBlockQuads,
		color, EAST_FACE_MIDPOINT, WIDTH, HEIGHT, bottomLeftUV, UVwidth, UVheight, combinedLight);
		addFace(Direction.WEST, matrixPos, matrixNormal, vertexBuilderBlockQuads,
		color, WEST_FACE_MIDPOINT, WIDTH, HEIGHT, bottomLeftUV, UVwidth, UVheight, combinedLight);
		addFace(Direction.NORTH, matrixPos, matrixNormal, vertexBuilderBlockQuads,
		color, NORTH_FACE_MIDPOINT, WIDTH, HEIGHT, bottomLeftUV, UVwidth, UVheight, combinedLight);
		addFace(Direction.SOUTH, matrixPos, matrixNormal, vertexBuilderBlockQuads,
		color, SOUTH_FACE_MIDPOINT, WIDTH, HEIGHT, bottomLeftUV, UVwidth, UVheight, combinedLight);
		addFace(Direction.UP, matrixPos, matrixNormal, vertexBuilderBlockQuads,
		color, UP_FACE_MIDPOINT, WIDTH, HEIGHT, bottomLeftUV, UVwidth, UVheight, combinedLight);
		addFace(Direction.DOWN, matrixPos, matrixNormal, vertexBuilderBlockQuads,
		color, DOWN_FACE_MIDPOINT, WIDTH, HEIGHT, bottomLeftUV, UVwidth, UVheight, combinedLight);
	}
	
	private static void addFace(Direction whichFace, Matrix4f matrixPos, Matrix3f matrixNormal, IVertexBuilder renderBuffer, Color color, Vector3d centrePos, float width, float height, Vector2f bottomLeftUV, float texUwidth, float texVheight, int lightmapValue) {
		// the Direction class has a bunch of methods which can help you rotate quads
		//  I've written the calculations out long hand, and based them on a centre position, to make it clearer what
		//   is going on.
		// Beware that the Direction class is based on which direction the face is pointing, which is opposite to
		//   the direction that the viewer is facing when looking at the face.
		// Eg when drawing the NORTH face, the face points north, but when we're looking at the face, we are facing south,
		//   so that the bottom left corner is the eastern-most, not the western-most!
		
		
		// calculate the bottom left, bottom right, top right, top left vertices from the VIEWER's point of view (not the
		//  face's point of view)
		
		Vector3f leftToRightDirection, bottomToTopDirection;
		
		switch (whichFace) {
		case NORTH: { // bottom left is east
		leftToRightDirection = new Vector3f(-1, 0, 0);  // or alternatively Vector3f.XN
		bottomToTopDirection = new Vector3f(0, 1, 0);  // or alternatively Vector3f.YP
		break;
		}
		case SOUTH: {  // bottom left is west
		leftToRightDirection = new Vector3f(1, 0, 0);
		bottomToTopDirection = new Vector3f(0, 1, 0);
		break;
		}
		case EAST: {  // bottom left is south
		leftToRightDirection = new Vector3f(0, 0, -1);
		bottomToTopDirection = new Vector3f(0, 1, 0);
		break;
		}
		case WEST: { // bottom left is north
		leftToRightDirection = new Vector3f(0, 0, 1);
		bottomToTopDirection = new Vector3f(0, 1, 0);
		break;
		}
		case UP: { // bottom left is southwest by minecraft block convention
		leftToRightDirection = new Vector3f(-1, 0, 0);
		bottomToTopDirection = new Vector3f(0, 0, 1);
		break;
		}
		case DOWN: { // bottom left is northwest by minecraft block convention
		leftToRightDirection = new Vector3f(1, 0, 0);
		bottomToTopDirection = new Vector3f(0, 0, 1);
		break;
		}
		default: {  // should never get here, but just in case;
		leftToRightDirection = new Vector3f(0, 0, 1);
		bottomToTopDirection = new Vector3f(0, 1, 0);
		break;
		}
		}
		leftToRightDirection.mul(0.5F * width);  // convert to half width
		bottomToTopDirection.mul(0.5F * height);  // convert to half height
		
		// calculate the four vertices based on the centre of the face
		
		Vector3f bottomLeftPos = new Vector3f(centrePos);
		bottomLeftPos.sub(leftToRightDirection);
		bottomLeftPos.sub(bottomToTopDirection);
		
		Vector3f bottomRightPos = new Vector3f(centrePos);
		bottomRightPos.add(leftToRightDirection);
		bottomRightPos.sub(bottomToTopDirection);
		
		Vector3f topRightPos = new Vector3f(centrePos);
		topRightPos.add(leftToRightDirection);
		topRightPos.add(bottomToTopDirection);
		
		Vector3f topLeftPos = new Vector3f(centrePos);
		topLeftPos.sub(leftToRightDirection);
		topLeftPos.add(bottomToTopDirection);
		
		// texture coordinates are "upside down" relative to the face
		// eg bottom left = [U min, V max]
		Vector2f bottomLeftUVpos = new Vector2f(bottomLeftUV.x, bottomLeftUV.y);
		Vector2f bottomRightUVpos = new Vector2f(bottomLeftUV.x + texUwidth, bottomLeftUV.y);
		Vector2f topLeftUVpos = new Vector2f(bottomLeftUV.x + texUwidth, bottomLeftUV.y + texVheight);
		Vector2f topRightUVpos = new Vector2f(bottomLeftUV.x, bottomLeftUV.y + texVheight);
		
		Vector3f normalVector = whichFace.toVector3f();  // gives us the normal to the face
		
		addQuad(matrixPos, matrixNormal, renderBuffer,
		bottomLeftPos, bottomRightPos, topRightPos, topLeftPos,
		bottomLeftUVpos, bottomRightUVpos, topLeftUVpos, topRightUVpos,
		normalVector, color, lightmapValue);
	}
		
	/**
	* Add a quad.
	* The vertices are added in anti-clockwise order from the VIEWER's  point of view, i.e.
	* bottom left; bottom right, top right, top left
	* If you add the vertices in clockwise order, the quad will face in the opposite direction; i.e. the viewer will be
	*   looking at the back face, which is usually culled (not visible)
	* See
	* http://greyminecraftcoder.blogspot.com/2014/12/the-tessellator-and-worldrenderer-18.html
	* http://greyminecraftcoder.blogspot.com/2014/12/block-models-texturing-quads-faces.html
	*/
	private static void addQuad(Matrix4f matrixPos, Matrix3f matrixNormal, IVertexBuilder renderBuffer, Vector3f blpos, Vector3f brpos, Vector3f trpos, Vector3f tlpos, Vector2f blUVpos, Vector2f brUVpos, Vector2f trUVpos, Vector2f tlUVpos, Vector3f normalVector, Color color, int lightmapValue) {
		addQuadVertex(matrixPos, matrixNormal, renderBuffer, blpos, blUVpos, normalVector, color, lightmapValue);
		addQuadVertex(matrixPos, matrixNormal, renderBuffer, brpos, brUVpos, normalVector, color, lightmapValue);
		addQuadVertex(matrixPos, matrixNormal, renderBuffer, trpos, trUVpos, normalVector, color, lightmapValue);
		addQuadVertex(matrixPos, matrixNormal, renderBuffer, tlpos, tlUVpos, normalVector, color, lightmapValue);
	}
	
	// suitable for vertexbuilders using the DefaultVertexFormats.ENTITY format
	private static void addQuadVertex(Matrix4f matrixPos, Matrix3f matrixNormal, IVertexBuilder renderBuffer, Vector3f pos, Vector2f texUV, Vector3f normalVector, Color color, int lightmapValue) {
		renderBuffer.pos(matrixPos, pos.getX(), pos.getY(), pos.getZ()) // position coordinate
		.color(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha())        // color
		.tex(texUV.x, texUV.y)                     // texel coordinate
		.overlay(OverlayTexture.NO_OVERLAY)  // only relevant for rendering Entities (Living)
		.lightmap(lightmapValue)             // lightmap with full brightness
		.normal(matrixNormal, normalVector.getX(), normalVector.getY(), normalVector.getZ())
		.endVertex();
	}
}

I took a deep look at minecraftbyexample tileentityrenderer and now it works

https://imgur.com/X0zN7cw

Edited by tigres810

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.