mirror of
https://github.com/FabricMC/fabric.git
synced 2025-05-05 19:03:29 -04:00
23w45a porting fixes (#3421)
This commit is contained in:
parent
23e8616e74
commit
a2e8758a92
5 changed files with 14 additions and 3 deletions
fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/block
|
@ -82,7 +82,12 @@ public class FabricBlockSettings extends AbstractBlock.Settings {
|
|||
this.instrument(otherAccessor.getInstrument());
|
||||
thisAccessor.setReplaceable(otherAccessor.getReplaceable());
|
||||
|
||||
// Not copied in vanilla: field definition order
|
||||
// Vanilla did not copy those fields until 23w45a, which introduced
|
||||
// copyShallow method (maintaining the behavior previously used by the copy method)
|
||||
// and the copy method that copies those fields as well. copyShallow is now
|
||||
// deprecated. To maintain compatibility and since this behavior seems to be the
|
||||
// more proper way, this copies all the fields, not just the shallow ones.
|
||||
// Fields are added by field definition order.
|
||||
this.jumpVelocityMultiplier(otherAccessor.getJumpVelocityMultiplier());
|
||||
this.drops(otherAccessor.getLootTableId());
|
||||
this.allowsSpawning(otherAccessor.getAllowsSpawningPredicate());
|
||||
|
|
|
@ -210,6 +210,7 @@ public final class BlockSetTypeBuilder {
|
|||
public static BlockSetTypeBuilder copyOf(BlockSetTypeBuilder builder) {
|
||||
BlockSetTypeBuilder copy = new BlockSetTypeBuilder();
|
||||
copy.openableByHand(builder.openableByHand);
|
||||
copy.openableByWindCharge(builder.openableByWindCharge);
|
||||
copy.buttonActivatedByArrows(builder.buttonActivatedByArrows);
|
||||
copy.pressurePlateActivationRule(builder.pressurePlateActivationRule);
|
||||
copy.soundGroup(builder.soundGroup);
|
||||
|
@ -234,6 +235,7 @@ public final class BlockSetTypeBuilder {
|
|||
public static BlockSetTypeBuilder copyOf(BlockSetType setType) {
|
||||
BlockSetTypeBuilder copy = new BlockSetTypeBuilder();
|
||||
copy.openableByHand(setType.canOpenByHand());
|
||||
copy.openableByWindCharge(setType.canOpenByWindCharge());
|
||||
copy.buttonActivatedByArrows(setType.canButtonBeActivatedByArrows());
|
||||
copy.pressurePlateActivationRule(setType.pressurePlateSensitivity());
|
||||
copy.soundGroup(setType.soundType());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue