-
Posts
5170 -
Joined
-
Last visited
-
Days Won
77
Everything posted by Choonster
-
Override Item#hasCustomEntity to return true and Item#createEntity to return a new instance of FragEntityItem at the same position as the Entity argument.
-
It works for me in the development environment and the deobfuscated client. Are you sure you're actually creating and registering an instance of your Block class? Does it have a bounding box smaller than a full block?
-
Whoops, that is indeed the method's name. I've edited my post.
-
[1.8] Tooltip formatting breaks after the mod has been built
Choonster replied to Ferrettomato's topic in Modder Support
Like diesieben07 said, it will work if you use UTF-8 everywhere. I assumed that your code was already saved as UTF-8, I didn't realise that the section sign is also present in older encodings like Windows-1252. You can see an example of this here (lang file is here). It looks like this in the obfuscated client. Edit: Added missing closing tag -
[SOLVED] [1.8] Strange AbstractMethodError Crash With Lambda
Choonster replied to Choonster's topic in Modder Support
Thanks diesieben07, that works perfectly. I looked at the bytecode earlier using Bytecode Viewer and noticed the INVOKEDYNAMIC instruction (though I wasn't fully aware of what it did), but it seems that the program doesn't know how to display it properly. -
[SOLVED] [1.8] Strange AbstractMethodError Crash With Lambda
Choonster replied to Choonster's topic in Modder Support
Lambdas can be used in place of any interface with a single method (like ItemMeshDefinition ), they act like an implementation of the interface with the lambda's body as the method body. This works in the development environment, just not in the obfuscated client. -
[SOLVED] [1.8] Strange AbstractMethodError Crash With Lambda
Choonster replied to Choonster's topic in Modder Support
Yes, it's just mapping to a constant model location regardless of the ItemStack 's metadata/NBT. -
Mods comparability issue with server crash on startup
Choonster replied to trevorb221's topic in Support & Bug Reports
ClientSidedHorsesMod / Better Archery / BetterBowsMod1.6.4.zip is trying to load a client-only class on the server. This is an error with the mod, report it to the author (if they're still maintaining it) and remove it from the server and clients. -
Implement ItemMeshDefinition (either in an anonymous class or a normal class depending on how complex the model selection logic is) and return the appropriate ModelResourceLocation based on the ItemStack . Register the implementation with ModelLoader.setCustomMeshDefinition in preInit or ItemModelMesher#register in init. You'll also need to call ModelBakery.addVariantName with the names of all possible models so they're loaded by Minecraft (this can be done in preInit or init). Edit: The method is called ModelBakery.addVariantName , not addVariant
-
I've run into a strange issue where using a lambda to implement ItemMeshDefinition crashes the game with an AbstractMethodError any time the item is rendered in a GUI. This only happens in the obfuscated client, not in the development environment. I've set up a small test case here. The lambda is used here. To reproduce, simply open the mod's creative tab or spawn in its block. The block will render without issue in the world, but as soon as it's rendered in a GUI or a player's hand the game crashes. You can see the crash report here. Does anyone know why this happens or how to fix it? It seems like it may be some weird interaction between lambdas and the reobfuscation process.
-
[1.8] Tooltip formatting breaks after the mod has been built
Choonster replied to Ferrettomato's topic in Modder Support
You need to make Gradle compile your code as UTF-8 by adding this to build.gradle: tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } -
The method that the OP is using will work if the block has a bounding box smaller than a full block. An offset of 0.01 on each side is enough to allow entities (including items) to collide with the block. Make sure you're actually overriding Block#onEntityCollidedWithBlock(World, BlockPos, IBlockState, Entity) (called when any entity collides with the block) and not Block#onEntityCollidedWithBlock(World, BlockPos, Entity) (called when an entity that returns true from Entity#canTriggerWalking walks on top the block). This basic demonstration spams the log when an item collides with the block.
-
Use the setRaining , setRainTime , setThundering and setThunderTime methods of WorldInfo ( World#getWorldInfo will return the World 's WorldInfo instance). This should be done on the server, the clients will be automatically notified of the change.
-
[1.8] Alternative for ISimpleBlockRenderingHandler
Choonster replied to Bedrock_Miner's topic in Modder Support
Yes that's exactly what I meant. Is this already implemented in Forge? Because it could make things a lot easier if you have many, many state properties. (However, I still prefer code) Yes, it's implemented. You can see the code behind the example in the docs here and the blockstates file and item/block models here. I created a model similar to a BuildCraft pipe using this system here. -
error when running forge modded server
Choonster replied to pooyarezaee's topic in Support & Bug Reports
One of Ars Magica 2's potions is configured with the same ID as RotaryCraft's Freeze potion (ID 35). Edit the potion IDs in the config file of either mod so they don't conflict. If you can get a client running with the same mods (after fixing any potion ID conflicts from Reika's mods), NEI can tell you which potion IDs are being used and which are free: open your inventory, then go to Options -> Tools -> Data Dumps and click "Dump" next to "Potions". -
In game skin changer only works in dev environment
Choonster replied to Dijkstra's topic in Modder Support
In the obfuscated (non-development) environment, there's no field called locationSkin ; instead it has the SRG name field_110312_d . FML's ObfuscationReflectionHelper#setPrivateValue allows you to pass both the deobfuscated (MCP) and obfuscated (SRG) names of the field to set the value of. Either use it directly or adapt the logic to your class. Make sure you only reference client-only classes like Minecraft and AbstractClientPlayer from client-side code (i.e. only register your event handler in your client proxy). Edit: The SRG name of AbstractClientPlayer#locationSkin in 1.7.10 is actually field_110312_d . field_178865_e is the SRG name of NetworkPlayerInfo#locationSkin field in 1.8. -
[1.7.10][Solved] How to conditionally disable player hp regeneration
Choonster replied to Thornack's topic in Modder Support
Looking at the changelog, it was added in 1.7.10-10.13.2.1256 and 1.8-11.14.0.1257. -
getAccessTransformerClass should return the full name of your class (e.g. com.yourname.yourmod.AccessTransformer ), not just the class name. You should currently be getting an error in the log for your access transformer class. Do you really need everything in Entity to be public?
-
Requesting explanation of recipe handlers
Choonster replied to dualinfinities's topic in Modder Support
You shouldn't need to touch CraftingManager if all you're doing is creating a custom recipe type. Just implement the IRecipe interface and add instances of your recipe class using GameRegistry.addRecipe(IRecipe) . -
[1.8] [TEXTURE ERRORS]: domain minecraft is missing textures
Choonster replied to Hackbaellchen's topic in Modder Support
Your models must not have included the resource domain (your mod ID) in their texture paths. i.e. use modid:items/TextureName instead of items/TextureName. -
Could you step through the code in a debugger and figure out which methods are returning null ? For the getPlayerInfo reflection call, it must be Class#getDeclaredMethod returning null (unless getPlayerInfo itself is throwing the exception). I don't know what your ManagerReflection.setField method looks like. It should be noted that ReflectionHelper calls setAccessible(true) on Method s and Field s before using them, you should probably do this too. Edit: Your current code will only work in the development environment, since there's no NetworkPlayerInfo#locationSkin field in the obfuscated client (where it uses its SRG name instead).
-
registerModEntity prefixes the entity's name with your mod ID followed by a period, so the full name of your mob is "<yourmodid>.TutorialMob" .