Jump to content

How to give a block multiple textures in 1.16.5


awesomedude3595

Recommended Posts

8 minutes ago, awesomedude3595 said:

I have been trying to make a custom crafting table I have everything working except the texture. This I don't even know where to start with I have made a top and side png file for my crafting table but don't know how to apply these in the 1.16.5 mdk.

you have to do this in the model of the block,
you can look in your IDE in the library of minecraft forge ("client-extra") there are all vanilla models,
the creafting table model would be interesting for you

Link to comment
Share on other sites

public class ModModelProvider extends BlockModelProvider { public ModModelProvider(DataGenerator generator, ExistingFileHelper existingFileHelper) { super(generator, DesignableArmor.MOD_ID, existingFileHelper); } @Override protected void registerModels() { orientableWithBottom("crafting6x6", modLoc("crafting6x6_side"), modLoc("crafting6x6_side"), modLoc("crafting6x6_bottom"), modLoc("crafting6x6_top")); } }

 

I added this is this correct if so how do I register it so it actually loads

Edited by awesomedude3595
Link to comment
Share on other sites

15 minutes ago, awesomedude3595 said:

also how do I send code properly

image.png.170e89028542b42633ff874a105cbbc6.png

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

public class ModBlocks {
public static final RegistryObject<Block> crafting6x6 = register("crafting6x6", () ->
        new CraftingTableBlock(AbstractBlock.Properties.of(Material.WOOD).sound(SoundType.WOOD).harvestTool(ToolType.AXE).harvestLevel(0)));
static void register() {}
private static <T extends Block> RegistryObject<T> registerNoItem(String name, Supplier<T> block) {
    return Registration.Blocks.register(name, block);
}
private static <T extends Block> RegistryObject<T> register(String name, Supplier<T> block) {
    RegistryObject<T> ret = registerNoItem(name, block);
    Registration.Items.register(name, () -> new BlockItem(ret.get(),new Item.Properties().tab(ItemGroup.TAB_BUILDING_BLOCKS)));
    return ret;
}
}
 

 

public class ModBlockModelProvider extends BlockModelProvider {
    public ModBlockModelProvider(DataGenerator generator, ExistingFileHelper existingFileHelper) {
        super(generator, DesignableArmor.MOD_ID, existingFileHelper);
    }

    @Override
    protected void registerModels() {
        ModelFile crafting6x6 = orientableWithBottom("crafting6x6", modLoc("crafting6x6_side"), modLoc("crafting6x6_side"), modLoc("crafting6x6_bottom"), modLoc("crafting6x6_top"));
    }
}

 

public class ModBlockStateProvider extends BlockStateProvider {
    public ModBlockStateProvider(DataGenerator gen, ExistingFileHelper exFileHelper) {
        super(gen, DesignableArmor.MOD_ID, exFileHelper);
    }

    @Override
    protected void registerStatesAndModels() {

    }
}

I believe these are the files I need to use to texture my block I'm just not certain how to use them

Link to comment
Share on other sites

Look at existing implementations?
F4 in Eclipse brings up the type hierarchy for a selected class.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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