-
Posts
5162 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
You should have the Minecraft and Forge source code available in the forgeSrc-<version> referenced library, so you can either browse to the Chunk class inside of it or use your IDE's Navigate To Class (IDEA, Ctrl+N)/Open Type (Eclipse, Ctrl+Shift+T) feature to open the Chunk class directly.
-
[1.11.2] [UNSOLVED] Block connections & Blockstates
Choonster replied to Bektor's topic in Modder Support
Use BlockStateContainer.Builder to create the BlockStateContainer, you can call BlockStateContainer.Builder#add once for each array of properties -
[1.10.2] Having trouble getting item to render
Choonster replied to DefenderVex's topic in Modder Support
ModelLoader methods must be called before init, they won't do anything if called in init or later. Since you're still registering your items/blocks in preInit, register the models in preInit as well. I recommend moving your registration to the registry events and registering the models in ModelRegistryEvent, this will make it easier to update to 1.12+. -
Weird character when formatting in colours
Choonster replied to Acrogenous's topic in Modder Support
While using a lang file and the TextFormatting enum is the proper way to do this, it should still be possible to use formatting codes inline. Your issue was probably happening because your code wasn't saved or compiled as UTF-8. -
Vanilla special-cases the rendering of Items for Blocks that are rendered by TESRs in TileEntityItemStackRenderer. You can register your own item TESR with ForgeHooksClient.registerTESRItemStack, but this is deprecated and marked for removal as soon as possible. Instead, you should just create a regular baked model and use that for the item form. I created a JSON version of the chest model here. Ideally you should also use a baked model for the block and use Forge's animation system to animate the lid, but unfortunately there's not much documentation on it.
-
[Solved] Blocks equipable on head like pumpkins [1.10.2]
Choonster replied to Dion6103's topic in Modder Support
Item#isValidArmor receives the EntityEquipmentSlot that's being checked as an argument, only return true if it's EntityEquipmentSlot.HEAD. -
Not every axe (or axe-like tool) will extend ItemAxe. For example, the base class for Tinkers' Construct's tools extends Item and the harvest tools override Forge's harvest level/tool class methods (like Item#getToolClasses) to determine the tool classes based on the tool type and the harvest levels based on the tool's materials.
-
You need to supply the actual tool ItemStack that the player has placed in the machine so that mods like Tinkers' Construct can read the NBT and determine the harvest level based on it. If you supply an empty ItemStack or one without any NBT, Tinkers' Construct won't know what the harvest level is.
-
[SOLVED][1.8] With built JAR, it crashes with NoClassDefFoundError
Choonster replied to jabelar's topic in Modder Support
The MCP to SRG obfuscation performed by the build Gradle task only changes field and method names, class names are always the same between MCP and SRG. This means that NoClassDefFoundError can't be caused by lack of reobfuscation. Usually it's caused by accessing a client-only class from code that runs on the dedicated server. -
[SOLVED] [1.12] NoSuchMethodError for getSlotFor
Choonster replied to IceMetalPunk's topic in Modder Support
@SideOnly restricts classes, methods and fields to a specific physical side. The integrated server runs on the physical client, so it has access to things annotated with @SideOnly(Side.CLIENT) (though it should never actually use these). The dedicated server runs on the physical server, which doesn't have access to things annotated with @SideOnly(Side.CLIENT). Use InventoryPlayer#hasItemStack to check if an ItemStack is anywhere in a player's inventory, matching the Item and metadata but not the NBT or capabilities. -
[SOLVED] [1.12] NoSuchMethodError for getSlotFor
Choonster replied to IceMetalPunk's topic in Modder Support
InventoryPlayer#getSlotFor is a client-only method (i.e. it's annotated with @SideOnly(Side.CLIENT)), so it doesn't exist on the dedicated server and can't be used from common code (like an event handler running on the logical server). -
Event handlers with the same priority are called in the order that they were registered in. This isn't documented, so it's probably best to consider it an implementation detail that shouldn't be relied upon.
-
Tried to launch Forge 1.12.2 but kept launching Vanilla game
Choonster replied to CCro's topic in Support & Bug Reports
The forge launcher profile isn't actually configured to use a Forge version. You need to set it to a Forge version in the Launch Options tab. -
That doesn't appear to be the FML log. Please find the file named fml-client-latest.log in the logs folder of the game directory and then upload it to Gist and link it here.
-
Post the FML log (logs/fml-client-latest.log in the game directory) using Gist or Pastebin. This should tell us why it's crashing.
-
I explained how to sync item capabilities here:
-
Is the block under the cross hairs a door?
Choonster replied to fuzzybat23's topic in Modder Support
That code looks like it's from a Bukkit plugin (or a plugin for a similar system) rather than an old Forge mod. You need to use IBlockState#getValue to get the values of the various properties stored in the BlockDoor class from the state. This will tell you the door's facing and hinge position diesieben07 explained which properties you need and which block to get their values from earlier in the thread. -
Is the block under the cross hairs a door?
Choonster replied to fuzzybat23's topic in Modder Support
I must have confused getHitVec with the hitX/Y/Z arguments of Block#onBlockActivated, which I'm pretty sure are between 0 and 1. I don't have my IDE in front of me, so I might be mistaken (again). Edit: The hitX/Y/Z arguments of Block#onBlockActivated are between 0 and 1. -
Is the block under the cross hairs a door?
Choonster replied to fuzzybat23's topic in Modder Support
getHitVec is the position on the block that the player clicked (in the range 0-1), not the position of the block in the world.