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


  • Content Count

  • Joined

  • Last visited

Everything posted by SirWindfield

  1. Ye but the only way to do the syncing is by making the fields non static so each instance has actually other values, am I right? But that would conflict with the configuration annotation api. Because that api actually expects values to be static. Quite upset that those two APIs can't work together. But creating a GUI for a simple Configuration is not hard at all. So I will probably just make the fields non static and use instances then. Thanks.
  2. So there is no way to actually have placeholders within lang files and replace them duriing runtime?
  3. That's what I did. I have written key=Some string and some value {} and then I created a new instance as shown above. I expected that the {} gets replaced by the argumentOfTypeString but that wasn't the case. I always get this output: "You need the following item to enter {}: {}!" I can show you the lang file and the code if you want to. new TextComponentTranslation("chat.message.missing_key", dimensionName, itemName) chat.message.missing_key=You need the following item to enter {}: {}! The second one being the lang file and the first one the Java file that sends the
  4. I have ported a clientside mod to be server side only. The last thing that does not work is the chat messages that get sent to the client. After googling some time I found out that I18N only works on the client side. Is there some way to load the lang files server side, get the matching locale from the player and then load the key from the matching lang file? Another question that is similar to this one. I tried formatting the text and making it dynamic by including placeholders: "Some string needs {} argument". But that doesn't work. I couldn't find any information on place
  5. Making a new instance of RPConfiguration is not possible if you use the @Config annotations since your fields have to be static. At least for me, the annotation system has no way to actually set the fields manually since you have not access to the underlying Configuration instance. @diesieben07 did post solutions, but those did not involve the new annotation system introduced in 1.12.
  6. I craeted a configuration file using the new 1.12 annotations offered by forge (@Config). Now I wanted to implement config syncing between client and server. Searching for some time lead to to the following posts here on this forum: 1) 2) As /u/diesieben07 (@diesieben07) mentioned in the second link, the best way is to store the configs both on client side and use the server side config if it is available. But since I am using the forge annotations I do not even have two separate classes with those values (since the fields are static). Do I just set the static fields to the
  7. buildscript { repositories { jcenter() maven { url = "http://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' } } repositories { maven { // JEI, McJtyLib and TOP url "http://modmaven.k-4u.nl/" } } apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the nessasary things for Forge to be setup. version = "1.0.1" group= "de.zerotask.minecraft.vanillatools" // http://maven.apache.org/guides/mini/guide-naming-conventions.h
  8. I am pretty new to modding so please keep that in mind I want to disable all vanilla swords and tried it with the following code (basically just registering a custom event handler using MinecraftForge#EVENT_BUS): @SubscribeEvent(priority = EventPriority.HIGHEST) public void onDamageTaken(LivingHurtEvent event) { // only consider any calculations if the source is the player itself Entity entity = event.getSource().getEntity(); if (entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; // only look for the main
  9. Looks like I had some older docs open. Is there any other practically disable vanilla bows without removing the recipe?
  10. I am fairly new to Minecraft Modding (I have around 5 years Java experience). I want to prevent vanilla bows from firing. Looking into the docs for Forge I came across the ArrowNockEvent which should allow me to cancel any bow actions. But even thought the event is marked as @Cancelable, Forge still throws an IllegalArgumentException when I try to cancel the event. Here is the code if I am doing something wrong: @SubscribeEvent(priority = EventPriority.HIGHEST) public void onHit(ArrowNockEvent event) { // not sure if machines can trigger this event if (even
  • Create New...

Important Information

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