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.

dylandmrl

Members
  • Joined

  • Last visited

Everything posted by dylandmrl

  1. Ok so even if I don't handle any inventory, I still have to implement a container. I have no experience on it at all but I think that I will find enough ressource on internet, thank you very much.
  2. Hello guys, Today I encounter another problem. I have trouble doing the good choice when it comes to forge modding. I want to sync a GUI with my tile entity. I know that blocks such as furnace use a Container to sync the whole thing. But in my case I don't need the player inventory at all and I don't care about slots. It is just bunch of variables. So do I really need a container or maybe I can use something else and if that so what can I use ? PS: I could just update my client side tile entity at the same time of my server side tile entity into my GUI but I am not sure it is a good idea...
  3. Ok fine thank you very much! One last thing, if I use NBT then I don't need a capability anymore right ?
  4. Yes, that's what I understood. For now, I just have a tile entity that has a capability which contains data. This tileentity is attached to a block that has a gui but no container because it doesn't need to store any item. I send packet to change the capability from the GUI but for the moment I don't ask the server to give me back information about the capability into the GUI because I can access the capability from the server side directly into my GUI.
  5. Hello guys, today I don't have any particular problem but I don't understand why I can get my capability's data from the server directly into my GUI which is obiously a client side stuff. Thanks to this I don't need to use any packet to update my tile entity into the client side but I am not sure if this is a good way of doing things. I saw that nowadays the client and the server are linked because after all client is just a server with only one client so do I need to use packet for this situation?
  6. I didn't know the existence of another bus, thank you very much and for those who need more information about both buses here is a link : https://suppergerrie2.com/minecraft-1-14-modding-with-forge-3-how-to-use-events/.
  7. Hello guys, I usually try to fix things by myself using sources but here I am stuck. I don't know why since I saw many examples here and in github but nothing seems to work... I try to implement an easy capability that just store one data to begin with, then I try to attached this one on a tile entity but when I use getCapability, nothing is attached. Even worst, the "onAttachCapability" function in the follow code doesn't seems to be called : @Mod(MyMod.MOD_ID) @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD, modid = MyMod.MOD_ID) public class MyMod { public static final String MOD_ID = "mymod"; public static final String MOD_NAME = "My Mod"; public static final String MOD_VERSION = "0.0.1 "; public static final ResourceLocation PACKET_CAPABILITY_LOCATION = new ResourceLocation(MyMod.MOD_ID, "packet_capability"); public MyMod() { Debugger.debug("Start My Mod"); MinecraftForge.EVENT_BUS.register(this); } ...Stuff @SubscribeEvent public static void onCapabilityRegistry(FMLCommonSetupEvent event) { Debugger.debug("Register Capabilities"); CapabilityManager.INSTANCE.register(IPacket.class, new PacketStorage(), Packet::new); } @SubscribeEvent public static void onAttachCapability(AttachCapabilitiesEvent<TileEntity> event) { Debugger.debug("Attach Capabilities"); TileEntity te = event.getObject(); if (te instanceof IDataReceiver) { event.addCapability(PACKET_CAPABILITY_LOCATION, new PacketProvider()); } } } I really have no idea, everything else is exactly the same code as this one : https://gist.github.com/FireController1847/c7a50144f45806a996d13efcff468d1b.

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.