I strongly recommend updating straight to 1.12.1, or at least 1.11.2. 1.10.2 is no longer being actively maintained.
The FontRenderer#colorCode field contains the colours for each colour code. These are used by FontRenderer#renderStringAtPos, which is (indirectly) called by FontRenderer#drawString(String, float, float, int, boolean) and FontRenderer#renderStringAligned.
The former is public and can be directly overridden, but the latter isn't; you'll need to override FontRenderer#drawSplitString (which indirectly calls it) instead.
You'll need to extend FontRenderer and override these methods to do the same thing as the super methods, but call your own methods instead of FontRenderer's private methods. You'll need to handle the custom colour codes in your copy of the FontRenderer#renderStringAtPos method.
I checked EntityList#init, and the id for chicken is "chicken". It worked in my development space like "id": "chicken". Is there any disadvantage to using this approach? (Future compatibility, etc.)
The ID/registry name is converted to a ResourceLocation, so the domain defaults to minecraft if not specified. If you don't specify a domain, ItemMonsterPlacer will automatically replace the specified registry name with the full registry name (including the domain) when it's first accessed.
It will work without specifying a domain, but it's best to be explicit.
Spawn Eggs don't use metadata in 1.9+, the registry name of the spawned entity is stored in NBT instead. Look at ItemMonsterPlacer#applyEntityIdToItemStack to see how the NBT structure is created.
PlayerEvent.Clone is fired when a player is cloned after respawning from death or returning from The End. You can use this to copy the inventory from the old player to the new one if they have the right item.
If you're using Windows, files on disk (e.g. assets in your development environment) have case-insensitive names. Files in JARs (e.g. assets in your compiled mod) always have case-sensitive names.
IBlockProperties (which is extended by IBlockState) has a getter method for most properties. For other properties, look for getter methods in the Block class.
ToACraftingCategory#getTooltipStrings returns null, which causes this NullPointerException when JEI calls ArrayList#addAll(Collection<? extends E>) with the null value.
JEI uses @Nonnull/@Nullable annotations, so your IDE should warn you about returning null from a @Nonnull method or an unannotated method overriding a @Nonnull method. You should use these annotations in your code as well, I recommend copying the package-info.java file from a vanilla package into every one of your packages so methods and parameters are @Nonnull by default.
In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
It's much easier to read code with proper formatting and syntax highlighting.
Have you considered using the Chisel Team fork of Chisel instead of Chisel 3? It's already been updated to 1.10.2, 1.11.2 and 1.12 and is being actively maintained.
When asking for help with an exception, post the full exception and its stacktrace using Gist or Pastebin.
The most likely issue is that you haven't registered the SharedMonsterAttributes.ATTACK_DAMAGEIAttribute for your entity, do this by calling AbstractAttributeMap#registerAttribute in your override of EntityLivingBase#applyEntityAttributes.
You don't need to do this for the other IAttributes because they're already registered by the super classes.
Strings can't be compared with the == operator, you need to use the String#equals method.
Don't convert objects to Strings to compare them, compare the objects directly.
TileEntity#getTileData is for storing your own data on external TileEntities (i.e. TileEntities added by vanilla or another mod), you should use regular fields to store data in your own TileEntities. It shouldn't really be used at all, the Capability System should be used to store your own data on external TileEntities.
UUIDs shouldn't be stored as Strings in NBT, they should be stored as a pair of longs (the most and least significant bits). NBTTagCompound has UUID-specific methods that do this for you.
When you have an if statement that does nothing but return true or false, you can simply return the value of the if statement's condition instead.
In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
It's much easier to read code with proper formatting and syntax highlighting.
0
I strongly recommend updating straight to 1.12.1, or at least 1.11.2. 1.10.2 is no longer being actively maintained.
The FontRenderer#colorCode field contains the colours for each colour code. These are used by FontRenderer#renderStringAtPos, which is (indirectly) called by FontRenderer#drawString(String, float, float, int, boolean) and FontRenderer#renderStringAligned.
The former is public and can be directly overridden, but the latter isn't; you'll need to override FontRenderer#drawSplitString (which indirectly calls it) instead.
You'll need to extend FontRenderer and override these methods to do the same thing as the super methods, but call your own methods instead of FontRenderer's private methods. You'll need to handle the custom colour codes in your copy of the FontRenderer#renderStringAtPos method.
1
The ID/registry name is converted to a ResourceLocation, so the domain defaults to minecraft if not specified. If you don't specify a domain, ItemMonsterPlacer will automatically replace the specified registry name with the full registry name (including the domain) when it's first accessed.
It will work without specifying a domain, but it's best to be explicit.
1
Chicken is the old name for EntityChicken, the current registry name is minecraft:chicken.
See the wiki or the EntityList.init method for the registry names of vanilla entities.
Apart from that, your NBT structure (and the JSON representation of it) are correct.
0
Spawn Eggs don't use metadata in 1.9+, the registry name of the spawned entity is stored in NBT instead. Look at ItemMonsterPlacer#applyEntityIdToItemStack to see how the NBT structure is created.
0
PlayerEvent.Clone is fired when a player is cloned after respawning from death or returning from The End. You can use this to copy the inventory from the old player to the new one if they have the right item.
0
If you're using Windows, files on disk (e.g. assets in your development environment) have case-insensitive names. Files in JARs (e.g. assets in your compiled mod) always have case-sensitive names.
0
Use Entity#extinguish to extinguish the fire on an Entity.
0
IBlockProperties (which is extended by IBlockState) has a getter method for most properties. For other properties, look for getter methods in the Block class.
1
ToACraftingCategory#getTooltipStrings returns null, which causes this NullPointerException when JEI calls ArrayList#addAll(Collection<? extends E>) with the null value.
JEI uses @Nonnull/@Nullable annotations, so your IDE should warn you about returning null from a @Nonnull method or an unannotated method overriding a @Nonnull method. You should use these annotations in your code as well, I recommend copying the package-info.java file from a vanilla package into every one of your packages so methods and parameters are @Nonnull by default.
In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
It's much easier to read code with proper formatting and syntax highlighting.
0
Have you considered using the Chisel Team fork of Chisel instead of Chisel 3? It's already been updated to 1.10.2, 1.11.2 and 1.12 and is being actively maintained.
1
You need to override EntityLivingBase#attackEntityAsMob to deal damage to the Entity argument.
For examples, look at EntityWolf or EntityMob.
0
I use Class#member to refer to non-static fields/methods of Class called member. I use Class.member to refer to static fields/methods.
Yes, that's what you need to do.
0
You should be able to register your own IBlockColors for the vanilla Blocks to replace the vanilla IBlockColors.
0
When asking for help with an exception, post the full exception and its stacktrace using Gist or Pastebin.
The most likely issue is that you haven't registered the SharedMonsterAttributes.ATTACK_DAMAGE IAttribute for your entity, do this by calling AbstractAttributeMap#registerAttribute in your override of EntityLivingBase#applyEntityAttributes.
You don't need to do this for the other IAttributes because they're already registered by the super classes.
0
There are several issues with your code:
In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
It's much easier to read code with proper formatting and syntax highlighting.