1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-22 16:29:25 +00:00

Move CustomEntityDefinition into custom package

This commit is contained in:
onebeastchris
2025-11-10 16:09:32 +01:00
parent a3869cf5f8
commit 11e6b50d53
13 changed files with 27 additions and 20 deletions

View File

@@ -30,18 +30,25 @@ import org.checkerframework.checker.nullness.qual.NonNull;
import org.geysermc.geyser.api.GeyserApi;
import org.geysermc.geyser.api.util.Identifier;
/**
* Represents a Java edition entity type
*/
public interface JavaEntityType {
Identifier javaIdentifier();
/**
* @return the identifier of the type
*/
Identifier identifier();
/**
* @return the
*/
int javaId();
boolean isUnregistered();
boolean vanilla();
default boolean is(Identifier javaIdentifier) {
return javaIdentifier().equals(javaIdentifier);
return identifier().equals(javaIdentifier);
}
static JavaEntityType ofVanilla(@NonNull Identifier javaIdentifier) {

View File

@@ -23,17 +23,17 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.geyser.api.entity;
package org.geysermc.geyser.api.entity.custom;
import org.checkerframework.checker.index.qual.Positive;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.common.returnsreceiver.qual.This;
import org.geysermc.geyser.api.GeyserApi;
import org.geysermc.geyser.api.util.Identifier;
public interface CustomEntityDefinition {
// TODO Identifier
String bedrockIdentifier();
Identifier bedrockIdentifier();
float width();

View File

@@ -26,7 +26,7 @@
package org.geysermc.geyser.api.event.lifecycle;
import org.geysermc.event.Event;
import org.geysermc.geyser.api.entity.CustomEntityDefinition;
import org.geysermc.geyser.api.entity.custom.CustomEntityDefinition;
import java.util.List;