tterrag1098 / Registrate

Your mod's best friend - keep your registry objects simple and organized
Mozilla Public License 2.0
114 stars 32 forks source link

Added `initialProperties(Material material)` #23

Closed CoffeeCatRailway closed 3 years ago

CoffeeCatRailway commented 3 years ago

Added alternate initialProperties method so you don't have to enter a color each time.

Eg.

// OLD
public static final RegistryEntry<Block> TEST_BLOCK = REGISTRATE.object("test_block").block(Block::new)
    .initialProperties(Material.ROCK, Material.ROCK.getColor()).simpleItem().register();

// NEW
public static final RegistryEntry<Block> TEST_BLOCK = REGISTRATE.object("test_block").block(Block::new)
    .initialProperties(Material.ROCK).simpleItem().register();
tterrag1098 commented 3 years ago

Simple enough, thanks!

tterrag1098 commented 3 years ago

Ooh, except that it should be targeting 1.15, let me see what I can do.

tterrag1098 commented 3 years ago

Merged via https://github.com/tterrag1098/Registrate/commit/630eda693318bc04e7b3bc9416a0f81f223c8e05