From b3631b707c1bfdd3817aa0e51b9ca007efd92f52 Mon Sep 17 00:00:00 2001 From: tterrag Date: Fri, 27 Sep 2019 17:54:52 -0400 Subject: [PATCH] Make patched-in StairsBlock constructor public Also fix supplier generic being too narrow in DeferredRegister#register --- patches/minecraft/net/minecraft/block/StairsBlock.java.patch | 2 +- .../java/net/minecraftforge/registries/DeferredRegister.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/minecraft/net/minecraft/block/StairsBlock.java.patch b/patches/minecraft/net/minecraft/block/StairsBlock.java.patch index 205efcfcb..f47f3d6e7 100644 --- a/patches/minecraft/net/minecraft/block/StairsBlock.java.patch +++ b/patches/minecraft/net/minecraft/block/StairsBlock.java.patch @@ -14,7 +14,7 @@ + this.stateSupplier = () -> p_i48321_1_; } -+ protected StairsBlock(java.util.function.Supplier state, Block.Properties properties) { ++ public StairsBlock(java.util.function.Supplier state, Block.Properties properties) { + super(properties); + this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176309_a, Direction.NORTH).func_206870_a(field_176308_b, Half.BOTTOM).func_206870_a(field_176310_M, StairsShape.STRAIGHT).func_206870_a(field_204513_t, Boolean.valueOf(false))); + this.field_150149_b = Blocks.field_150350_a; // These are unused, fields are redirected diff --git a/src/main/java/net/minecraftforge/registries/DeferredRegister.java b/src/main/java/net/minecraftforge/registries/DeferredRegister.java index aac37c1cf..fc57887b2 100644 --- a/src/main/java/net/minecraftforge/registries/DeferredRegister.java +++ b/src/main/java/net/minecraftforge/registries/DeferredRegister.java @@ -71,7 +71,7 @@ public class DeferredRegister> * @return A RegistryObject that will be updated with when the entries in the registry change. */ @SuppressWarnings("unchecked") - public RegistryObject register(final String name, final Supplier sup) + public RegistryObject register(final String name, final Supplier sup) { Objects.requireNonNull(name); Objects.requireNonNull(sup);