1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-19 14:59:27 +00:00

Minor cleanup

This commit is contained in:
onebeastchris
2025-06-25 17:40:58 +02:00
parent d6897a73e5
commit 39b15f945c
3 changed files with 2 additions and 16 deletions

View File

@@ -33,7 +33,6 @@ import org.cloudburstmc.math.vector.Vector3f;
import org.cloudburstmc.protocol.bedrock.data.AttributeData;
import org.cloudburstmc.protocol.bedrock.data.entity.EntityFlag;
import org.geysermc.geyser.entity.EntityDefinition;
import org.geysermc.geyser.entity.attribute.GeyserAttributeType;
import org.geysermc.geyser.entity.type.Entity;
import org.geysermc.geyser.entity.type.player.SessionPlayerEntity;
import org.geysermc.geyser.entity.vehicle.ClientVehicle;
@@ -201,17 +200,11 @@ public class HappyGhastEntity extends AnimalEntity implements ClientVehicle {
protected void updateAttribute(Attribute javaAttribute, List<AttributeData> newAttributes) {
super.updateAttribute(javaAttribute, newAttributes);
if (javaAttribute.getType() instanceof AttributeType.Builtin type) {
switch (type) {
case FLYING_SPEED -> {
AttributeData attributeData = calculateAttribute(javaAttribute, GeyserAttributeType.FLYING_SPEED);
vehicleComponent.setFlyingSpeed(attributeData.getValue());
}
case CAMERA_DISTANCE -> {
if (type == AttributeType.Builtin.CAMERA_DISTANCE) {
vehicleComponent.setCameraDistance((float) AttributeUtils.calculateValue(javaAttribute));
}
}
}
}
@Override
protected boolean canUseSlot(EquipmentSlot slot) {

View File

@@ -213,9 +213,6 @@ public class MapHasher<Type> {
}
public HashCode build() {
if (unhashed != null) {
System.out.println(unhashed);
}
return encoder.map(map);
}
}

View File

@@ -149,10 +149,6 @@ public class JavaRegistries {
private record HardcodedLookup<T>(List<T> registry, RegistryNetworkMapper<T> networkMapper, RegistryIdentifierMapper<T> identifierMapper,
RegistryIdMapper idMapper) implements JavaRegistryKey.RegistryLookup<T> {
public HardcodedLookup {
System.out.println(registry);
}
@Override
public Optional<RegistryEntryData<T>> entry(GeyserSession session, JavaRegistryKey<T> registryKey, int networkId) {
return Optional.ofNullable(registry.get(networkId))