Jump to content

shane020482

Members
  • Posts

    72
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

shane020482's Achievements

Stone Miner

Stone Miner (3/8)

2

Reputation

  1. Thanks that will make things easier going further
  2. Yea sry a cpl typos fixed them. As to the #0 thats the way the model references the textures ( "north": {"uv": [0, 0, 16, 16], "texture": "#0"} ). But are you saying i dont need to rename the textures in the model file
  3. Ok i see what you mean in the model json //this "textures": { "0": "cbm:blocks/steel", "1": "cbm:blocks/steel2", "particle": "cbm:blocks/steel" }, //becomes this "textures": { "0": "#0", "1": "#1" }, and in the blockstate you add this to default "textures": { "0": "cbm:blocks/steel", "1": "cbm:blocks/steel2", "particle": "cbm:blocks/steel" }
  4. I have a custom model that uses diff textures that i would like to reuse by putting a diff set of textures on it. Sry for the bad wording
  5. This is a quick and hopefully easy question. I have a custom model that uses diff textures that i would like to reuse using a diff set of textures. So the question is can i put the textures in the Forge Blockstate and if so how would i do this
  6. Yea im just not that good ? maybe one day. And yes i agreed with your Easy Registry class tho i may not use it now i will be one of those things ill go back to time and again to see what you are doing and slowly learn to create my own Easy Registry. Thats how iv been learning start with a basic tutorial to learn the basics of a MC version then look at other mods that are doing what i want to do, find a method that i like and learn to create my own based off of it.
  7. 1. I never calmed it to be the best way or that it was correct just that it worked. ? 2.I thought you meant writing the function per block, yes you do need the function in each base class but thats it. 3.Just goes to show theirs more than one way to skin a cat. 4.My old mod should shows i dont like copy past i like to explore and see what all is possible. Whether right or wrong i learn and that to me is the most important part . 5.I think we should rename this thread to How many ways are there to Register Blocks
  8. 1.Yes you need to register via the client proxy 2.Not necessarily https://github.com/Shane2482/Deadly-World-1.10/blob/master/src/main/java/shane2482/deadlyworld/proxy/ClientProxy.java
  9. By registering in the base class anything you put in the init class is automatically registered therefore you dont need to register each block separately. If im being stupid please forgive me im still trying to get a understanding of 1.12
  10. I know GameRegistry is private. But are you saying i cant even use the event method in the base class
  11. Its fine after sleeping on it i think im going to do it like i did in the past and register in the base class https://github.com/Shane2482/Deadly-World-1.10/blob/master/src/main/java/shane2482/deadlyworld/blocks/base/blockbase.java that is if i can figure out how to do that in 1.12. And even if i dont use enums if i use Forge Blocktates ill still need to create blockstates for all of my blocks but i wont need the models.
  12. sry for not being clearer what i was trying to do was get the full code in one place so i could see what i needed to do to make this work for me and thats where i get lost. i myself dont like copy pasting i always modified to to fit my needs
  13. chasing things down and this is what iv got so far and im still lost. Im not a complete noob to java or MC code but i am self taught and this may just be outside my grasp public void _registerBlockWithCustomItem(Block block, ItemBlock iBlock, String registryname) { StateMapperBase b = new DefaultStateMapper(); BlockStateContainer bsc = block.getBlockState(); ImmutableList<IBlockState> values = bsc.getValidStates(); for(IBlockState state : values) { String str = b.getPropertyString(state.getProperties()); _registerBlockItemModelForMeta(block, block.getMetaFromState(state), str); } } private void _registerBlockItemModelForMeta(Block block, int metadata, String variant) { final Item item = blockItems.get(block); if (item != null) { _registerItemModelForMeta(item, metadata, variant); } } private void _registerItemModelForMeta(Item item, int metadata, String variant) { ModelResourceLocation res = new ModelResourceLocation(item.getRegistryName(), variant); _registerItemModelForMeta(item, metadata, res); } private void _registerItemModelForMeta(Item item, int metadata, ModelResourceLocation modelResourceLocation) { modelsToReg.add(new ModelRegistryObj(item, metadata, modelResourceLocation)); } protected static class ModelRegistryObj { final Item item; final int meta; final ModelResourceLocation resource; public ModelRegistryObj(Item i, int m, ModelResourceLocation loc) { item = i; meta = m; resource = loc; } }
  14. Man thats a rabbit hole ill havw to sit down and really dig in to see if i can figure it out. ?
  15. Yea i was afraid of that im already using that method for blocks that dont have variants. i was just hoping to use Forge Blockstate to cover block models item models and blockstates for up to 16 blocks with just one blockstate. But if i cant get Forge to work then i guess ill just have to suck it up. Thanks for the advice anyways
×
×
  • Create New...

Important Information

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