Skip to content

Commit

Permalink
Fix some long-standing sign bugs.
Browse files Browse the repository at this point in the history
- Fix signs dropping as the wrong item
  • Loading branch information
gniftygnome committed Jun 15, 2023
1 parent 9821d52 commit 4d030cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
import net.minecraft.util.registry.Registry;

public class TerrestriaRegistry {
@SuppressWarnings("UnnecessaryReturnStatement")
public TerrestriaRegistry() {
return;
}

public static BlockItem registerBuildingBlockItem(String name, Block block) {
return registerBlockItem(name, block, ItemGroup.BUILDING_BLOCKS);
Expand Down Expand Up @@ -39,7 +43,7 @@ public static <I extends Item> I registerItem(String name, I item) {
return Registry.register(Registry.ITEM, new Identifier(Terrestria.MOD_ID, name), item);
}

public static <T extends Block> T register(String name, T block) {
public static <B extends Block> B register(String name, B block) {
return Registry.register(Registry.BLOCK, new Identifier(Terrestria.MOD_ID, name), block);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static WoodBlocks registerManufactured(String name, WoodColors colors) {
Identifier signTexture = new Identifier(Terrestria.MOD_ID, "entity/signs/" + name);

blocks.sign = TerrestriaRegistry.register(name + "_sign", new TerraformSignBlock(signTexture, FabricBlockSettings.copyOf(Blocks.OAK_SIGN).mapColor(colors.planks)));
blocks.wallSign = TerrestriaRegistry.register(name + "_wall_sign", new TerraformWallSignBlock(signTexture, FabricBlockSettings.copyOf(Blocks.OAK_WALL_SIGN).mapColor(colors.planks)));
blocks.wallSign = TerrestriaRegistry.register(name + "_wall_sign", new TerraformWallSignBlock(signTexture, FabricBlockSettings.copyOf(Blocks.OAK_WALL_SIGN).mapColor(colors.planks).dropsLike(blocks.sign)));

return blocks;
}
Expand Down

0 comments on commit 4d030cd

Please sign in to comment.