42 lines
1.8 KiB
Diff
42 lines
1.8 KiB
Diff
--- a/net/minecraft/block/StairsBlock.java
|
|
+++ b/net/minecraft/block/StairsBlock.java
|
|
@@ -83,13 +83,23 @@
|
|
return voxelshape;
|
|
}
|
|
|
|
+ @Deprecated // Forge: Use the other constructor that takes a Supplier
|
|
public StairsBlock(BlockState p_i48321_1_, AbstractBlock.Properties p_i48321_2_) {
|
|
super(p_i48321_2_);
|
|
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 = p_i48321_1_.func_177230_c();
|
|
this.field_150151_M = p_i48321_1_;
|
|
+ this.stateSupplier = () -> p_i48321_1_;
|
|
}
|
|
|
|
+ public StairsBlock(java.util.function.Supplier<BlockState> state, AbstractBlock.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
|
|
+ this.field_150151_M = Blocks.field_150350_a.func_176223_P();
|
|
+ this.stateSupplier = state;
|
|
+ }
|
|
+
|
|
public boolean func_220074_n(BlockState p_220074_1_) {
|
|
return true;
|
|
}
|
|
@@ -265,4 +275,14 @@
|
|
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
|
|
return false;
|
|
}
|
|
+
|
|
+ // Forge Start
|
|
+ private final java.util.function.Supplier<BlockState> stateSupplier;
|
|
+ private Block getModelBlock() {
|
|
+ return getModelState().func_177230_c();
|
|
+ }
|
|
+ private BlockState getModelState() {
|
|
+ return stateSupplier.get();
|
|
+ }
|
|
+ // Forge end
|
|
}
|