mirror of
https://github.com/GeyserMC/Geyser.git
synced 2026-01-06 15:41:50 +00:00
Set up feature branch publishing and vertical offset applying
This commit is contained in:
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@@ -51,16 +51,7 @@ jobs:
|
||||
bootstrap/viaproxy/build/libs/Geyser-ViaProxy.jar
|
||||
|
||||
- name: Publish to Maven Repository
|
||||
if: >-
|
||||
${{
|
||||
success() &&
|
||||
github.repository == 'GeyserMC/Geyser' &&
|
||||
(
|
||||
github.ref_name == 'master' ||
|
||||
(github.event.pull_request &&
|
||||
contains(github.event.pull_request.labels.*.name, 'PR: Needs Testing'))
|
||||
)
|
||||
}}
|
||||
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && (github.ref_name == 'master' || startsWith(github.ref_name, 'feature/')) }}
|
||||
run: ./gradlew publish
|
||||
env:
|
||||
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
||||
|
||||
@@ -66,10 +66,7 @@ public interface EntityData {
|
||||
@Nullable GeyserEntity byGeyserId(@NonNegative long geyserId);
|
||||
|
||||
/**
|
||||
* Displays a player entity as emoting to this client.
|
||||
*
|
||||
* @param emoter the player entity emoting
|
||||
* @param emoteId the emote ID to send to this client
|
||||
* @deprecated use {@link GeyserConnection#showEmote(GeyserPlayerEntity, String)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
void showEmote(@NonNull GeyserPlayerEntity emoter, @NonNull String emoteId);
|
||||
|
||||
@@ -44,9 +44,19 @@ public interface CustomEntityDefinition extends GeyserEntityDefinition {
|
||||
* Creates or retrieves a GeyserEntityDefinition by the Bedrock entity type identifier.
|
||||
*
|
||||
* @param identifier the Bedrock entity identifier
|
||||
* @return the GeyserEntityDefinition
|
||||
* @return the CustomEntityDefinition
|
||||
*/
|
||||
static @NonNull CustomEntityDefinition of(@NonNull Identifier identifier) {
|
||||
return GeyserApi.api().provider(GeyserEntityDefinition.class, identifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or retrieves a GeyserEntityDefinition by the Bedrock entity type identifier.
|
||||
*
|
||||
* @param identifier the Bedrock entity identifier, in string format
|
||||
* @return the CustomEntityDefinition
|
||||
*/
|
||||
static @NonNull CustomEntityDefinition of(@NonNull String identifier) {
|
||||
return of(Identifier.of(identifier));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ public record BedrockEntityDefinition(
|
||||
return Registries.BEDROCK_ENTITY_DEFINITIONS.get().get(identifier);
|
||||
}
|
||||
|
||||
Objects.requireNonNull(identifier, "identifier");
|
||||
if (identifier.vanilla()) {
|
||||
throw new IllegalArgumentException("Cannot create custom entity in vanilla namespace! " + identifier);
|
||||
}
|
||||
|
||||
@@ -853,9 +853,10 @@ public class Entity implements GeyserEntity {
|
||||
}
|
||||
|
||||
public void offset(float offset) {
|
||||
this.offset = offset;
|
||||
// TODO queue?
|
||||
if (isValid()) {
|
||||
this.moveRelative(0, offset, 0, 0, 0, isOnGround());
|
||||
this.moveRelative(0, 0, 0, 0, 0, isOnGround());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user