Jump to content

fieldbox

Members
  • Posts

    32
  • Joined

  • Last visited

fieldbox's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Still doesn't work. Also, thanks for the TechnoVision and HarryTalks tips, those were the two YouTubers I was specifically using.
  2. Oh, whoops, I thought it had fixed it but checking again, it hasn't. This time it just lights one block of the ground on fire and plays the sound.
  3. Ah, of course. I probably should've changed the boolean that I just made true because I had no idea what it was. Thanks!
  4. I'm trying to make a Lightning Rod item to learn how to use the onItemUse method in modding. It's supposed to summon a lightning bolt when right clicked. However, when I right click with the item, it just plays the sound of a lightning bolt being summoned and doesn't spawn an actual bolt. What have I done wrong? Here's the code inside my onItemUse method. @Override public ActionResultType onItemUse(ItemUseContext context) { LightningBoltEntity bolt = new LightningBoltEntity(context.getWorld(), context.getPos().getX(), context.getPos().getY(), context.getPos().getZ(), true); context.getWorld().addEntity(bolt); return ActionResultType.PASS; }
  5. Still not working with lateinit var and no nullable type, I'll just delete it.
  6. Oh, I never knew about lateinit, thanks for clearing that up.
  7. Ah, ok. There is a public keyword in there, but I'll just delete the proxy I guess. I'm assuming world.isRemote will be fine for any side related code?
  8. Sorry if Forgelin isn't supported here, there was nowhere else to ask. If you post Java, IDEA automatically converts it into Kotlin, so it doesn't matter if you don't know Kotlin. Anyway, I set up a ClientProxy and ServerProxy that implement an IProxy interface I made. I added a public static val (like a constant in Java) of type IProxy? with an @SidedProxy annotation with the exact package names of both proxies. Both the proxies are public. When I run, I get an error saying this: java.lang.IllegalAccessException: Class net.minecraftforge.fml.common.ProxyInjector can not access a member of class com.fieldbox.upgrademod.ClientProxy with modifiers "private" I don't understand. The object ClientProxy is public, so it shouldn't be throwing this error, right? Proxy code in mod file (Kotlin) @JvmStatic @SidedProxy(clientSide = "com.fieldbox.upgrademod.ClientProxy", serverSide = "com.fieldbox.upgrademod.ServerProxy") public val proxy : IProxy? = null Proxy code in mod file (Java, but a bit rusty) @SidedProxyclientSide = "com.fieldbox.upgrademod.ClientProxy", serverSide = "com.fieldbox.upgrademod.ServerProxy"public static final IProxy
  9. There's no way I can use Kotlin without editing in some form. If I set up another repositories section, that seems to "block out" the one in buildscript and stops forge from downloading.
  10. I changed things around in the "repositories" part of the gradle file (looks like my other repositories part was blocking out the official one with the forge stuff). Now there's a new issue: Could not find net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT. Searched in the following locations: https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/maven-metadata.xml https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/ForgeGradle-2.3-SNAPSHOT.pom https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/ForgeGradle-2.3-SNAPSHOT.jar http://maven.shadowfacts.net/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/maven-metadata.xml http://maven.shadowfacts.net/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/ForgeGradle-2.3-SNAPSHOT.pom http://maven.shadowfacts.net/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/ForgeGradle-2.3-SNAPSHOT.jar Required by: :mod:unspecified That error appears in the Gradle window for IDEA as well as setupDecompWorkspace.
  11. I am on 1.12, I ran setupDecompWorkspace and I got genIntellijRuns working, but this still doesn't seem to work. Kotlin differences don't matter; I believe copying Java code into a Kotlin file will convert it anyway.
  12. I'm using Forgelin and created an object, annotated it with Mod, which didn't work. I then tried to import net.minecraftforge.fml.common.Mod, but that throws an 'unresolved reference' error. I'm in IDEA and, if it helps, Forge and Minecraft are not in my External Libraries. Sorry if Forgelin isn't directly supported, I didn't know where else to ask. Oh yeah, and genIntellijRuns throws a NullPointerException!
  13. Whoops. Turns out pressing "download and install" on the Java website automatically installs a 32-bit version of the JRE. I get that it's for user-friendliness, but really Oracle?
  14. It says 1.8.0_191. I think that's a 32-bit JRE, whoops. (I installed it a while ago) EDIT: I just checked. It's in Program Files (x86). Definitely 32-bit. EDIT 2: After installing a new JRE, it still isn't working. Same error.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.