Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello guys,

 

my writeToNBT method in the TileEntity EntityHeater throws this Exception:

java.lang.RuntimeException: class com.alotfood.alotfood.entitys.EntityHeater is missing a mapping! This is a bug!
at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:100) ~[TileEntity.class:?]
at com.alotfood.alotfood.entitys.EntityHeater.writeToNBT(EntityHeater.java:252) ~[EntityHeater.class:?]
at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:323) [AnvilChunkLoader.class:?]
at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:132) [AnvilChunkLoader.class:?]
at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:229) [ChunkProviderServer.class:?]
at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:281) [ChunkProviderServer.class:?]
at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:875) [WorldServer.class:?]
at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:370) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:113) [integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:746) [MinecraftServer$2.class:?]

 

The writeToNBT method:

        @Override
        public void writeToNBT(NBTTagCompound tagCompound2) {
                super.writeToNBT(tagCompound2);
                System.out.println("aha");
   
                NBTTagList itemList = new NBTTagList();
                for (int i = 0; i < inv.length; i++) {
                        ItemStack stack = inv[i];
                        if (stack != null) {
                                NBTTagCompound tag = new NBTTagCompound();
                                tag.setByte("Slot", (byte) i);
                                stack.writeToNBT(tag);
                                System.out.println("aha");
                                itemList.appendTag(tag);
                        }
                }
                tagCompound2.setTag("Heater", itemList);
        }

 

I dont know what causes the Exception beacause I used a similar writen method in another TileEntity

 

Hope you can help me :)

 

enbecko

 

  • Author

Now it seems like when the game is closed and the map is then reloaded, the game seems to Register a tileentity WITH and one WITHOUT the items inside.

  • Author

I should have been more detailed.

 

I have a tileentity with a gui. When i put an item in a slot from the tileentity it gives a certain temperature. That works fine but when i close the game and reopen it, one instance of the tileentity seems to have the item in it as needed and updates the temperature correctly, but the other instance just updates when i open the gui.

 

 

  • 2 weeks later...
  • Author

Well I have an TileEntity that refreshs up to a certain point and then it places a block on its position.

I can see the newly placed Block but it does not have the functions, it should have. I printed ot the world of the placed block and it only has the client one, so there must be a way to synchronize that.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.