mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 23:22:10 -07:00
[ci skip] Add more identifying patch comments
This commit is contained in:
@@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@Nullable
|
||||
public CompoundTag blockData;
|
||||
protected static final EntityDataAccessor<BlockPos> DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS);
|
||||
+ public boolean autoExpire = true; // Paper - Auto expire setting
|
||||
+ public boolean autoExpire = true; // Paper - Expand FallingBlock API
|
||||
|
||||
public FallingBlockEntity(EntityType<? extends FallingBlockEntity> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
if (!this.onGround() && !flag1) {
|
||||
- if (!this.level().isClientSide && (this.time > 100 && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || this.time > 600)) {
|
||||
+ if (!this.level().isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Auto expire setting
|
||||
+ if (!this.level().isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Expand FallingBlock API
|
||||
if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||
this.spawnAtLocation((ItemLike) block);
|
||||
}
|
||||
@@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
nbt.putBoolean("CancelDrop", this.cancelDrop);
|
||||
+ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - AutoExpire setting
|
||||
+ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - Expand FallingBlock API
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -45,11 +45,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.setOrigin(new org.bukkit.Location(this.level().getWorld(), srcX, srcY, srcZ));
|
||||
}
|
||||
// Paper end
|
||||
+ // Paper start
|
||||
+ // Paper start - Expand FallingBlock API
|
||||
+ if (nbt.contains("Paper.AutoExpire")) {
|
||||
+ this.autoExpire = nbt.getBoolean("Paper.AutoExpire");
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Expand FallingBlock API
|
||||
}
|
||||
|
||||
public void setHurtsEntities(float fallHurtAmount, int fallHurtMax) {
|
||||
@@ -61,7 +61,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public BlockData getBlockData() {
|
||||
return CraftBlockData.fromData(this.getHandle().getBlockState());
|
||||
}
|
||||
+ // Paper start
|
||||
+ // Paper start - Expand FallingBlock API
|
||||
+ @Override
|
||||
+ public void setBlockData(final BlockData blockData) {
|
||||
+ Preconditions.checkArgument(blockData != null, "blockData");
|
||||
@@ -85,7 +85,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ this.setBlockData(blockState.getBlockData());
|
||||
+ if (blockState instanceof final org.bukkit.craftbukkit.block.CraftBlockEntityState<?> tileEntity) this.getHandle().blockData = tileEntity.getSnapshotNBT();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Expand FallingBlock API
|
||||
|
||||
@Override
|
||||
public boolean getDropItem() {
|
||||
@@ -93,7 +93,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.setHurtEntities(true);
|
||||
}
|
||||
}
|
||||
+ // Paper Start - Auto expire setting
|
||||
+ // Paper Start - Expand FallingBlock API
|
||||
+ @Override
|
||||
+ public boolean doesAutoExpire() {
|
||||
+ return this.getHandle().autoExpire;
|
||||
@@ -103,5 +103,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public void shouldAutoExpire(boolean autoExpires) {
|
||||
+ this.getHandle().autoExpire = autoExpires;
|
||||
+ }
|
||||
+ // Paper End - Auto expire setting
|
||||
+ // Paper End - Expand FallingBlock API
|
||||
}
|
||||
|
Reference in New Issue
Block a user