mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
offset item frame ticking
This commit is contained in:
parent
a89e4e6ae3
commit
0198ee9c8a
@ -10,7 +10,7 @@
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
@@ -15,8 +12,19 @@
|
||||
@@ -15,13 +12,24 @@
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.GameRules;
|
||||
import net.minecraft.world.level.Level;
|
||||
@ -30,6 +30,12 @@
|
||||
|
||||
public abstract class BlockAttachedEntity extends Entity {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
- private int checkInterval;
|
||||
+ private int checkInterval; { this.checkInterval = this.getId() % this.level().spigotConfig.hangingTickFrequency; } // Paper - Perf: offset item frame ticking
|
||||
protected BlockPos pos;
|
||||
|
||||
protected BlockAttachedEntity(EntityType<? extends BlockAttachedEntity> type, Level world) {
|
||||
@@ -41,10 +49,28 @@
|
||||
|
||||
if (world instanceof ServerLevel worldserver) {
|
||||
|
Loading…
Reference in New Issue
Block a user