Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


Forge Modder
  • Content Count

  • Joined

  • Last visited

Community Reputation

9 Neutral

About cad97

  • Rank
    Stone Miner


  • Gender
  • URL
  • Personal Text
    Short time modder, longer time coder

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. If my debug-crawling through the startup code is accurate, the current order is something like (trimmed to relevant items): The effect of this is that during the IRecipe registration event, vanilla JSON recipes are in the registry but forge-loaded ones are not. It would be more consistent to load all JSON recipes before firing the programmatic registration event. What's the reason I want this? During the recipe registration event, it is possible to remove vanilla JSON recipes: @SubscribeEvent public static void registerRecipes(RegistryEvent.Register<IRecipe
  2. ob·fus·ca·tion ˌäbfəˈskāSH(ə)n/ noun noun: obfuscation; plural noun: obfuscations the action of making something obscure, unclear, or unintelligible. "when confronted with sharp questions they resort to obfuscation" The Minecraft source is obfuscated. That's where the unreadable parameter names come from (effectively). MCP is the community's mapping of these machine-generated names back into human-readable forms.
  3. Whoops. I could have sworn I gave a once-over for a proper board. Can this be moved or should I re-post? (@Draco18s) EDIT: reposted
  4. TL;DR reproduction case: import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import org.apache.logging.log4j.Logger; @Mod(modid = "itemstackholder") public class ISHMod { private Logger logger; @GameRegistry.ObjectHolder("minecraft:iron_bars") private static Item itemIronBars; @GameRegistry.ItemStackHolder("m
  5. The new rendering system uses JSON resources to specify item model rendering. You can see a basic working example here: http://modwiki.temporal-reality.com/mw/index.php/Render_Item_Basic-1.9 The correct registration call is ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation("itemID", "inventory")); And a JSON file located at main/resources/assets/<yourmod>/models/item/itemID.json { "parent": "builtin/generated", "textures": { "layer0": "modID:items/itemtexture" }, "display": { "thirdperson": { "rotation": [ -90, 0
  6. I noticed that net.minecraft.Block::isOpaqueCube(IBlockState) is @Deprecated. What is the preferred method of achieving a non-opaque block, in this case? Was the method deprecated incorrectly or is there a better way to achieve the same effect as overriding the method to return false? (I am looking at forgeSrc-1.10-
  7. Thanks, that's exactly what I needed. (And duh, I've done that before. Why didn't I think of that.)
  8. Between two versions of my mod I've changed how data on an item is stored. I can easy convert to the new version, but where is the best place to call that update routine? I want a way to call updateToNewVersion(ItemStack) (for example) on all ItemStacks of one custom Item only one time if they need updating. (They need updating if they have non-zero metadata and no NBT tags.)
  9. That's the answer I hoped not to hear, but it wasn't as hard to implement as I feared. Commit of solution here. I can't shake the feeling that I could have done NBTSensitiveShapedRecipe better though. All but 6 lines (effectively less) of the actual work methods are direct rips from the superclass ShapedRecipes, and copy/pasting code is a bad practice -- I mean OOP is about reusing code. The thing is the only way I saw to override checkMatch() (which is what I needed to add those 6 lines to) was to point matches() at a new version, as it is a private member of the superclass and as such c
  10. I'm trying to move my mod SpawnerCraft over to the new EntityRegistry system: i.e. looking at Strings and checking those against Forge's database instead of using the ID system used by Spawn Eggs as of old. This means that I've moved from using metadata to specify the mob in an item to an NBT tag. I need help creating a NBT sensitive recipe. I have my current recipe registration here but apparently the NBT tag on the ingredient is not considered in this way. It always gives out for creepers (the first on the EntityEgg list). How can I register a recipe that requires the same NBT data
  11. cad97

    Config GUI

    Aaaand I'm a derp. configuration.get() takes the category then the field while configuration.getBoolean() takes the field and then the category. I switched them up and got weird results. It works though now!
  12. You need to use this method: /** * Gets the block's texture. Args: side, meta */ @SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) In BlockSapling the body is this: { p_149691_2_ &= 7; return field_149881_b[MathHelper.clamp_int(p_149691_2_, 0, 5)]; } So looking at your code the body should look something like this: { p_149691_2_ &= 7; // Though I don't know exactly what this is for, I would keep it as long as it won't cause a problem. // This is
  13. Thanks, diesieben, for clarifying, and jabelar and WorldsEnder for posting their .gitignores. I've got what I need now, thanks!
  14. It took me a while to find, but I got it. I'd looked before for the solution you suggested, jabelar, by going through the event.harvester options, but not found it. Looking at the stacktrace for event.isSilkTouching, though, I was able to find the call required: EnchantmentHelper.getSilkTouchModifier(event.harvester) . Looking more at isSilkTouching it does only seem to be true for silktouch-able blocks.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.