DefbeatCZ Posted September 5, 2019 Share Posted September 5, 2019 (edited) Hello, I would like to ask for help with the following problem - I have TileEntity attached to a block, trying to make it work with one private int variable. When writing NBT on server, the actual internal value is used. When loading from NBT during world load, the saved value is used. The problem is that afterwards the value is zero-ed as if the TileEntity is constructed a new ... Is there anything I need to do in the TE constructor? Or is there an init function I am missing? Thanks in advance ! Code is on my GitHub https://github.com/DefbeatCZ/Minecraft-Arcana The problem is within the EntropyBlockProducer.java Edited September 6, 2019 by DefbeatCZ Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted September 5, 2019 Share Posted September 5, 2019 17 minutes ago, DefbeatCZ said: The problem is within the EntropyBlockProducer.java Post the log where the log statements are. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
DefbeatCZ Posted September 5, 2019 Author Share Posted September 5, 2019 This is my console output. I made mine debug traces bold. The only warning I got is from ModelBaker about missing blockstates. 2019-09-06 01:03:44,465 main WARN Advanced terminal features are not available in this environment [01:03:44] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20190829.143755, --fml.mcVersion, 1.14.4, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 28.0.83, --version, MOD_DEV, --assetIndex, 1.14, --assetsDir, C:\Users\a\.gradle\caches\forge_gradle\assets, --username, Dev, --accessToken, ????????, --userProperties, {}] [01:03:44] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 3.2.0+60+b86c1d4 starting: java version 1.8.0_191 by Oracle Corporation [01:03:45] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [01:03:45] [main/INFO] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmluserdevclient' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\a\.gradle\caches\forge_gradle\assets, --assetIndex, 1.14, --username, Dev, --accessToken, ????????, --userProperties, {}] [01:03:47] [Client thread/INFO] [minecraft/Minecraft]: Setting user: Dev [01:03:57] [Client thread/WARN] [minecraft/GameSettings]: Skipping bad option: lastServer: [01:03:57] [Client thread/INFO] [minecraft/Minecraft]: LWJGL Version: 3.2.2 build 10 [01:04:00] [modloading-worker-3/INFO] [ne.mi.co.ForgeMod/FORGEMOD]: Forge mod loading, version 28.0.83, for MC 1.14.4 with MCP 20190829.143755 [01:04:00] [modloading-worker-3/INFO] [ne.mi.co.MinecraftForge/FORGE]: MinecraftForge v28.0.83 Initialized [01:04:04] [Client thread/INFO] [mojang/NarratorWindows]: Narrator library for x64 successfully loaded [01:04:04] [Thread-1/FATAL] [ne.mi.co.ForgeConfig/CORE]: Forge config just got changed on the file system! [01:04:04] [Forge Version Check/INFO] [ne.mi.fm.VersionChecker/]: [forge] Starting version check at https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [01:04:05] [Realms Notification Availability checker #1/INFO] [mojang/RealmsClient]: Could not authorize you against Realms server: Invalid session id [01:04:05] [Forge Version Check/INFO] [ne.mi.fm.VersionChecker/]: [forge] Found status: BETA_OUTDATED Current: 28.0.83 Target: 28.0.93 [01:04:08] [Server-Worker-1/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: mcarcana:blockstates/tepa.json: java.io.FileNotFoundException: mcarcana:blockstates/tepa.json [01:04:08] [Server-Worker-1/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'mcarcana:blockstates/tepa.json' missing model for variant: 'mcarcana:tepa#' [01:04:08] [Server-Worker-1/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: mcarcana:blockstates/tepb.json: java.io.FileNotFoundException: mcarcana:blockstates/tepb.json [01:04:08] [Server-Worker-1/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'mcarcana:blockstates/tepb.json' missing model for variant: 'mcarcana:tepb#' [01:04:08] [Server-Worker-1/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: mcarcana:blockstates/tep.json: java.io.FileNotFoundException: mcarcana:blockstates/tep.json [01:04:08] [Server-Worker-1/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'mcarcana:blockstates/tep.json' missing model for variant: 'mcarcana:tep#' [01:04:08] [Server-Worker-1/WARN] [minecraft/ModelBakery]: Unable to load model: 'mcarcana:tepa#inventory' referenced from: mcarcana:tepa#inventory: java.io.FileNotFoundException: mcarcana:models/item/tepa.json [01:04:08] [Server-Worker-1/WARN] [minecraft/ModelBakery]: Unable to load model: 'mcarcana:tepb#inventory' referenced from: mcarcana:tepb#inventory: java.io.FileNotFoundException: mcarcana:models/item/tepb.json [01:04:08] [Server-Worker-1/WARN] [minecraft/ModelBakery]: Unable to load model: 'mcarcana:tep#inventory' referenced from: mcarcana:tep#inventory: java.io.FileNotFoundException: mcarcana:models/item/tep.json [01:04:10] [Client thread/WARN] [minecraft/GameSettings]: Skipping bad option: lastServer: [01:04:10] [Client thread/INFO] [minecraft/SoundSystem]: OpenAL initialized. [01:04:10] [Client thread/INFO] [minecraft/SoundEngine]: Sound engine started [01:04:10] [Client thread/INFO] [minecraft/AtlasTexture]: Created: 1024x512 textures-atlas [01:04:11] [Client thread/INFO] [minecraft/AtlasTexture]: Created: 256x256 textures/particle-atlas [01:04:11] [Client thread/INFO] [minecraft/AtlasTexture]: Created: 256x256 textures/painting-atlas [01:04:11] [Client thread/INFO] [minecraft/AtlasTexture]: Created: 128x128 textures/mob_effect-atlas [01:04:19] [Client thread/WARN] [minecraft/Commands]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498] [01:04:19] [Client thread/WARN] [minecraft/Commands]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [01:04:19] [Client thread/WARN] [minecraft/Commands]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0] [01:04:19] [Client thread/WARN] [minecraft/Commands]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498] [01:04:19] [Client thread/WARN] [minecraft/Commands]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [01:04:19] [Server thread/INFO] [minecraft/IntegratedServer]: Starting integrated minecraft server version 1.14.4 [01:04:19] [Server thread/INFO] [minecraft/IntegratedServer]: Generating keypair [01:04:19] [Thread-1/FATAL] [ne.mi.co.ForgeConfig/CORE]: Forge config just got changed on the file system! [01:04:19] [Server thread/INFO] [minecraft/SimpleReloadableResourceManager]: Reloading ResourceManager: Default, main, forge-1.14.4-28.0.83_mapped_snapshot_20190719-1.14.3-recomp.jar [01:04:20] [Server thread/INFO] [minecraft/RecipeManager]: Loaded 6 recipes [01:04:22] [Server thread/INFO] [minecraft/AdvancementList]: Loaded 811 advancements [01:04:23] [Server thread/INFO] [minecraft/MinecraftServer]: Preparing start region for dimension minecraft:overworld [01:04:24] [Client thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 0% [01:04:24] [Client thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 0% [01:04:24] [Client thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 0%[01:04:24] [Server thread/INFO] [mcarcana/]: READ {val_int:126,keepPacked:0b,x:17,y:68,z:71,id:"mcarcana:aaaa"} [01:04:26] [Client thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 83% [01:04:26] [Client thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 83% [01:04:26] [Client thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 83% [01:04:26] [Client thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 90% [01:04:26] [Client thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 90% [01:04:27] [Client thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 91% [01:04:27] [Client thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 94% [01:04:28] [Client thread/INFO] [minecraft/LoggingChunkStatusListener]: Time elapsed: 4749 ms[01:04:28] [Server thread/INFO] [mcarcana/]: tick! 1 [01:04:28] [Server thread/INFO] [minecraft/ChunkManager]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [01:04:28] [Server thread/INFO] [minecraft/ChunkManager]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved[01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:1} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:2} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:3} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:4} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:5} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:6} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:7} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:8} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:9} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:10} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:11} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:12} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:13} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:14} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:15} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:16} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:17} [01:04:28] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:18} [01:04:29] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:19} [01:04:29] [Server thread/INFO] [mcarcana/]: getUpdatePacket{val_int:20} Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted September 5, 2019 Share Posted September 5, 2019 47 minutes ago, DefbeatCZ said: The problem is that afterwards the value is zero-ed as if the TileEntity is constructed a new ... The problem is your use of iTag.hasUniqueId you can always be assured that the tag wont be null so dont do it. And the get methods will always return a value even if it's not present. 1 Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
DefbeatCZ Posted September 6, 2019 Author Share Posted September 6, 2019 Removed the check and it is working like a charm. Thanks ! ... and they say defensive programming is good ... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.