Skip to content

Commit

Permalink
feat: proxima centauri b mushroom
Browse files Browse the repository at this point in the history
  • Loading branch information
screret committed Jan 8, 2024
1 parent 8934e96 commit 0df69e1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ public class GCyRBlocks {
.register();
// endregion

public static final BlockEntry<MushroomBlock> PRB_SHROOM = REGISTRATE
.block("prb_underground_mushroom", (p) -> new MushroomBlock(p, null /*todo fix*/))
.initialProperties(() -> Blocks.BROWN_MUSHROOM)
.properties(p -> p.mapColor(MapColor.COLOR_CYAN))
.blockstate(GCyRModels::crossModel)
.item()
.defaultModel()
.build()
.register();

// region rocket stuff
public static final Map<IRocketMotorType, Supplier<RocketMotorBlock>> ALL_ROCKET_MOTORS = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ public static void randomRotatedModel(DataGenContext<Block, ? extends Block> ctx
throw new AssertionError();
}


@ExpectPlatform
public static void crossModel(DataGenContext<Block, ? extends Block> ctx, RegistrateBlockstateProvider prov) {
throw new AssertionError();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,10 @@ public static void randomRotatedModel(DataGenContext<Block, ? extends Block> ctx
.build();
prov.simpleBlock(block, models);
}

public static void crossModel(DataGenContext<Block, ? extends Block> ctx, RegistrateBlockstateProvider prov) {
Block block = ctx.getEntry();
ModelFile cross = prov.models().cross(ctx.getName(), prov.blockTexture(block));
prov.simpleBlock(block, cross);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,10 @@ public static void randomRotatedModel(DataGenContext<Block, ? extends Block> ctx
.build();
prov.simpleBlock(block, models);
}

public static void crossModel(DataGenContext<Block, ? extends Block> ctx, RegistrateBlockstateProvider prov) {
Block block = ctx.getEntry();
ModelFile cross = prov.models().cross(ctx.getName(), prov.blockTexture(block));
prov.simpleBlock(block, cross);
}
}

0 comments on commit 0df69e1

Please sign in to comment.