Everything posted by fieldbox
-
[1.15.2] How would I spawn a Lightning Bolt?
Thanks so much! It works!
-
[1.15.2] How would I spawn a Lightning Bolt?
Still doesn't work. Also, thanks for the TechnoVision and HarryTalks tips, those were the two YouTubers I was specifically using.
-
[1.15.2] How would I spawn a Lightning Bolt?
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.
-
[1.15.2] How would I spawn a Lightning Bolt?
Ah, of course. I probably should've changed the boolean that I just made true because I had no idea what it was. Thanks!
-
[1.15.2] How would I spawn a Lightning Bolt?
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; }
-
IllegalAccessException in Forgelin proxy
Still not working with lateinit var and no nullable type, I'll just delete it.
-
IllegalAccessException in Forgelin proxy
Oh, I never knew about lateinit, thanks for clearing that up.
-
IllegalAccessException in Forgelin proxy
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?
-
IllegalAccessException in Forgelin proxy
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
-
Could not find net.minecraftforge.gradle (Used to be: Unresolved reference: minecraftforge)
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.
-
Could not find net.minecraftforge.gradle (Used to be: Unresolved reference: minecraftforge)
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.
-
Could not find net.minecraftforge.gradle (Used to be: Unresolved reference: minecraftforge)
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.
-
Could not find net.minecraftforge.gradle (Used to be: Unresolved reference: minecraftforge)
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!
-
Could not reserve enough space for 3145728KB object heap
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?
-
Could not reserve enough space for 3145728KB object heap
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.
-
Mods on Minecraft windows 10 edition
AFAIK, Forge doesn't work with Windows 10 edition. It's a different game engine. Don't take my word for it, though; Forge might have added support for Minecraft versions using the Bedrock engine.
-
Could not reserve enough space for 3145728KB object heap
When I run .\gradlew setupDecompWorkspace in PowerShell, this error appears. I am using the latest 64-bit JDK. If this changes anything, I have added the Forgelin stuff into build.gradle: repositories { jcenter() maven { url "http://maven.shadowfacts.net/" } } dependencies { compile group: "net.shadowfacts", name: "Forgelin", version: "LATEST_VERSION" } EDIT: Whoops, I think I posted in the wrong section. I only saw "Support and Bug Reports", didn't see Modding Support.
-
[1.12.2] Blockstate file not found
Thanks! That worked.
-
[1.12.2] Blockstate file not found
It's simply just this: @SubscribeEvent public static void registerItems(final RegistryEvent.Register<Item> event) { event.getRegistry().register(Item.getItemFromBlock(Blocks.testBlock)); }
-
[1.12.2] Blockstate file not found
Yes, I can use /setblock.
-
[1.12.2] Blockstate file not found
I tried registering Item.getItemFromBlock(Blocks.testBlock) as an item but it's still not working...
-
[1.12.2] Blockstate file not found
Yep, I can use /setblock. I forgot to register the ItemBlock though.
-
[1.12.2] Blockstate file not found
Ok, the minecraft: thing was actually due to an error in my blockstate json. But, my block isn't in the game!
-
[1.12.2] Blockstate file not found
@Mod(modid = MyMod.MODID, name = MyMod.NAME, version = MyMod.VERSION) public class MyMod { public static final String MODID = "testmod"; public static final String NAME = "test mod"; public static final String VERSION = "1.0"; @SidedProxy(clientSide = "com.harry.proxy.ClientProxy", serverSide = "com.harry.proxy.CommonProxy") public static CommonProxy proxy; @SidedProxy(clientSide = "com.harry.proxy.ClientProxy", serverSide = "com.harry.proxy.CommonProxy") public static ClientProxy proxy2; @Mod.Instance public static MyMod mod; public static final Logger LOGGER = LogManager.getLogger(MODID); @EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.preInit(event); } @EventHandler public void init(FMLInitializationEvent event) { proxy.init(event); } @EventHandler @SideOnly(Side.CLIENT) public void clientInit(FMLInitializationEvent event) { proxy2.init(event); } @EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); } } (i haven't got around to fixing that CommonProxy thing) public class TestBlock extends BlockBase { public TestBlock(String name, Material mat, CreativeTabs tab, float hardness, float resistance) { super(name, mat, tab, hardness, resistance); } } And the BlockBase class: public class BlockBase extends Block { public BlockBase(String name, Material mat, CreativeTabs tab, float hardness, float resistance, String tool, int harvest) { this(name, mat, tab, hardness, resistance); setHarvestLevel(tool, harvest); } public BlockBase(String name, Material mat, CreativeTabs tab, float hardness, float resistance, float light) { this(name, mat, tab, hardness, resistance); setLightLevel(light); } public BlockBase(String name, Material mat, CreativeTabs tab, float hardness, float resistance) { super(mat); setUnlocalizedName(name); setRegistryName(name); setHardness(hardness); setResistance(resistance); setCreativeTab(tab); } }
-
[1.12.2] Blockstate file not found
Now it's saying that it can't find the model file and puts minecraft: prepended.
IPS spam blocked by CleanTalk.