Everything posted by Choonster
-
[1.8] Change block model based on damage
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.
-
just re-installed everything fresh with new forge but...
"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.
-
[1.7.10] How do you make sword stats based on NBT?
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).
-
Crash/Error in server-side
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.
-
just re-installed everything fresh with new forge but...
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.
-
Removing Vanilla Recipes
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:
-
World won't load.
Gist is a similar site with a much higher limit. It will accept full FML logs.
-
[1.7.10] How do you make sword stats based on NBT?
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
-
[Solved] [1.8] onBlockPlacedBy and onBlockPlaced Not Working
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.
-
[1.8]Adding a mod into a workspace doesn't work
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.
-
Make a forge server multiplayer for play with mods on my computer
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.
-
Client side mod not working on server
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 .
-
how to you get the world without a method. 1.7.10
FYI: The OP's code is adapted from an example I provided in their previous thread.
-
[1.8] Item (and maybe Block) name and getName
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 .
-
Special Armor Rendering
It's the same as in 1.7.10.
-
Let Blocks react on entity impact?
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.
-
Select mcp working directory for deobfuscator?[Whats that]
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).
-
Select mcp working directory for deobfuscator?[Whats that]
Are you using CodeChickenCore? It requires MCP mappings to do runtime deobfuscation of mods.
-
[Solved] [1.8] Block#setLightLevel not working
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.
-
[Solved] [1.8] Block#setLightLevel not working
Block bounds are on a scale of 0 to 1. A full block is length 1 on each side.
-
Despawn an Entity and Spawn Block.
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.
-
HashMap of ItemStacks?
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.
-
[1.7.10] @SideOnly(Side.CLIENT) Not use it anymore?
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 .
-
Error at Rootmodel??
Look at the log file, then. It should be in the logs folder of your Minecraft directory.
-
Error at Rootmodel??
Well what's the actual error that's thrown? Is it a StackOverflowError ?
IPS spam blocked by CleanTalk.