Everything posted by Siqhter
-
Blockstates Property for a Block
You mean like a separate model/blockstate file instead of subtypes?
-
Blockstates Property for a Block
Ok, that makes sense, thanks.
-
Blockstates Property for a Block
Well I just did this and it works fine. What is the reason for not overriding harvestBlock? drops.add(new ItemStack(this, 1, this.getMetaFromState(state)));
-
Blockstates Property for a Block
Sorry I do have one other question. Using harvestBlock how would I get it to drop the correct color block? Right now it just drops nothing.
-
Blockstates Property for a Block
Nevermind I actually just got that working as well. I created a SubItems interface with a ResourceLocation method, and registered items that are instances of SubItems in my RegistrationHandler under Items. Thanks for your help on this.
-
Blockstates Property for a Block
Got that working. I feel stupid, I had created a class that I planned to use for any block with subtypes, just forgot to register it in the BlockInit class as a new ItemBlock. It was the same type as ItemCloth that you just told me about. The textures in the inventory are still not registering, should I do the same with with a getSubItems subclass? I'm not sure how similar it is toSubBlocks. Thanks.
-
Blockstates Property for a Block
Ah, I didn't realize that. So I would need a separate class that sets hasSubtypes to true, overrides getMetadata, and a getUnlocalizedName method? Pretty much everything in the ItemCloth class?
-
Blockstates Property for a Block
Yeah sorry I've been meaning to do that. Something got messed up with an old mod's repository and I've been trying to fix it. Anyway this is how I register the block and itemblock, but I feel like that would only be an issue with it registering the texture in the inventory. And I should add, it does register the counter model block fine (on placed, and in the inventory), just not the subitems I create with the getSubItems method in my BlockCounter.java. So I'm pretty sure they're registered correctly. BlockInit.java RegistryHandler.java
-
Blockstates Property for a Block
On placing the block, it should be 1 of 16 different dye colors. Also the items in the creative menu should each be their own dye color. It's not a model issue, because they render when placed, just not with the correct color (they only render in white, which is the first color in the blockstates colors variants). Also the blocks work fine when applied with dyes (the blocks change to their respective color), so it's probably something in a method that I'm not adding. Below are my Block and TileEntity classes, as well as the blockstate file.
-
Blockstates Property for a Block
That's exactly what I thought. I'm assuming my problem is elsewhere then? I wasn't sure if maybe it's in onBlockPlaced or something.
-
Blockstates Property for a Block
Ok thanks. I was a little unclear because I thought I was only supposed to store FACING properties in the TE. This makes sense now.
-
Blockstates Property for a Block
So specify the color, with maybe, "dyeColor.get()"? I don't know what else to use.
-
Blockstates Property for a Block
Ok, but I'm still not sure what it wants me to pass in in addition to COLOR property.
-
Blockstates Property for a Block
I assume just the method?
-
Blockstates Property for a Block
Well, this is what it says it expects in the error: block.properties.IProperty<T>. But I don't think I really understand what it actually wants, other than COLOR, or rather what I'd pass in.
-
Blockstates Property for a Block
Sorry, I meant the IDE, as in the red underline. It still compiles. The only error I get is "withProperty()" in IBlockState cannot be applied to: IProperty<T> COLOR (EnumDyeColor)".
-
Blockstates Property for a Block
Ok, so would I return COLOR and FACING? Because right now it gives an error if I pass in COLOR.
-
Blockstates Property for a Block
I've been having issues with the repo right now. I duplicated some files accidentally, and some of the old files are still in it. Here is the blockstate and model file. The java classes are the ones posted above. Thanks.
-
Blockstates Property for a Block
Still stuck on this, I thought I figured out but the proper textures for each blockstate were not rendering properly. Just seeing if anyone has any ideas. Thanks.
-
Blockstates Property for a Block
Yeah, I've been getting a repository set up. For now, I'll just post the code directly. These are the two java classes for the Block itself, and then the TileEntity.
-
Blockstates Property for a Block
Nevermind, I was able to get it working. However, using the getSubBlocks method, the textures for all other 15 blocks are not registering.
-
Blockstates Property for a Block
Huh, I looked through that, and my JSON file is formatted the same way, but it gives me an Exception loading model for variant error. I made sure to register the tileentity, but maybe I'm missing something else with the actual model?
-
Blockstates Property for a Block
Can you explain what writeToNBT and readFromNBT are?
-
Blockstates Property for a Block
I'm wondering how this guy did it. https://github.com/MrCrayfish/MrCrayfishFurnitureMod/blob/master/src/main/resources/assets/cfm/blockstates/counter.json He uses this for multiple different blocks for different color variants.
-
Blockstates Property for a Block
I have read past forum posts addressing this, but I still can't seem to figure it out. I have a block that should create a variant for each EnumDyeColor. (So, 16 altogether.) I have already gotten this same block to work using a "facing" property so that it faces the player when placed, but I can't seem to get the "color" property to work. It generates 16 items without textures in the inventory and without textures when placed. I am pretty sure it's a JSON thing, because of the error which I will post below. Thanks. The console also says "suppressed 59 additional model loading errors." Here is my JSON file. And just to clarify, the block model is loading a "test_block" in, just not generating the blockstate variants for the other 16 colors.
IPS spam blocked by CleanTalk.