Hm, I've been borowsing, and now I'm not sure where that override should go. Should I make a new material type for the block? Or when is it called?
Both the methods I mentioned are methods of the Block class (hence the Block in the ClassName#methodName notation), so they can only be overridden in a class that extends from Block (the class used to implement your block).
This tutorial explains override methods in more detail.
You probably need to override Block#isOpaqueCube to return false and Block#getBlockLayer to return CUTOUT or CUTOUT_MIPPED. You can see how this is handled for Glass in BlockGlass and BlockBreakable.
This post by The Grey Ghost explains block rendering (including layers) in more detail.
Override Item#hitEntity and use EntityLivingBase#addPotionEffect. The second argument of hitEntity is the Entity that was attacked, the third is the Entity that did the attacking.
Event handler method need to have the @SubscribeEvent annotation and exactly one parameter: the Event that they handle. This tutorial explains event handlers in more detail.
Your current code won't work properly, since you set PlayerHurt to true every time any living Entity takes damage. Instead of using PlayerTickEvent, you should use LivingHurtEvent and check if the Entity is an instance of EntityPlayer. If it is, check that they're wearing the right armour with the right enchant and add the speed effect.
You should also check that chest is not null before you check which Item it contains.
An internal editor is an editor that runs inside Eclipse instead of as a separate program. GIMP probably won't be able to open these images unless you extract them from the JAR (plus you only need to view them, not edit them).
As far as I can see, Eclipse doesn't have an image viewer by default (please correct me if I'm wrong), so you may need to install a plugin like this to view images.
It looks like Eclipse is trying to open it in an external program rather than its own image viewer and then failing because it's inside of a JAR. Try following these instructions to make Eclipse use its its own image viewer.
On the server side (where mob loot is handled), EntityPlayerMP has a getStatsFile method that returns the player's StatisticsFile. You can call StatFileWriter#readStat (StatisticsFile extends from StatFileWriter) to get the value of a stat.
Check that equipped isn't null and that its itemID field is equal to this.itemID (the current item's ID). If this is true, add the potion effect to the player.
Adding a bow in 1.8 should be fairly similar to 1.7.10 with the exception of the bow's model. You can look at ItemBow to see the implementation of the vanilla bow.
You'll need use one model per pulling stage and override Item#getModel to return the appropriate model based on the bow's maximum use duration and the player's current use time. You can see how this is handled for the vanilla bow in RenderItem#renderItemModelForEntity.
The models for the bow are just regular item models with a slightly different rotation (though the same rotation values are used by all of the bow's models). You can see them in assets/minecraft/models/item, look for bow (normal model) and bow_pulling_0 - bow_pulling_2 (pulling models).
If you set a breakpoint in the ExampleOre#generate method and launch Minecraft in debug mode, is the breakpoint ever reached? Keep in mind that worldgen only happens in new chunks, so you might need to travel a large distance to trigger it.
If the breakpoint is reached, you can log the position of each vein you generate just after calling WorldGenMinable#generate in addOre. You can either use FMLLog (or a wrapper around it) or plain old System.out.printf/println calls.
I just cloned the latest code (commit 6108252818cbef280c0d788f45dddcb7eb29d098 - "fixed") from your GitHub repo and ran it debug mode (using Forge 1.7.10-10.13.4.1448-1.7.10 since you didn't include your build.gradle file in the repo), all of the IDs seem to have the correct value and dogs spawn in-game both naturally and with spawn eggs.
It should be noted that spawn eggs use global Entity IDs rather than mod-specific ones, so you're overwriting the ID to Class mappings for various vanilla entities (mostly non-living ones, but EntityLiving, EntityMob and EntityCreeper use IDs 48-50). This may not cause any issues since vanilla only seems to use the ID to Class mappings for living entities, but I'd recommend against doing it.
Your global IDs don't need to be the same as your mod-specific IDs, so you should use automatically-assigned free global IDs rather than manually specifying them. You can either use FML's EntityRegistry.findGlobalUniqueEntityId and registerGlobalEntityID (example) or find a free ID and add the mappings yourself (example).
If you use FML's EntityRegistry, you may want to prefix your entity names with your mod ID like I do in the first link so that entities with and without eggs use the same naming convention (using EntityRegistry.registerModEntity without registerGlobalEntityID does this for you).
0
Both the methods I mentioned are methods of the Block class (hence the Block in the ClassName#methodName notation), so they can only be overridden in a class that extends from Block (the class used to implement your block).
This tutorial explains override methods in more detail.
0
You probably need to override Block#isOpaqueCube to return false and Block#getBlockLayer to return CUTOUT or CUTOUT_MIPPED. You can see how this is handled for Glass in BlockGlass and BlockBreakable.
This post by The Grey Ghost explains block rendering (including layers) in more detail.
0
Override Item#hitEntity and use EntityLivingBase#addPotionEffect. The second argument of hitEntity is the Entity that was attacked, the third is the Entity that did the attacking.
0
Event handler method need to have the @SubscribeEvent annotation and exactly one parameter: the Event that they handle. This tutorial explains event handlers in more detail.
Your current code won't work properly, since you set PlayerHurt to true every time any living Entity takes damage. Instead of using PlayerTickEvent, you should use LivingHurtEvent and check if the Entity is an instance of EntityPlayer. If it is, check that they're wearing the right armour with the right enchant and add the speed effect.
You should also check that chest is not null before you check which Item it contains.
0
An internal editor is an editor that runs inside Eclipse instead of as a separate program. GIMP probably won't be able to open these images unless you extract them from the JAR (plus you only need to view them, not edit them).
As far as I can see, Eclipse doesn't have an image viewer by default (please correct me if I'm wrong), so you may need to install a plugin like this to view images.
0
http://www.minecraftforge.net/forum/index.php?topic=28228.0
It looks like Eclipse is trying to open it in an external program rather than its own image viewer and then failing because it's inside of a JAR. Try following these instructions to make Eclipse use its its own image viewer.
0
In 1.7 or higher you'd definitely compare the Item objects directly, but in 1.6.4 vanilla compares items by their ID.
1
On the server side (where mob loot is handled), EntityPlayerMP has a getStatsFile method that returns the player's StatisticsFile. You can call StatFileWriter#readStat (StatisticsFile extends from StatFileWriter) to get the value of a stat.
0
0
Check that equipped isn't null and that its itemID field is equal to this.itemID (the current item's ID). If this is true, add the potion effect to the player.
0
One of your referenced libraries should be forgeSrc-<version>. This contains the classes of both Minecraft and Forge.
ItemBow is in the net.minecraft.item package of this JAR.
0
Adding a bow in 1.8 should be fairly similar to 1.7.10 with the exception of the bow's model. You can look at ItemBow to see the implementation of the vanilla bow.
You'll need use one model per pulling stage and override Item#getModel to return the appropriate model based on the bow's maximum use duration and the player's current use time. You can see how this is handled for the vanilla bow in RenderItem#renderItemModelForEntity.
The models for the bow are just regular item models with a slightly different rotation (though the same rotation values are used by all of the bow's models). You can see them in assets/minecraft/models/item, look for bow (normal model) and bow_pulling_0 - bow_pulling_2 (pulling models).
1
It looks correct to me, but this blog post may help locate your problem. Make sure you read the linked introduction post as well.
0
If you set a breakpoint in the ExampleOre#generate method and launch Minecraft in debug mode, is the breakpoint ever reached? Keep in mind that worldgen only happens in new chunks, so you might need to travel a large distance to trigger it.
If the breakpoint is reached, you can log the position of each vein you generate just after calling WorldGenMinable#generate in addOre. You can either use FMLLog (or a wrapper around it) or plain old System.out.printf/println calls.
1
I just cloned the latest code (commit 6108252818cbef280c0d788f45dddcb7eb29d098 - "fixed") from your GitHub repo and ran it debug mode (using Forge 1.7.10-10.13.4.1448-1.7.10 since you didn't include your build.gradle file in the repo), all of the IDs seem to have the correct value and dogs spawn in-game both naturally and with spawn eggs.
It should be noted that spawn eggs use global Entity IDs rather than mod-specific ones, so you're overwriting the ID to Class mappings for various vanilla entities (mostly non-living ones, but EntityLiving, EntityMob and EntityCreeper use IDs 48-50). This may not cause any issues since vanilla only seems to use the ID to Class mappings for living entities, but I'd recommend against doing it.
Your global IDs don't need to be the same as your mod-specific IDs, so you should use automatically-assigned free global IDs rather than manually specifying them. You can either use FML's EntityRegistry.findGlobalUniqueEntityId and registerGlobalEntityID (example) or find a free ID and add the mappings yourself (example).
If you use FML's EntityRegistry, you may want to prefix your entity names with your mod ID like I do in the first link so that entities with and without eggs use the same naming convention (using EntityRegistry.registerModEntity without registerGlobalEntityID does this for you).