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

Antonii

Members
  • Content Count

    36
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Antonii

  • Rank
    Tree Puncher
  1. Yes finally. I took some suggestions from here The libraries are now embedded and loaded on runtime. I used embed and works perfectly. This is the final configuration: buildscript { repositories { maven { url = 'https://maven.minecraftforge.net' } mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.1.+', changing: true } } apply plugin: 'net.minecraftforge.gradle' // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. apply
  2. I have tried all imaginable configurations in order to load an external jar to my mod. Forge version: 1.16 IDE: IntelliJ Java: 11.0.11 for building and running On 1.12 version I used to simply add the jars to the build.gradle with the `compile files()` command and then add them to the mods folder together with the mod jar. It used to work. But now it seems it cannot find the jars anymore. I'll post the logs at the end. Even more I scanned for IO access from the java (procmon) and I can't see it trying to read any file when the function containing the external referen
  3. How can I register local commands for a logical client side-only mod? I want to access these commands when for example playing on a server. However it seems the commands are first searched on the server and of course it fails when none is found. i can see a part of the commands logic in CommandSuggestionHelper::updateCommandInfo(). This is called when I input a string in the command and seems to generate the suggestions by making a request to the server. And ChatScreen::keyPressed() calls sendMessage() which contains a comment It looks like it might not be yet implemented. So is t
  4. This is exactly what I thought! Thanks. This is why I said So the issue at hand is to differentiate between the two...when? On events? I recall that some events where called on both sides. You must put this in the docs perhaps on the Sided page
  5. I admit I left one thing out: I will want to play a normal game locally. When I will do that won't my mod be loaded also on the logical server? It's true that in normal conditions the check is somewhat useless but just sometimes I don't want to load it when playing a singleplayer game. Also I will test my mod locally on a singleplayer world and that will have the same issues. I used to have some sort of check in my mod in 1.12 version that did this.
  6. Now now there is no need for irony or insults. I am just asking for help. Redirecting me to a page I already read doesn't help, does it? Now here is what I understood: So I must "protect" my code from all forms of server. Taking into consideration that this mod will only run on my PC and not on a physical server that leaves me with the following problem: how to differentiate between the logical server and logical client. The method isClientSide() seems appropriate but it is not available where I need it (perhaps at a later stage?) Let's say I do what you keep
  7. public Main() { DistExecutor.safeRunWhenOn(Dist.CLIENT,()->SomeClass::Init); } //SomeClass::Init contains register code This bad/not needed - my mod will never run on physical server public Main() { if (Minecraft.getInstance() == null || !Minecraft.getInstance().level.isClientSide()) return; FMLJavaModLoadingContext.get().getModEventBus().addListener(this::Init); } This good but doesn't work because `level` is null
  8. Yes indeed logical side is better and exactly what I want to do! Now how do I do that? isClientSide() doesn't work....because `level` is null
  9. Well you see DistExecutor is for the physical side. My mod will never run on a server but only on the client side. I only need to set apart the logical server and the logical client.
  10. I want my mod to only load when running on the logical client side. The problem is that on initial setup `Minecraft.getInstance().level` is null and so I cannot tell the sides apart. Is there any other clean way of doing this or should I use the `Thread.currentThread()` method?
  11. The docs say to use "isRemote()" to get the logical side but I can't find it in the `Minecraft.getInstance().level` world object. However I found `isClientSide()`. Is this method the counterpart of `isRemote`? Or was this functionality stripped away in favor of Dist?
  12. Never mind, I found it. Seems Eclipse is buggy again.
  13. Thanks. Do you also know the current way of taking a player's direction (north, south etc)? I used to call EnumFacing efc = player.getHorizontalFacing().getOpposite(); but the enum does not exist anymore and so the methods. I found what seems to be the replacement Directions but I could not find how it is used in the Entity class (a quick reference-search didn't return much)
  14. My mod will be client-side only and running on the 1.16 version of Forge. I want to know what's the difference between getPosition(), xo, xBob, xo, xOld? I think xOld stores the last position of the player before being updated by the server (or perhaps before taking a step?) but what about the others? I used to take the position of the player directly by accessing posX, posY and posZ. This was on the 1.12 version. Now I am not sure if I can simply replace all those with xo, yo and zo. That would make my job much easier.
  15. I managed to create a functional button for my gui in forge 1.12. Using annotations I created my config and then in my Gui I called the super(....,MyModConfig.class). I see that many things changed in 1.15. Is this still possible? I know I can manually create the text fields in the Gui and manually updating the config but I really want to use the annotations system. In the same time, this method already generates the Gui and I need a button to be created. I don't have any code to show because I am working on other parts of my code in this 'exporting-to-15' project. I wi
×
×
  • Create New...

Important Information

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