Everything posted by Choonster
-
How to override normal block-drop procedure?
There's nothing stopping you from reading the Minecraft and Forge code in your IDE if you've set up your workspace correctly. This page explains how to do that. In most cases, you can override Block#getDrops (or the vanilla methods called by it) to control the drops of a block; but this doesn't give you access to the player who broke the block or the tool they used to break it. The best way to have drops vary based on the tool used to break the block is probably to subscribe to BlockEvent.HarvestDropsEvent , check the block is yours, check which tool the player is holding and add the appropriate drops to the event's drop list.
-
Gradle Build Error
Search for that error message and you'll see that the most common cause is the JAVA_HOME environment variable being set to the JRE path instead of the JDK path.
-
[1.8] [UNSOLVED] How do I get a block with two layers of textures
I explained how to do this in 1.10.2 here. In 1.8.x, you need to override the appropriate colour methods in your Block and Item instead of using IBlockColor / IItemColor .
-
[1.10.2] Fluids don't always render correctly
This has been reported here.
-
ClassNotFoundException for API classes
The relocate statement in the shadowJar block relocates a package, not a JAR.
-
ClassNotFoundException for API classes
I'm shadowing the entire Fluent API JAR, not just a single class.
-
Adding WorldEvent.Init to ease instance manipulation
As far as I can see, WorldEvent.Load is only ever fired once for each World instance.
-
ClassNotFoundException for API classes
Use the Gradle Plugin syntax in section 1.2 of the user guide (I also use this in the build.gradle I linked). Add the dependency you want to shadow as normal in the dependencies block In the shadowJar block: Filter which dependencies are shadowed using the dependencies block Relocate the classes from the shadowed dependencies to your own package using relocate Set classifier to '' to overwrite the default JAR with the fat JAR produced by Shadow [*]Tell ForgeGradle to reobfuscate the output of the shadowJar task in the reobf block
-
1.10.2 World#markBlockForUpdate?
All colour-related methods in Block and Item were replaced by IBlockColor and IItemColor in 1.9. In init, get the BlockColors / ItemColors instance from Minecraft using the appropriate getter, create an IBlockColor / IItemColor implementation and then register it with BlockColors / ItemColors .
-
[Unsolved] Spawning Particles Visible to All Players?
Always specify the Minecraft version you're using in the thread title. Judging by the PotionEffect constructor you're using, I'd guess you're on 1.8.9. If you look at the implementation of World#spawnParticle , you'll see that it does nothing on the server and spawns the specified particle on the client. You need to send a packet from the server to all nearby players telling their clients to spawn the particles. You could do this with your own packet, but Minecraft already provides the WorldServer#spawnParticle method to do this for you.
-
Gradle Build Error
Which JDK version are you using? Immersive Engineering is trying to compile its source code against Java 8, so you need to be using JDK 8.
-
How to get setRegistryName registration class of the class unit / subject?
In the code you posted, you're declaring a field called CACHE_WALL and then using a different variable called cache_wall . Please post your actual code and the error(s), not artificial snippets.
-
[1.8] Subblocks only works with one json file. How to fix this?
You need to register a separate model for each metadata value of the Item using ModelLoader.setCustomModelResourceLocation .
-
ClassNotFoundException for API classes
Use the Shadow Gradle plugin. I have an example here.
-
[1.9.4]adding new nbtdata to vanilla mobs
Create a capability to store the timer. Forge itself has several capability examples, look at the usages of CapabilityManager.register in your IDE. There's also a test mod here. I have some examples here: API, implementation
-
[1.10.2] Player.getCapability(...) problem
Forge itself has several capability examples, look at the usages of CapabilityManager.register in your IDE. There's also a test mod here. I have some examples here: API, implementation
-
Forge Mod Loader version 6.4.45.953 for Minecraft 1.6.4 NOT loading
Old versions of Forge don't support Java 8, but you can install LegacyJavaFixer to fix this. 1.6.4 is extremely outdated and no longer supported here, you should update to 1.10.2.
-
1.10.2 World#markBlockForUpdate?
Use World#notifyBlockUpdate . Some class, field and method renames are documented on this issue tracker. Otherwise try looking for places where the class, field or method was used in the old version and then looking at what the new version uses in those places.
-
forge 1.7.10 server crash
TooManyItems is either broken or not meant to work when installed on the dedicated server. 1.7.10 is no longer supported here, you should update to 1.10.2.
-
1.10 Forge wont start
You need to remove the mod from your mods folder. Mods built for 1.7.10 only work in 1.7.10. Mods usually have the Minecraft version they're built for in their file names. If you still can't find it, upload the FML log (logs/fml-client-latest.log in your Minecraft directory) to Gist and link it here.
-
1.10 Forge wont start
You installed a coremod built for 1.7.10 or earlier on 1.10. Side note: Why are you using 1.10? It was obsoleted by 1.10.2 within a week or so of the first Forge release for it.
-
[Solved][1.9+] Help getting item with metadata
Create an ItemStack of that Item with the appropriate metadata.
-
Searching for Paintings Mod(s)
Have you tried BiblioCraft?
-
Modding for NOOBIES tutorials for 1.9.4 - 1.10.2?
There are various tutorials linked here.
-
How to change the color of an ItemStack when it's created? (Solved)
Do not use OpenGL in your Item class. Do not create your own ItemColors instance. Do not try to register an IItemColor every tick. In init, get Minecraft's ItemColors instance ( Minecraft#getItemColors ) and then create and register a single IItemColor for your Item . In the IItemColor implementation, use the three integers stored in the ItemStack 's NBT to determine the colour to return. The format is r << 16 | g << 8 | b (where r , g and b are the red, green and blue components of the colour).
IPS spam blocked by CleanTalk.