JoppeGames3
-
Posts
13 -
Joined
-
Last visited
Posts posted by JoppeGames3
-
-
10 minutes ago, diesieben07 said:
That is absolute BS.
It is true, when I delete them it runs fast...
-
is there a way to register multiple variants of one block so that instead of 16 lines like this:
public static final RegistryObject<Block> WHITE_STUDIO_LIGHT = BLOCKS.register("white_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> ORANGE_STUDIO_LIGHT = BLOCKS.register("orange_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> MAGENTA_STUDIO_LIGHT = BLOCKS.register("magenta_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> LIGHT_BLUE_STUDIO_LIGHT = BLOCKS.register("light_blue_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> YELLOW_STUDIO_LIGHT = BLOCKS.register("yellow_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> LIME_STUDIO_LIGHT = BLOCKS.register("lime_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> PINK_STUDIO_LIGHT = BLOCKS.register("pink_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> GRAY_STUDIO_LIGHT = BLOCKS.register("gray_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> LIGHT_GRAY_STUDIO_LIGHT = BLOCKS.register("light_gray_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> CYAN_STUDIO_LIGHT = BLOCKS.register("cyan_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> PURPLE_STUDIO_LIGHT = BLOCKS.register("purple_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> BLUE_STUDIO_LIGHT = BLOCKS.register("blue_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> BROWN_STUDIO_LIGHT = BLOCKS.register("brown_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> GREEN_STUDIO_LIGHT = BLOCKS.register("green_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> RED_STUDIO_LIGHT = BLOCKS.register("red_studio_light", ()-> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;}))); public static final RegistryObject<Block> BLACK_STUDIO_LIGHT = BLOCKS.register("black_studio_light", () -> new StudioLight(Block.Properties.create(Material.ROCK).hardnessAndResistance(0f, 0f).sound(SoundType.METAL).setLightLevel((state) -> {return 15;})));
it is just one line.
because the way I do it now with the 16 lines makes loading the game too slow
-
anyone knows a tutorial on how to create vehicles or wants to explain it here?
-
how to make custom tags, so not add to one already existing but make your own.
and how to implement them in recipes
-
36 minutes ago, diesieben07 said:
Not all rotatable blocks use the same block state properties.
my custom ones do...
-
1 minute ago, diesieben07 said:
What do you mean by this? The blockstate includes the block, so if you want the same blockstate that also means its the same block.
I meant same rotation..
2 minutes ago, diesieben07 said:This check is pointless.
what do I have to check
and how to replace it with another block
-
how to check what block gets right clicked by your item, and then replace it to another block, but with the same blockstate as the first block?
I know I have to use the "onItemUse" method but don't know what to put after the 'if'
this is what I got so far....
public ActionResultType onItemUse(ItemUseContext context) { World world = context.getWorld(); BlockPos blockpos = context.getPos(); BlockState blockstate = world.getBlockState(blockpos); BlockState block = blockstate.getBlockState(); if (block != null) {
-
I'm sorry
-
how to add my own on and off model there?
-
that isn't another model right?
-
well, the LIT part confuses me, the rest I can understand
-
Yeah,
I looked at the Redstone lamp class but this:
[removed vanilla code]
doesn't help me with creating my own Redstone lamp
Register blocks and items using Data Generators.
in Modder Support
Posted
this is the BlockClass:
and here is the BlockInit: