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

I am trying to use a world capability as part of a storage system, but I am not sure how they work. I have tried following examples I have found, but don't know how to properly access it.

I have previously used WorldSaveData, but that method no longer appears to be available in 1.14

Can anybody give me any advice?

  • Author

This is the current state of my source code https://github.com/TehStoneMan/BetterStorageToo/tree/1.14

 

When trying to access my capability, I get this error:

[17Aug2019 14:00:13.553] [Server thread/INFO] [betterstorage/]: ==== net.minecraftforge.common.capabilities.Capability@5a8110de ====
[17Aug2019 14:00:13.554] [Server thread/ERROR] [net.minecraft.world.chunk.Chunk/]: A TileEntity type io.github.tehstoneman.betterstorage.common.tileentity.TileEntityCrate has thrown an exception trying to write state. It will not persist, Report this to the mod author
java.lang.ClassCastException: net.minecraftforge.common.capabilities.Capability cannot be cast to io.github.tehstoneman.betterstorage.common.world.storage.CrateStorage
	at io.github.tehstoneman.betterstorage.common.tileentity.TileEntityCrate.getCrateStackHandler(TileEntityCrate.java:93) ~[?:?]
	at io.github.tehstoneman.betterstorage.common.tileentity.TileEntityCrate.getNumCrates(TileEntityCrate.java:316) ~[?:?]
	at io.github.tehstoneman.betterstorage.common.tileentity.TileEntityCrate.write(TileEntityCrate.java:389) ~[?:?]
	at net.minecraft.world.chunk.Chunk.func_223134_j(Chunk.java:432) ~[?:?]
	at net.minecraft.world.chunk.storage.ChunkSerializer.write(ChunkSerializer.java:303) ~[?:?]
	at net.minecraft.world.server.ChunkManager.func_219229_a(ChunkManager.java:674) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) [?:1.8.0_211]
	at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) [?:1.8.0_211]
	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) [?:1.8.0_211]
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) [?:1.8.0_211]
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source) [?:1.8.0_211]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) [?:1.8.0_211]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) [?:1.8.0_211]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) [?:1.8.0_211]
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source) [?:1.8.0_211]
	at java.util.stream.ReferencePipeline.forEach(Unknown Source) [?:1.8.0_211]
	at net.minecraft.world.server.ChunkManager.save(ChunkManager.java:333) [?:?]
	at net.minecraft.world.server.ServerChunkProvider.save(SourceFile:319) [?:?]
	at net.minecraft.world.server.ServerWorld.save(ServerWorld.java:746) [?:?]
	at net.minecraft.server.MinecraftServer.save(MinecraftServer.java:513) [?:?]
	at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:553) [?:?]
	at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:210) [?:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:661) [?:?]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_211]

 

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.