-
Posts
67 -
Joined
-
Last visited
Everything posted by uiytt
-
[1.15.2] Join the minecraft thread from another thread
uiytt replied to uiytt's topic in Modder Support
No Idea ? -
[1.15.2] Join the minecraft thread from another thread
uiytt replied to uiytt's topic in Modder Support
A thread that I created to check for my server's information. If I use the screen directly from my thread, minecraft will crash.. -
[1.15.2] Join the minecraft thread from another thread
uiytt replied to uiytt's topic in Modder Support
Well I tried : Minecraft.getInstance().runImmediately(new Runnable() { @Override public void run() { MultiPlayerGui.this.minecraft.displayGuiScreen(new ConnectingScreen(MultiPlayerGui.this, MultiPlayerGui.this.minecraft, server)); } }); And it's really weird... In my console, I receive everything from the server chat. But on my game, it's stuck on loading the terrain infinitely !!! MultiPlayerGui is my custome class but the rest is not.. I don't undersant why O_o -
So, I have two thread : The first one is the one of minecraft, the second one is async thread that I created to do something on the web. I would like that when the second thread is done, the first thread execute a method ( and not the second thread because minecraft really doesn't like when you use method using another thread). Before the second thread ended, the first thread must continue working. Does anyone have any idea of how to do that please ?
-
GuiOpenEvent it's never fired when opening the menu, I will look for why EDIT : It works, I swear I thought I already tried it !!!
-
I think FlowingFluid.class and more precisely the method getFlow() At one point, it check getMaterial().blocksMovement()) This basically check if the water can move in. You just have to set blocksMovement to true in your crops I think. Not sure, you have to test
-
Hello, I'm looking for a way to change some things in the server list (like add a button and other things) My idea was to create a new class which extends "MultiplayerScreen" And then use the InitGuiEvent and override the GUI with mine. But I can't find a way in the event to override the GUI (we only have access to the getter) Does someone know how to solve that ? Thanks ^^
-
AH it seems that the problem only comes from DifficultyChangeEvent. I don't care about this event, I only used it as a test, it works fine with another event... So yeah my events work
-
Hi, I really don't understand why my even is never fired... package fr.uiytt.test; import net.minecraftforge.event.DifficultyChangeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; public class Events { @SubscribeEvent public void test(final DifficultyChangeEvent event) { System.out.println("test1 " + event.getDifficulty().getTranslationKey()); } } I have declared it in my mod main class with : MinecraftForge.EVENT_BUS.register(new Events()); Thanks for your help
-
Ok, now that I use toml, how can I manage to detect when a player click on the config button (in the mods list). And how can I show a normal Gui that allows the player to modify it ?
-
Why ?
-
Thanks, I have another question. If I didn't register a config, How can I get in my Init event the config folder (where every config are store in). I would like to use another storage system way more enjoyable to use and thus I need to know where is the folder where it's supposed to go ^^
-
Oh wait, I don't know how the config file work after 1.11, can you link me to any tuto there is on this subject (I didn't found any)
-
Hi, I have absolutely no clue about how to get the folder from where my config must be... Do I need to do it manually ? Thanks
-
;(
-
Still up
-
Sorry :/, UP
-
So I'm trying to detect on the server side when a player take an item from any container, Someone said that he think that was possible using container listener. I guess I need to do something like that : event.getContainer().addListener(); But I've absolute no idea of how listener work or even what listener exist ? Can anyone help me ? (even if it's not possible to detect when an item is taken, I still think it might be a useful information to know how listeners work ^^)
-
[1.12.2] Event RightClickBlock, detect if a block was placed
uiytt replied to uiytt's topic in Modder Support
Oh yes, I didn't think about it ^^ thanks -
[1.12.2] Event RightClickBlock, detect if a block was placed
uiytt replied to uiytt's topic in Modder Support
When using a combination of the two event, one of them (PlayerEvent.RightClickBlock) will also be called at the same time as BlockEvent.PlaceEvent, I want to do an action only if a player rightclick on another block without placing a block, and you said there is no way to do what I want -
[1.12.2] Event RightClickBlock, detect if a block was placed
uiytt replied to uiytt's topic in Modder Support
Well I hope that someone have already encounter the same problem and with a bit chance he founds a solution (and you're not aware), So I will let this open in a hope that someone has a solution that work because using a combination of the two event won't work for what I want to do And is there any events that is triggered when a item is picked up from an inventory (chest, furnace ?) -
[1.12.2] Event RightClickBlock, detect if a block was placed
uiytt replied to uiytt's topic in Modder Support
PlayerEvent.RightClickBlock. won't work because it's also triggered when a block is placed If I use both PlayerEvent.RightClickBlock and BlockEvent.PlaceEvent, PlayerEvent.RightClickBlock is also called when BlockEvent.PlaceEvent is triggered and my goal is to find a way around this... -
[1.12.2] Event RightClickBlock, detect if a block was placed
uiytt replied to uiytt's topic in Modder Support
Yes and to detect when a player open a container ? (like a chest, a furnace, etc...) -
[1.12.2] Event RightClickBlock, detect if a block was placed
uiytt replied to uiytt's topic in Modder Support
So there is no way when right clicking to know if it's placing a block or not ? :'c ? So with even it's impossible to send "a" in the chat when a player place a block, and "b" in the chat when a player open a container ? -
[1.12.2] Event RightClickBlock, detect if a block was placed
uiytt replied to uiytt's topic in Modder Support
Yes but PlayerInteractEvent.RightClickBlock. is also trigger when a block is placed