mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-28 11:19:11 +00:00
Remove debug print, validate that entity definitions have been registered, setup publishing
This commit is contained in:
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@@ -51,7 +51,16 @@ jobs:
|
||||
bootstrap/viaproxy/build/libs/Geyser-ViaProxy.jar
|
||||
|
||||
- name: Publish to Maven Repository
|
||||
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
||||
if: >-
|
||||
${{
|
||||
success() &&
|
||||
github.repository == 'GeyserMC/Geyser' &&
|
||||
(
|
||||
github.ref_name == 'master' ||
|
||||
(github.event.pull_request &&
|
||||
contains(github.event.pull_request.labels.*.name, 'PR: Needs Testing'))
|
||||
)
|
||||
}}
|
||||
run: ./gradlew publish
|
||||
env:
|
||||
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
||||
|
||||
@@ -161,13 +161,17 @@ public class EntitySpawnContext {
|
||||
public void definition(@Nullable GeyserEntityDefinition entityDefinition) {
|
||||
if (entityDefinition == null) {
|
||||
bedrockEntityDefinition = null;
|
||||
} else {
|
||||
if (entityDefinition instanceof BedrockEntityDefinition bed) {
|
||||
bedrockEntityDefinition = bed;
|
||||
} else {
|
||||
throw new IllegalStateException("Unknown implementation of GeyserEntityDefinition");
|
||||
}
|
||||
}
|
||||
|
||||
if (!(entityDefinition instanceof BedrockEntityDefinition definition)) {
|
||||
throw new IllegalStateException("Unknown implementation of GeyserEntityDefinition");
|
||||
}
|
||||
|
||||
if (!entityDefinition.registered()) {
|
||||
throw new IllegalStateException("%s is not registered!".formatted(entityDefinition.identifier()));
|
||||
}
|
||||
|
||||
bedrockEntityDefinition = definition;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -208,13 +212,17 @@ public class EntitySpawnContext {
|
||||
public void definition(@Nullable GeyserEntityDefinition entityDefinition) {
|
||||
if (entityDefinition == null) {
|
||||
bedrockEntityDefinition = null;
|
||||
} else {
|
||||
if (entityDefinition instanceof BedrockEntityDefinition bed) {
|
||||
bedrockEntityDefinition = bed;
|
||||
} else {
|
||||
throw new IllegalStateException("Unknown implementation of GeyserEntityDefinition");
|
||||
}
|
||||
}
|
||||
|
||||
if (!(entityDefinition instanceof BedrockEntityDefinition definition)) {
|
||||
throw new IllegalStateException("Unknown implementation of GeyserEntityDefinition");
|
||||
}
|
||||
|
||||
if (!entityDefinition.registered()) {
|
||||
throw new IllegalStateException("%s is not registered!".formatted(entityDefinition.identifier()));
|
||||
}
|
||||
|
||||
bedrockEntityDefinition = definition;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -163,7 +163,7 @@ public class PlayerEntity extends AvatarEntity implements GeyserPlayerEntity {
|
||||
// The parrot is a separate entity in Bedrock, but part of the player entity in Java
|
||||
EntitySpawnContext context = EntitySpawnContext.inherited(session, VanillaEntities.PARROT, this, position);
|
||||
if (context.callParrotEvent(this, variant.getAsInt(), !isLeft)) {
|
||||
GeyserImpl.getInstance().getLogger().debug("TODO");
|
||||
GeyserImpl.getInstance().getLogger().debug(session, "Cancelled parrot spawn as definition is null!");
|
||||
return;
|
||||
}
|
||||
ParrotEntity parrot = new ParrotEntity(context);
|
||||
|
||||
@@ -28,7 +28,6 @@ package org.geysermc.geyser.session.cache;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.cloudburstmc.math.vector.Vector3f;
|
||||
import org.geysermc.geyser.GeyserImpl;
|
||||
|
||||
/**
|
||||
* Represents a teleport ID and corresponding coordinates that need to be confirmed. <br>
|
||||
@@ -69,7 +68,6 @@ public class TeleportCache {
|
||||
private int unconfirmedFor = 0;
|
||||
|
||||
public boolean canConfirm(Vector3f position) {
|
||||
GeyserImpl.getInstance().getLogger().info("TeleportCache_canConfirm " + position + " " + this.position);
|
||||
final float distanceX = Math.abs(this.position.getX() - position.getX());
|
||||
final float distanceY = Math.abs(this.position.getY() - position.getY());
|
||||
final float distanceZ = Math.abs(this.position.getZ() - position.getZ());
|
||||
|
||||
Reference in New Issue
Block a user