Add supplier variant to AbstractBlock.Properties#lootFrom
(#7563)
This commit is contained in:
parent
2904772b16
commit
fc68b81b21
1 changed files with 11 additions and 1 deletions
|
@ -144,12 +144,22 @@
|
||||||
public AbstractBlock.Properties func_200941_a(float p_200941_1_) {
|
public AbstractBlock.Properties func_200941_a(float p_200941_1_) {
|
||||||
this.field_200961_i = p_200941_1_;
|
this.field_200961_i = p_200941_1_;
|
||||||
return this;
|
return this;
|
||||||
@@ -933,7 +971,7 @@
|
@@ -932,11 +970,17 @@
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ @Deprecated // FORGE: Use the variant that takes a Supplier below
|
||||||
public AbstractBlock.Properties func_222379_b(Block p_222379_1_) {
|
public AbstractBlock.Properties func_222379_b(Block p_222379_1_) {
|
||||||
- this.field_222381_j = p_222379_1_.func_220068_i();
|
- this.field_222381_j = p_222379_1_.func_220068_i();
|
||||||
+ this.lootTableSupplier = () -> p_222379_1_.delegate.get().func_220068_i();
|
+ this.lootTableSupplier = () -> p_222379_1_.delegate.get().func_220068_i();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ public AbstractBlock.Properties lootFrom(java.util.function.Supplier<? extends Block> blockIn) {
|
||||||
|
+ this.lootTableSupplier = () -> blockIn.get().func_220068_i();
|
||||||
|
+ return this;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
public AbstractBlock.Properties func_235859_g_() {
|
||||||
|
this.field_235813_o_ = true;
|
||||||
|
return this;
|
||||||
|
|
Loading…
Reference in a new issue