Skip to content

Commit

Permalink
Merge pull request #274 from nexusnode/bugfixes
Browse files Browse the repository at this point in the history
Traffic Signs
  • Loading branch information
9MaxR9 committed Mar 7, 2024
2 parents d39732a + 3540d98 commit 28f7dfb
Show file tree
Hide file tree
Showing 85 changed files with 9,833 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,27 @@ static void register() {
translucent(DecorationBlocks.HL2_TRASH);
translucent(DecorationBlocks.HL2_TRASH_2);
translucent(DecorationBlocks.WALL_BUSH);

translucent(DecorationBlocks.TRAFFIC_SIGNS_POLE);
translucent(DecorationBlocks.TRAFFIC_SIGNS_EMPTY);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED20);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED25);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED30);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED35);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED40);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED45);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED50);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED55);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED60);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED65);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED70);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED75);
translucent(DecorationBlocks.TRAFFIC_SIGNS_SPEED80);
translucent(DecorationBlocks.TRAFFIC_SIGNS_DAMAGED);
translucent(DecorationBlocks.TRAFFIC_SIGNS_DAMAGED_BULLET);
translucent(DecorationBlocks.TRAFFIC_SIGNS_RADIOACTIVE);
translucent(DecorationBlocks.TRAFFIC_SIGNS_RADIOACTIVE_DAMAGED);
translucent(DecorationBlocks.TRAFFIC_SIGNS_NOTSAFE);
}

private static void cutout(Supplier<? extends Block> block) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,106 @@ public ItemStack makeIcon() {
() -> new BlockItem(DecorationBlocks.SMALL_FENCE.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_POLE =
deferredRegister.register("traffic_signs_01",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_POLE.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_EMPTY =
deferredRegister.register("traffic_signs_02",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_EMPTY.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED20 =
deferredRegister.register("traffic_signs_speed20",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED20.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED25 =
deferredRegister.register("traffic_signs_speed25",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED25.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED30 =
deferredRegister.register("traffic_signs_speed30",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED30.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED35 =
deferredRegister.register("traffic_signs_speed35",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED35.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED40 =
deferredRegister.register("traffic_signs_speed40",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED40.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED45 =
deferredRegister.register("traffic_signs_speed45",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED45.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED50 =
deferredRegister.register("traffic_signs_speed50",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED50.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED55 =
deferredRegister.register("traffic_signs_speed55",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED55.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED60 =
deferredRegister.register("traffic_signs_speed60",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED60.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED65 =
deferredRegister.register("traffic_signs_speed65",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED65.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED70 =
deferredRegister.register("traffic_signs_speed70",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED70.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED75 =
deferredRegister.register("traffic_signs_speed75",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED75.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_SPEED80 =
deferredRegister.register("traffic_signs_speed80",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_SPEED80.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_DAMAGED_BULLET =
deferredRegister.register("traffic_signs_damaged_bullet",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_DAMAGED_BULLET.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_DAMAGED =
deferredRegister.register("traffic_signs_damaged",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_DAMAGED.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_NOTSAFE =
deferredRegister.register("traffic_signs_notsafe",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_NOTSAFE.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_RADIOACTIVE =
deferredRegister.register("traffic_signs_radioactive",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_RADIOACTIVE.get(),
new Item.Properties().tab(TAB)));

public static final RegistryObject<Item> TRAFFIC_SIGNS_RADIOACTIVE_DAMAGED =
deferredRegister.register("traffic_signs_radioactive_damaged",
() -> new BlockItem(DecorationBlocks.TRAFFIC_SIGNS_RADIOACTIVE_DAMAGED.get(),
new Item.Properties().tab(TAB)));

//HL2Pack Items
public static final RegistryObject<Item> HEALTH_CHARGER =
deferredRegister.register("acacia_button",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,12 @@ public class BlockShapes {
public static final Function<Direction, VoxelShape> METAL_DUCT =
rotatedOrientableShape(Shapes.or(Block.box(0, 0, -16, 16, 25, 16)));

public static final Function<Direction, VoxelShape> TRAFFIC_SIGNS_POLE =
rotatedOrientableShape(Shapes.or(Block.box(7.5, 0, 7.5, 8.5, 16, 8.5)));

public static final Function<Direction, VoxelShape> TRAFFIC_SIGNS_EMPTY =
rotatedOrientableShape(Shapes.or(Block.box(7.5, 0, 7.5, 8.5, 30, 8.5)));

public static final Function<Direction, VoxelShape> BLOCK =
unitOrientableShape(Shapes.block());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1805,6 +1805,188 @@ public class DecorationBlocks {
.noCollission(),
BlockShapes.SLEEPING_BAG));

public static final RegistryObject<Block> TRAFFIC_SIGNS_POLE =
deferredRegister.register("traffic_signs_01",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_POLE));

public static final RegistryObject<Block> TRAFFIC_SIGNS_EMPTY =
deferredRegister.register("traffic_signs_02",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED20 =
deferredRegister.register("traffic_signs_speed20",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED25 =
deferredRegister.register("traffic_signs_speed25",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED30 =
deferredRegister.register("traffic_signs_speed30",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED35 =
deferredRegister.register("traffic_signs_speed35",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED40 =
deferredRegister.register("traffic_signs_speed40",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED45 =
deferredRegister.register("traffic_signs_speed450",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED50 =
deferredRegister.register("traffic_signs_speed50",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED55 =
deferredRegister.register("traffic_signs_speed55",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED60 =
deferredRegister.register("traffic_signs_speed60",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED65 =
deferredRegister.register("traffic_signs_speed65",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED70 =
deferredRegister.register("traffic_signs_speed70",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED75 =
deferredRegister.register("traffic_signs_speed75",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_SPEED80 =
deferredRegister.register("traffic_signs_speed80",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_DAMAGED =
deferredRegister.register("traffic_signs_damaged",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_DAMAGED_BULLET =
deferredRegister.register("traffic_signs_damaged_bullet",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_NOTSAFE =
deferredRegister.register("traffic_signs_notsafe",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_RADIOACTIVE =
deferredRegister.register("traffic_signs_radioactive",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));

public static final RegistryObject<Block> TRAFFIC_SIGNS_RADIOACTIVE_DAMAGED =
deferredRegister.register("traffic_signs_radioactive_damaged",
() -> new OrientableBlock(
BlockBehaviour.Properties.of(Material.METAL)
.strength(1.0F)
.sound(SoundType.METAL)
.noOcclusion(),
BlockShapes.TRAFFIC_SIGNS_EMPTY));



// Items from HL2Pack
public static final RegistryObject<Block> HEALTH_CHARGER =
deferredRegister.register("acacia_button",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"variants": {
"facing=east": {
"model": "craftingdeaddecoration:block/traffic_signs_01",
"y": 90
},
"facing=north": {
"model": "craftingdeaddecoration:block/traffic_signs_01"
},
"facing=west": {
"model": "craftingdeaddecoration:block/traffic_signs_01",
"y": 270
},
"facing=south": {
"model": "craftingdeaddecoration:block/traffic_signs_01",
"y": 180
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"variants": {
"facing=east": {
"model": "craftingdeaddecoration:block/traffic_signs_02",
"y": 90
},
"facing=north": {
"model": "craftingdeaddecoration:block/traffic_signs_02"
},
"facing=west": {
"model": "craftingdeaddecoration:block/traffic_signs_02",
"y": 270
},
"facing=south": {
"model": "craftingdeaddecoration:block/traffic_signs_02",
"y": 180
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"variants": {
"facing=east": {
"model": "craftingdeaddecoration:block/traffic_signs_damaged",
"y": 90
},
"facing=north": {
"model": "craftingdeaddecoration:block/traffic_signs_damaged"
},
"facing=west": {
"model": "craftingdeaddecoration:block/traffic_signs_damaged",
"y": 270
},
"facing=south": {
"model": "craftingdeaddecoration:block/traffic_signs_damaged",
"y": 180
}
}
}

0 comments on commit 28f7dfb

Please sign in to comment.