Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Choonster

Moderators
  • Joined

  • Last visited

Everything posted by Choonster

  1. You need to override getMetaFromState , just ignore the DAMAGE property in it. getStateFromMeta will always return the default state if you don't override it, which is what you want in this case.
  2. "I can't upgrade" is pretty much never a valid statement. I think there's a few older versions of OS X that don't support it, but I'm not entirely sure. The OP should definitely upgrade if possible.
  3. ItemStack#writeToNBT will write an ItemStack to an NBTTagCompound . You should be able to save the EnumChatFormatting as a string (i.e. store the result of the toString method).
  4. The first error is caused by not having NEI installed. The second error is caused by having the wrong version of Chisel Facades installed. You're using Cricket's Chisel 2 but have a Chisel Team version of ChiselFacades installed. Either switch to Chisel Team's Chisel or to a Cricket version of Chisel Facades. I explain which version of Chisel Facades to use for each version of Chisel on the CurseForge page.
  5. You've run out of PermGen memory. You should upgrade to Java 8, which no longer uses PermGen. If you can't upgrade, increase the maximum PermGen with the MaxPermSize command line argument.
  6. Recipes for Dyes and coloured blocks (e.g. Stained Clay) are added by RecipeDyes#addRecipes , which is called from the CraftingManager constructor. They're just standard shaped/shapeless recipes, so your method should remove them without issue. Fireworks recipes are handled by the RecipeFireworks class, which returns null from IRecipe#getRecipeOutput until IRecipe#matches has found a matching recipe; so you can't remove it based on the output Item . You can remove it based on the class instead, though. You can see a working example of this for 1.8 here. This outputs the following to the log:
  7. Gist is a similar site with a much higher limit. It will accept full FML logs.
  8. Look for Item methods that take an ItemStack parameter, you can use this to read the values from the NBT. Attack damage: override getAttributeModifiers(ItemStack stack) (look at ItemSword to see how it adds the attack damage modifier) Durability: override getMaxDamage(ItemStack stack) Enchantability: override getItemEnchantability(ItemStack stack) Repair item: override getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_) (the arguments are the items in the left and right slots of the anvil respectively) Name colour: override getRarity(ItemStack p_77613_1_) (for one of the default rarity colours) or getItemStackDisplayName(ItemStack p_77653_1_) (for custom colours using EnumChatFormatting ) Size: Not entirely sure, but you probably want to implement IItemRenderer
  9. Are you looking at the IDE's console or the log file itself? Messages with a Level less specific than INFO (i.e. DEBUG , TRACE or ALL ) won't be written to the standard output (i.e. the IDE's console), but will be written to the log file.
  10. You're trying to call methods with SRG (obfuscated) names in the deobfuscated environment. The two most likely reasons for this are that it was built for the obfuscated environment or that it was built using an older version of the MCP mappings. To build a mod for the deobfuscated environment, use gradlew jar instead of gradlew build (which reobfuscates the mod). You can change the MCP mappings version using the minecraft.mappings variable in your build.gradle script.
  11. This is the wrong section, but the thread will probably be moved for you. We need the full FML log (logs/fml-server-latest.log) to help you. Upload it to Gist and link it here.
  12. It looks like you're reinventing the command system. You should create a class that implements ICommand (extending CommandBase will handle a lot of stuff for you) for each of your commands and then register them with ClientCommandHandler#registerCommand .
  13. FYI: The OP's code is adapted from an example I provided in their previous thread.
  14. This is just Wuppy's style, it's not required (or used at all) by Forge. He just uses it to store the name passed to GameRegistry.registerBlock .
  15. It's the same as in 1.7.10.
  16. The following advice assumes you're using 1.8. It's pretty similar in 1.7.10. Block#onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) is called when an Entity collides with the Block . The other overload is only called when an Entity walks on top of the Block . An Entity will only collide with a Block if it has a bounding box smaller than a full cube. An offset of 0.01 on each side is enough to allow collisions.
  17. You need to point it to an MCP conf directory. For 1.7.10, you can find this in ~/.gradle/caches/minecraft/net/minecraftforge/forge/<version>/unpacked/conf (replace ~ with %USERPROFILE% on Windows).
  18. Are you using CodeChickenCore? It requires MCP mappings to do runtime deobfuscation of mods.
  19. Instead of setting the block bounds directly, you should override Block#setBlockBoundsBasedOnState and set the bounds there. Block is a singleton, so calling Block#setBlockBounds modifies the bounds for all occurrences of the block. setBlockBoundsBasedOnState should be called before the bounds are queried.
  20. Block bounds are on a scale of 0 to 1. A full block is length 1 on each side.
  21. In 1.8, you can use Entity#onKillCommand to kill an Entity . Entity#getPosition will return the Entity 's current position as a BlockPos . Use World#setBlockState to set the block state at the specified position and World#setBlockToAir to set the block at the specified position to air.
  22. ItemStack doesn't override the hashCode method, so two instances are treated as different keys even if they share the same contents. To use an ItemStack as a key, you'll need a wrapper class that overrides hashCode to return the hash code of the ItemStack 's contents; com.google.common.base.Objects#hashCode will combine the hash codes of multiple objects for you. Exactly which parts of the ItemStack you use in the hash code depends on your requirements: Do you only care about the Item , stack size and metadata; or do you include the NBT as well? NBTTagCompound overrides hashCode to return the hash of its contents, so you don't need to calculate that yourself.
  23. You can use as many annotations as you want. You should always use @Override when overriding a method and @SideOnly when overriding a method with @SideOnly .
  24. Look at the log file, then. It should be in the logs folder of your Minecraft directory.
  25. Well what's the actual error that's thrown? Is it a StackOverflowError ?

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.