Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

  • Days Won


JimiIT92 last won the day on November 7 2017

JimiIT92 had the most liked content!

Community Reputation

20 Excellent

About JimiIT92

  • Rank
    Dragon Slayer


  • Gender
  • URL
  • Location
  • Personal Text
    Creator of MineWorld mod!

Recent Profile Visitors

3310 profile views
  1. Can confirm, I update to the latest version (1.16.3-34.1.16) and it fires
  2. I was saying use the ClientChatReceivedEvent event, but I have a doubt: if a Player send the same exact message what would happen? How can you tell if the message has been sent from a player or not?
  3. Darn... so how would I catch this event to change what is shown? I tried the other sub events as well and they did not get catched as well
  4. I was going for the RenderTooltipEvent, but it looks like this event is not fired when I hover my mouse to an ItemStack. I have this event inside a class @SubscribeEvent public static void onRenderTooltip(final RenderTooltipEvent.Pre event) { if(BundleItemUtils.isBundle(event.getStack())) { //DO STUFF } } which I register during the FMLCommonSetupEvent like this MinecraftForge.EVENT_BUS.register(BundleEvents.class); Any idea on why this doesn't get called?
  5. Ok, I'm slowly understanding how this works. Unfortunately I've never maged the inventory directly for a case like this, where the item stack you are dragging around with you mouse will be modified when you click but not put into the inventory yet. Now I made it kinda work, by essentially doing the same operation both on the client and on the server. I already know this is bad, however I don't know how to optimize this. Plus for some reason is working fine only inside the Player container and Creative Container and other fews. If I am, for example, inside the Furnace Container and left click a
  6. Ok, so what I'm doing now is this. In the event handle, instead of calling the BundleItemUtils, I send a message to the server BundleResources.NETWORK.sendToServer(new BundleServerMessage(draggedItemStack, Math.max(slot.slotNumber, slot.getSlotIndex()), false)); Which when handled will do this private static void processMessage(BundleServerMessage message, ServerPlayerEntity playerEntity) { Container container = playerEntity.openContainer; Slot slot = container.getSlot(message.slotId); ItemStack slotStack = slot.getStack(); if(message.empty)
  7. Yes, I've looked at how the renderTooltipFunction works and I was aware that I need to do that while catching the RenderTooltipEvent. What I specifically want to do is to create a custom component that I can then reuse for other Items as well, included vanilla ones, like for example the StringTextComponent. But looking at the classes I haven't seen a function related to how this component is rendered
  8. Ok, so right now I do this @SubscribeEvent(priority = EventPriority.HIGHEST) public static void onMouseReleased(final GuiScreenEvent.MouseReleasedEvent event) { if(!event.isCanceled() && event.getGui() instanceof ContainerScreen<?>) { ContainerScreen<?> containerScreen = (ContainerScreen<?>)event.getGui(); Slot slot = containerScreen.getSlotUnderMouse(); if(slot != null && !(slot instanceof CraftingResultSlot)) { PlayerEntity player = Minecraft.getInstance().player; if(player != null) { ItemStack draggedItemStack = playe
  9. During Minecraft Live we saw how the new Bundles have a new style of tooltip, where item textures are rendered inside the tooltip. So I wonder, is it currently possible to create a custom tooltip that can render the item textures (where the items are taken from the Bundle Item NBT Tags). And how would you create this tooltip and attach to the item, to make it show instead of the default one?
  10. I am attempting to create a mod that adds the new 1.17 Bundles. To do this I listen to the mouse click event on an Inventory slot. Now, inside the Player container everything works fine, if I am in creative mode. However if I use the Bundle when another container is open (for example a Chest), or if the player is just in survival mode, whatever changes I made to the inventory won't be reflected as soon as I close the container or update it somehow. For example, I have this survival inventory I then take the Bundle (the item near the crafting table) and click on the stack of 40 stone.
  11. Well, in the end I figured out I didn't even need a listener. All I need was to catch the ClickEvent ๐Ÿ˜…
  12. Yes, I know they are just a list. What I want to avoid is using reflection to prepend my listener ๐Ÿ˜…
  13. I believe you should look at how the Hotbar works to find out how to render a Screen constantly. The first thing I can think of is to not make the Screen a ContainerScreen, because of course that will be bind to a Container, which is something as far as I understand you don't need
  14. I think the closest thing to what you want to achieve is to search how particles are rendered, since they are just a textures that gets draw on the screen in a certain location in most cases. Or you can always create an entity that has the texture of your image and spawn that entity when you want to see the image, but I don't think this will be the optimal approach (but it will sure get the job done quickly)
  15. I can't look into the code right now, but I think you can search the renderToolTip function inside a ContainerScreen and see what that function does. From there you should be able to figure out how to render your own tooltip. By the way, if you want to render it inside a screen, just use the renderToolTip or override it to do what you want it to do
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.