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

angellus

Members
  • Posts

    27
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

angellus's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I have been searching around and Googling, is there a way to do the ForgeGradle task 'runClient' with the username, accesstoken and/or password parameters? Preferably a way that does not require me to stick them in my build.gradle.
  2. What you said made me think of something I should have checked earlier. It looks like it is because Minecraft/Forge determines if the player is sprinting AFTER the Forge hook for LivingUpdate. So regardless of what you set player.setSprinting too, it will be redetermined once the Minecraft code runs to determine it. This worked as override: KeyBinding.setKeyBindState(Minecraft.getMinecraft().gameSettings.keyBindSprint.getKeyCode(), false);
  3. Since 1.7 added the ability to bind sprint to a specific key, I cannot seem to find out how to stop players from sprinting. This is how I am doing it: public void handleLivingEntityUpdate(LivingEvent.LivingUpdateEvent event) { if (event.entityLiving instanceof EntityPlayer) { event.entityLiving.setSprinting(false); } } But this only appears to work if the player uses double-tap forward to sprint, not if they use the key bind to sprint.
  4. Subject really says it all. I need to find a way to intercept a block break before it goes to Bukkit. We have blocks that change states when they are mined (like regenerating ores) and would like to bypass Bukkit permissions so players can still "mine" the block, but not break it. I tried doing a BlockEvent.BreakEvent and tweaking the priority, but that does not seem to work. Is there anything I can hook into that fires before the block is actually broken that I can use?
  5. I just determined it is not. Forge is not loading it. Nashorn is a Java Extension and it is not loading it.
  6. In that case, is it possible to get Forge to load a jar from a Maven repo if it cannot find it? i.e. Can I upload and host a copy of rhino.jar that it needs to use Rhino and make it so Forge will download and use it if it is on Java 8+?
  7. It looks like it might be modloader that is causing the issue. The following code works in Java 7 in both IntelliJ AND Minecraft, whereas in Java 8, it only works in IntelliJ import javax.script.*; new ScriptEngineManager().getEngineByName("JavaScript"); However, if I tell ScriptEngineManager to use the Forge Mod Loader, it only works in Java 7 and no longer in Java 8 at all. import cpw.mods.fml.common.Loader; import javax.script.*; new ScriptEngineManager(Loader.instance().getModClassLoader()).getEngineByName("JavaScript"); In Java 7, rhino.jar is located inside of JRE\lib, in Java 8, nashorn.jar is located in JRE\lib\ext. It looks like Forge is not loading the Java extension Jars.
  8. For IntelliJ? No. It is just there. It should just be there.
  9. Yeah, nashorn is definitely there. I am pretty sure the Minecraft launcher it just not loading it. I know you can do classpath injection, but I do not really know how. Can I force Java to load it somehow?
  10. It looks like it is a classpath issue. It was not set up right. I finally got it working now though. Thanks guys!
  11. This is not an issue that is directly related to Forge, but it is something someone here might be able to help me with. When we updated our mod to 1.7.10, we noticed some people started having issues with running our content scripts which we use for mob drops and some other things. Well, now, it is happening to everything. I am pretty sure now that everyone is on Java 8, it does not work for anyone. It does not even work in our dev environment anymore for intelliJ. This is the code that is messing up and it seems that it is a pretty standard way of doing things. "getEngineByName" is returning null which is only support to happen if that Engine does not exist. Except JavaScript should exist. import javax.script.*; new ScriptEngineManager().getEngineByName("JavaScript"); UPDATE: After a lot more research, it looks like in Java 8 that nashorn.jar, which contains the JavaScript engine, is a Java Extension and it is not being loaded by the Minecraft Launcher. Does anyone know how to force load this extension using either Gradle or the code or something else? The mod is being built with JDK8 targeting JRE 8. If I load it inside of IntelliJ it all works fine, it is simply because the extension is not being loaded by the launcher.
  12. Nevermind. I figured it out. You can do try/catches in Gradle apparently. dependencies { try { compile project(':CoreMod') } catch (UnknownProjectException ex) { compile 'com.mod:CoreMod:latest.integration' } }
  13. Is it possible to set a dependency to compile another project if it exist OR pull from a Maven repo if it does not? That way you can set CoreMod+Mod set where Mod depends on CoreMod to compile but you can also just set up Mod to pull CoreMod from Maven repo. For example, something like this: dependencies { // if project(':CoreMod').exists() compile project(':CoreMod') //else compile 'com.mod:CoreMod:latest.integration' }
×
×
  • Create New...

Important Information

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