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

So I have this issue whereby if I load a world with my Tile Entity (crate), it will crash the game and give this error:

Caused by: java.lang.RuntimeException: class cout.sngtech.beneathMod.tileentities.TileEntityOakCrate is missing a mapping! This is a bug! at net.minecraft.tileentity.TileEntity.writeInternal(TileEntity.java:72) ~[?:?] at net.minecraft.tileentity.TileEntity.write(TileEntity.java:66) ~[?:?] at cout.sngtech.beneathMod.tileentities.TileEntityCrate.write(TileEntityCrate.java:81) ~[?:?] at cout.sngtech.beneathMod.tileentities.TileEntityCrate.getUpdateTag(TileEntityCrate.java:95) ~[?:?] at net.minecraft.network.play.server.SPacketChunkData.<init>(SPacketChunkData.java:47) ~[?:?] at net.minecraft.server.management.PlayerChunkMapEntry.sendToPlayer(PlayerChunkMapEntry.java:146) ~[?:?] at net.minecraft.server.management.PlayerChunkMapEntry.addPlayer(PlayerChunkMapEntry.java:63) ~[?:?] at net.minecraft.server.management.PlayerChunkMap.addPlayer(PlayerChunkMap.java:224) ~[?:?] at net.minecraft.server.management.PlayerList.preparePlayer(PlayerList.java:261) ~[?:?] at net.minecraft.server.management.PlayerList.playerLoggedIn(PlayerList.java:331) ~[?:?] at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:162) ~[?:?] at net.minecraft.network.NetHandlerLoginServer.tryAcceptPlayer(NetHandlerLoginServer.java:114) ~[?:?] at net.minecraft.network.NetHandlerLoginServer.tick(NetHandlerLoginServer.java:65) ~[?:?] at net.minecraft.network.NetworkManager.tick(NetworkManager.java:257) ~[?:?] at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:151) ~[?:?]

 

Also loading a new world then placing the crate down then exiting and going back to the world that crashed me doesn't crash anymore for some weird reason until i restart the game.

 

This is my github: https://github.com/SNGTech/Beneath-Mod/tree/master/src/main/java/cout/sngtech/beneathMod

 

Help would be greatly appreciated! Thanks

Edited by SNGTech

You haven't registered your tile entity.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author
@ObjectHolder(Main.MODID)
public class TileEntityInit 
{
	//Storage
	public static final TileEntityType<?> OAK_CRATE = null;
	public static final TileEntityType<?> SPRUCE_CRATE = null;
	public static final TileEntityType<?> BIRCH_CRATE = null;
	public static final TileEntityType<?> JUNGLE_CRATE = null;
	public static final TileEntityType<?> ACACIA_CRATE = null;
	public static final TileEntityType<?> DARK_OAK_CRATE = null;
	
	@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
	public static class RegistryEvents
	{
		@SubscribeEvent
		public static void registerTileEntities(final RegistryEvent.Register<TileEntityType<?>> e)
		{
			e.getRegistry().registerAll
			(
				//Storage
				TileEntityType.Builder.create(TileEntityOakCrate::new).build(null).setRegistryName(Main.MODID, "oak_crate"),
				TileEntityType.Builder.create(TileEntitySpruceCrate::new).build(null).setRegistryName(Main.MODID, "spruce_crate"),
				TileEntityType.Builder.create(TileEntityBirchCrate::new).build(null).setRegistryName(Main.MODID, "birch_crate"),
				TileEntityType.Builder.create(TileEntityJungleCrate::new).build(null).setRegistryName(Main.MODID, "jungle_crate"),
				TileEntityType.Builder.create(TileEntityAcaciaCrate::new).build(null).setRegistryName(Main.MODID, "acacia_crate"),
				TileEntityType.Builder.create(TileEntityDarkOakCrate::new).build(null).setRegistryName(Main.MODID, "dark_oak_crate")
			);
			
			Main.logger.debug("Registered Tile Entities");
		}
	}
}

This is not how to register tile entities in 1.13.2 Forge?

How then do I go about doing that?

Edited by SNGTech

  • Author
TileEntityType.register("oak_crate", Builder.create(TileEntityOakCrate::new)).setRegistryName(Main.MODID, "oak_crate"),
				TileEntityType.register("spruce_crate", Builder.create(TileEntitySpruceCrate::new)).setRegistryName(Main.MODID, "spruce_crate"),
				TileEntityType.register("birch_crate", Builder.create(TileEntityBirchCrate::new)).setRegistryName(Main.MODID, "birch_crate"),
				TileEntityType.register("jungle_crate", Builder.create(TileEntityJungleCrate::new)).setRegistryName(Main.MODID, "jungle_crate"),
				TileEntityType.register("acacia_crate", Builder.create(TileEntityAcaciaCrate::new)).setRegistryName(Main.MODID, "acacia_crate"),
				TileEntityType.register("dark_oak_crate", Builder.create(TileEntityDarkOakCrate::new)).setRegistryName(Main.MODID, "dark_oak_crate")

ive tried doing this but i get a registry error (so obviously thats not how to register them)

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.