-
Posts
5170 -
Joined
-
Last visited
-
Days Won
77
Everything posted by Choonster
-
You've used the pre-1.8 FML namespace ( cpw.mods.fml ) instead of the 1.8+ namespace ( net.minecraftforge.fml ). Why are you running the Launch class instead of the GradleStart class? Using the latter should automatically provide the necessary command line arguments for you, so you don't need to manually specify the version, tweaker or access token. If you run the genIntelliJRuns Gradle task with IDEA closed, it should generate the run configurations for you.
-
GUIs are client-only, but the server is in control of the game. If you make changes on the client, they'll just be overwritten by the server's values. You need to send a packet to the server telling it that the player pressed the button so it can take the appropriate action. diesieben07 has a tutorial on the Simple Network Wrapper here.
-
ModelLoader.setCustomModelResourceLocation and ModelLoader.setCustomMeshDefinition can be called during preInit to do the same thing as calling ItemModelMesher#register in init. The Minecraft instance is created and stored before mod loading starts, though the ItemModelMesher instance is only created between preInit and init. 1Poseidon3: You're free to use my code within the terms of the MIT License (basically you can do what you want with it as long as you credit me). I don't really mind if you include the credit in every file or just include a line in your license/readme.
-
You don't pass those values to HarvestDropsEvent , Forge does that. You just need to subscribe to the event and read the values from it. coolAlias has a tutorial on event handlers here.
-
That should work on both sides. How are you registering the event handler?
-
This is what I was referring to.
-
http://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html I use anonymous classes that extend StateMapperBase in my ModModelManager class.
-
ForgeGradle compiles your code with Java 6 compatibility by default (the same as Minecraft). If you want to use Java 8 features like lambdas, you need to tell Gradle to compile your code with Java 8 compatibility instead. You can see an example of this here. Keep in mind that users will need to be running Java 8 to use your mod if you do this, Minecraft itself only requires Java 6. If you don't want to compile with Java 8 compatibility, use an anonymous class instead of a lambda.
-
I explained a lot of the new fluid model system (including example code) in this thread recently. Post #5 explains the fluid initialisation and registration, post #19 explains the model registration.
-
That constructor was added with the fluid model in Forge 1.8-11.14.3.1464. Make sure you're using that version or a newer one.
-
Interestingly, the furnace uses TileEntityFurnace#func_174904_a to determine the cook time of the item being smelted, but this always returns 200. It doesn't look like Forge provides any hooks for changing this value, but you may be able to file a suggestion in the Suggestions forum or a pull request on GitHub to implement a hook for it. Forge does provide the IFuelHandler interface for determining fuel values (burn times), but this isn't used for vanilla fuels and the highest value returned by any fuel handler is always used.
-
[1.8] Use Item or ItemGlassBottle/ItemBucket?
Choonster replied to 1Poseidon3's topic in Modder Support
You can subscribe to FillBucketEvent to allow the vanilla bucket to pick up your fluids. You may want to make sure the Fluid being drained is one you've actually specified a bucket model for, otherwise you'll end up giving the player an item with no model. There's no equivalent of this event for the glass bottle; but you could subscribe to PlayerInteractEvent (with the RIGHT_CLICK_AIR action), check that the player is holding a glass bottle and looking at one of your fluids, give them the appropriate filled bottle and then set useItem to Result.DENY . How you implement the bucket item itself is up to you, you can either use metadata or NBT to store the contained Fluid . If you're using metadata, you can register it with FluidContainerRegistry . If you're using NBT, you can implement IFluidContainerItem (or extend ItemFluidContainer , the default implementation); FluidContainerRegistry doesn't support NBT-based containers. You can see my FillBucketEvent handler here and my bucket item here. A lot of this logic is adapted from the vanilla bucket. -
[1.7.10] Need help with disappearing XP-levels and Durability.
Choonster replied to Lellson's topic in Modder Support
Keybindings are client-only, but the server is in control of the game. Changing things on the client will just get them overwritten by the server's values. You need to handle your keybindings client-side and then send a packet to the server telling it that the key was pressed so it can take the appropriate action. diesieben07 has a tutorial on the Simple Network Wrapper here, there are probably several keybinding tutorials out there. -
[1.8] Use Item or ItemGlassBottle/ItemBucket?
Choonster replied to 1Poseidon3's topic in Modder Support
Are you talking about the type of the field that holds the instance or the type of the instance itself? The type of the field doesn't matter (as long as it's compatible with the instance's type), the type of the instance determines the behaviour of the block/item. ItemGlassBottle overrides Item#onItemRightClick to decrement the stack size and add a water bottle to the player's inventory when they right click while looking at water. This is hardcoded to detect water and add a water bottle, so if you wanted to do the same thing for your own liquid you'd need to override the method yourself. Since ItemGlassBottle doesn't add any other behaviour, there's not much difference between extending Item and ItemGlassBottle . BlockAir overrides several methods to make it completely invisible and untouchable, so it's probably easier to extend it or instantiate it directly when making a similar block than extending Block and overriding the same methods to do the same thing. -
There's a space between java and -Djava.net... .
-
You tried to access a GuiScreen field on TConstruct's TabRegistry class, which doesn't extend GuiScreen . Edit: Disregard this post, I misinterpreted the error.
-
Only ever download mods from their official site or a trusted modpack launcher like FTB, Curse, ATLauncher, etc. Don't use sites like Skydaz.
-
It looks like it was still loading when the log stopped. The only real errors I can see are related to Reika's mods (DragonAPI, RotaryCraft, ElectriCraft) missing signatures and DragonAPI having a blank access transformer class specified, but these happen quite early on and don't seem to have stopped the game. Try re-downloading the latest versions of these mods.
-
It looks like the _JAVA_OPTIONS and JAVA_TOOL_OPTIONS environment variables is applied before the actual command-line arguments, so Java will use the maximum memory specified by them instead of the launcher's JVM arguments. Try deleting the environment variable(s) and making sure you only have the one [b]-Xmx[/b] argument specified in the launcher. Don't bump threads. Someone will post when they have something to say, bumping will just annoy people.
-
Are you sure you removed the first [b]-Xmx[/b] argument?
-
Same crash and same problem: You have two [b]-Xmx[/b] arguments.
-
Did you put the code in src/main/java and the assets in src/main/resources?
-
I think I was just looking at a different section of the log. The arguments are printed twice: once from Reika's DragonAPI (though it's not printed with a named logger, so it just shows as "FML") and once from the fake crash report generated by SplashProgress . These are in a different order to each other.
-
Your current arguments are [b]-Xmx512M[/b] -XX:+CMSIncrementalMode -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -XX:-UseAdaptiveSizePolicy -Djava.library.path=... -XX:+UseConcMarkSweepGC -Xmn128M [b]-Xmx5G[/b] (notice the two [b]-Xmx[/b] arguments). Delete the first [b]-Xmx[/b] argument.
-
Other way around, but yes. Are you sure? The default arguments for a profile are -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M , the latest log shows 512M at the start and 5G at the end.