Everything posted by Choonster
-
[1.11][SOLVED] Dual Input Recipes Issue
Use ItemStack#isItemEqual or ItemStack.areItemsEqual to check if the Item and metadata of the two ItemStack s are equal. Use ItemStack.areItemStacksEqual to check if the Item , metadata and NBT of the two ItemStack s are equal.
-
[SOLVED] Unfinished IntelliJ setup?
The folders are highlighted in red because they've been marked as excluded. This is because they contain internal/auto-generated files that aren't relevant to the project. Gradle will skip tasks if they don't need to be run (e.g. if current and valid output already exists). These are marked with the orange circle with lines through it in IDEA's Gradle Run window. Neither of these are problems.
-
[1.11] how do i create a large block 3 x 3 x 1 inc bounding box and rotate it
Immersive Engineering uses OBJ models for its multiblocks, which can be larger than 3x3x3. It's only JSON models that have the size restriction.
-
[1.10] Double Input Furnace not smelting.
Click on the margin between the line numbers and the code.
-
[1.10.2] Damage the entity more when the player is sprinting
ItemSword 's override of Item#hitEntity doesn't deal any damage, that's handled by EntityPlayer#attackTargetEntityWithCurrentItem .
-
[1.10.2] Damage the entity more when the player is sprinting
You'll probably want to override Item#hitEntity to check if the player is sprinting before dealing the bonus damage.
-
IItemColor Not working correctly
Post the code where you register your IItemColor . Is your IItemColor#getColorFromItemstack method ever called?
-
[1.10] Blockstates and Item Models
[19:06:56] [Client thread/WARN]: Unable to resolve texture due to upward reference: #cross in oreflowers:models/block/item/flower Don't set layer0 to #cross in the model, do it in the blockstates file. Textures in models can't reference a texture defined in the same model. [19:06:57] [Client thread/ERROR] [FML]: Exception loading model for variant oreflowers:oreflowers1#flower_type=leadplant for blockstates ["oreflowers:oreflowers1[flower_stalk=false,flower_type=leadplant,item=true]", "oreflowers:oreflowers1[flower_stalk=false,flower_type=leadplant,item=false]"] Your blockstates file doesn't include the flower_stalk property. Edit: I see you've fixed this. I've created a sapling that uses the vanilla variants and defines the item models using Forge's blockstates format. You can see it for 1.10.2 here or 1.11 here (there's no difference in the sapling code, but each of these links is for a separate branch of the repository with code for that version).
-
Another thing...
That's diesieben07's signature. It's not addressed to you.
-
[1.10] Blockstates and Item Models
You'd need to have a property to determine the model that's true for items and false for blocks. Completely ignore it in your Block so it defaults to false , but set it to true for the variant of your Item 's ModelResourceLocation . You then need to create a model that extends item/generated (or the appropriate item model) and put it somewhere in assets/<modid>/models/block so it's accessible from your blockstates file. When the property is true , use this model; else use block/cross . You'll also need to set the layer0 texture to #cross in your defaults section (i.e. use the cross texture as layer0 ).
-
mod will not build/compile
You can see how I tell Gradle to compile my mod against Java 8 here.
-
[1.11] Add a custom event?
Why do you need an event? Where is it going to be fired from? Who's going to subscribe to it, and why? Create a class that extends net.minecraftforge.fml.common.eventhandler.Event . To fire it, create an instance and call EventBus#post .
-
MC1.10+ drops from leaves
I don't know. Post your code.
-
[1.11] Locate command
Create a thread in the Suggestions section or open an issue on GitHub.
-
[1.11] Locate command
If you follow the methods used by CommandLocate , you'll see that it eventually calls IChunkGenerator#getStrongholdGen . ChunkProviderOverworld , ChunkProviderNether and ChunkProviderEnd all implement this using a chain of ternary operators with hardcoded structure names. ChunkProviderFlat implements it with a Map populated from the flat generator settings. What this means is that the /locate command only supports the vanilla structures. You could request for a way for the command to find modded structures, but this may or may not be accepted.
-
NonNullList for 1.10?
Your post is confusing. Your title mentions 1.10 and your post says that you're updating, but you're referencing classes and methods ( NonNullList and func_190926_b ) that only exist in 1.11. Which version are you updating from and which version are you updating to? func_190926_b was renamed to isEmpty . You can use MCPBot to view the current and previous names of fields and methods.
-
MC1.10+ drops from leaves
BlockEvent.HarvestDropsEvent will be fired when leaves decay naturally or are broken by a player. This is the event you should use. Metadata should be considered an implementation detail, don't check for specific values of it. Instead, use IBlockState#getValue to get the value of the appropriate property.
-
Modding Tutorials
There's a collection of them here.
-
TileEntity Map is missing.
You need to register a name for your TileEntity class with GameRegistry.registerTileEntity in preInit.
-
How to make custom fluid [1.10.2]
There's a list of tutorials here, but unfortunately none of them cover fluids. It's not a tutorial, but you can see how I've implemented fluids in my mod here: creation/registration, model registration, blockstates file
-
IItemHandler and Capability attempt [1.10.2]
That looks correct. I believe LexManos is strongly against the Forge documentation containing any "copy-pasta" code, i.e. fully working code blocks with minimal explanation apart from "copy this code into your code to make it work". If you have some well-documented example code, it may be added (though I don't speak for the Forge team).
-
Learning to Mod.
There's a list of tutorials here.
-
Liqiud .json?
You need to register an IStateMapper for your Block that ignores the state and always returns a constant ModelResourceLocation . The registerFluidModel method in my mod (linked in my previous post) does this.
-
IItemHandler and Capability attempt [1.10.2]
The whole point of the Capability system is that you don't implement interfaces on your TileEntity , instead you store the objects in the TileEntity and override the ICapabilityProvider methods to return them. Forge's documentation explains this in more detail here. I also have a simple explanation here. Don't implement IItemHandler on your TileEntity . Either use the CapabilityItemHandler.ITEM_HANDLER_CAPABILITY field directly or annotate your own field with @CapabilityInject . Don't use the existing field to initialise your own. Don't store the ItemStack array, only interact with your inventory through the ItemStackHandler ItemStackHandler implements INBTSerializable , use this to write it to and read it from NBT
-
[1.11] recompileMc fails when using snapshot_20161118 mappings
Using a fresh 1.11-13.19.0.2149 MDK with the mappings set to snapshot_20161118, the recompileMc task fails with a compilation error: Full log.
IPS spam blocked by CleanTalk.