mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-29 03:39:07 +00:00
Start updating to 1.21.5
This commit is contained in:
@@ -10,7 +10,7 @@ import org.jspecify.annotations.NullMarked;
|
||||
import java.util.Optional;
|
||||
|
||||
@NullMarked
|
||||
public record EntityState(Vec3 position, Vec3 momentum, AABB bb, Vec3 stuckSpeed, Optional<BlockPos> supportingPos, boolean onGround, float fallDistance) {
|
||||
public record EntityState(Vec3 position, Vec3 momentum, AABB bb, Vec3 stuckSpeed, Optional<BlockPos> supportingPos, boolean onGround, double fallDistance) {
|
||||
public static EntityState of(Entity entity) {
|
||||
return new EntityState(
|
||||
entity.position(), entity.getDeltaMovement(), entity.getBoundingBox(),
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.world.level.Level;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
@NullMarked
|
||||
public final class BlockableSwordItem extends SwordItem {
|
||||
public final class BlockableSwordItem extends Item {
|
||||
private static final Consumable BLOCKING_ANIMATION = Consumable.builder()
|
||||
.consumeSeconds(720000)
|
||||
.animation(ItemUseAnimation.BLOCK)
|
||||
@@ -23,8 +23,8 @@ public final class BlockableSwordItem extends SwordItem {
|
||||
.hasConsumeParticles(false)
|
||||
.build();
|
||||
|
||||
public BlockableSwordItem(ToolMaterial material, float attackDamage, float attackSpeed, Properties properties) {
|
||||
super(material, attackDamage, attackSpeed, properties);
|
||||
public BlockableSwordItem(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -44,16 +44,11 @@ public final class PlayerVisibilitySettings implements VisibilitySettings {
|
||||
}
|
||||
|
||||
public void loadData(@NonNull CompoundTag tag) {
|
||||
if (!tag.contains(SETTINGS_COMPOUND_TAG, CompoundTag.TAG_COMPOUND)) {
|
||||
return;
|
||||
}
|
||||
|
||||
CompoundTag settingsTag = tag.getCompound(SETTINGS_COMPOUND_TAG);
|
||||
CompoundTag settingsTag = tag.getCompoundOrEmpty(SETTINGS_COMPOUND_TAG);
|
||||
for (VisibilityType type : VisibilityTypes.types()) {
|
||||
if (settingsTag.contains(type.key(), CompoundTag.TAG_STRING)) {
|
||||
VisibilityState state = VisibilityState.valueOf(settingsTag.getString(type.key()));
|
||||
this.visibilityStates.put(type, state);
|
||||
}
|
||||
String typeKey = type.key();
|
||||
String stateName = settingsTag.getStringOr(typeKey, type.getDefault().name());
|
||||
this.set(type, VisibilityState.valueOf(stateName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ public final class TickInformationCollector {
|
||||
int entities = 0;
|
||||
for (ServerLevel level : levels) {
|
||||
chunks += level.chunkSource.getFullChunksCount();
|
||||
entities += level.entityTickList.entities.size();
|
||||
// todo 1.21.5 update
|
||||
//entities += level.entityTickList.entities.size();
|
||||
}
|
||||
|
||||
double averageTick = this.tickSamples.longStream()
|
||||
|
||||
Reference in New Issue
Block a user