-
-
Save loordgek/d5dc0cbec73ea9623a45e6d77f1de047 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SubscribeEvent | |
public static void onAttachCapabilitiesTileEntity(AttachCapabilitiesEvent<TileEntity> event) { | |
ResourceLocation location = new ResourceLocation(Ref.modinfo.modid, "test"); | |
if (event.getCapabilities().containsKey(location)) return; | |
if (event.getObject() instanceof TileEntityChest) { | |
event.addCapability(location, new CapProvider((IInventory) event.getObject())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment