Mappings fix

This commit is contained in:
= 2024-12-14 23:34:54 +02:00
parent 4134dadaa9
commit beaa0cfc33
5 changed files with 98 additions and 84 deletions

View file

@ -0,0 +1,51 @@
package me.tofaa.entitylib.container;
import me.tofaa.entitylib.wrapper.WrapperEntity;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.UUID;
final class EmptyContainer implements EntityContainer {
static EmptyContainer INSTANCE = new EmptyContainer();
@Override public void addEntity(WrapperEntity entity) {}
@Override public void removeEntity(WrapperEntity entity, boolean despawn) {}
@Override public void removeEntity(int entityId, boolean despawn) {}
@Override public void removeEntity(UUID uuid, boolean despawn) {}
@Override public void clearEntities(boolean despawn) {}
@Override public void tick() {}
@Override public Collection<WrapperEntity> getEntities() {return Collections.emptyList();}
@Override
public @Nullable WrapperEntity getEntity(UUID uuid) {
return null;
}
@Override
public @Nullable WrapperEntity getEntity(int entityId) {
return null;
}
@Override
public boolean containsEntity(UUID uuid) {
return false;
}
@Override
public boolean containsEntity(int entityId) {
return false;
}
@Override
public boolean containsEntity(WrapperEntity entity) {
return false;
}
@Override
public @NotNull Iterator<WrapperEntity> iterator() {
return getEntities().iterator();
}
}

View file

@ -20,42 +20,7 @@ public interface EntityContainer extends Iterable<WrapperEntity> {
}
static EntityContainer empty() {
return new EntityContainer() {
@Override public void addEntity(WrapperEntity entity) {}
@Override public void removeEntity(WrapperEntity entity, boolean despawn) {}
@Override public void removeEntity(int entityId, boolean despawn) {}
@Override public void removeEntity(UUID uuid, boolean despawn) {}
@Override public void clearEntities(boolean despawn) {}
@Override public void tick() {}
@Override public Collection<WrapperEntity> getEntities() {return Collections.emptyList();}
@Override
public @Nullable WrapperEntity getEntity(UUID uuid) {
return null;
}
@Override
public @Nullable WrapperEntity getEntity(int entityId) {
return null;
}
@Override
public boolean containsEntity(UUID uuid) {
return false;
}
@Override
public boolean containsEntity(int entityId) {
return false;
}
@Override
public boolean containsEntity(WrapperEntity entity) {
return false;
}
@Override
public @NotNull Iterator<WrapperEntity> iterator() {
return getEntities().iterator();
}
};
return EmptyContainer.INSTANCE;
}

View file

@ -3,6 +3,7 @@ package me.tofaa.entitylib.extras;
import net.kyori.adventure.util.RGBLike;
import org.jetbrains.annotations.NotNull;
@Deprecated
public enum DyeColor implements RGBLike {
WHITE(new Color(0xf9fffe), new Color(0xffffff), new Color(0xf0f0f0), 8),

View file

@ -6,7 +6,7 @@
"name": "airTicks",
"checks": [
{
"from": 767,
"from": 769,
"to": 47,
"offset": 1
}
@ -16,7 +16,7 @@
"name": "customName",
"checks": [
{
"from": 767,
"from": 769,
"to": 47,
"offset": 2
}
@ -26,7 +26,7 @@
"name": "customNameVisible",
"checks": [
{
"from": 767,
"from": 769,
"to": 47,
"offset": 3
}
@ -36,7 +36,7 @@
"name": "silent",
"checks": [
{
"from": 767,
"from": 769,
"to": 47,
"offset": 4
}
@ -46,7 +46,7 @@
"name": "hasNoGravity",
"checks": [
{
"from": 767,
"from": 769,
"to": 47,
"offset": 5
}
@ -56,7 +56,7 @@
"name": "pose",
"checks": [
{
"from": 767,
"from": 769,
"to": 47,
"offset": 6
}
@ -66,7 +66,7 @@
"name": "ticksFrozenInPowderedSnow",
"checks": [
{
"from": 767,
"from": 769,
"to": 47,
"offset": 7
}
@ -74,9 +74,6 @@
}
]
},
{
"class-name": "AbstractDisplayMeta",
"offsets": [
@ -84,7 +81,7 @@
"name": "interpolationDelay",
"checks": [
{
"from": 767,
"from": 769,
"to": 762,
"offset": 8
}
@ -94,7 +91,7 @@
"name": "transformationDuration",
"checks": [
{
"from": 767,
"from": 769,
"to": 762,
"offset": 9
}
@ -104,7 +101,7 @@
"name": "positionRotationInterpolationDuration",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 10
}
@ -114,7 +111,7 @@
"name": "translation",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 11
},
@ -129,7 +126,7 @@
"name": "scale",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 12
},
@ -144,7 +141,7 @@
"name": "leftRotation",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 13
},
@ -159,7 +156,7 @@
"name": "rightRotation",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 14
},
@ -174,7 +171,7 @@
"name": "billboardConstraints",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 15
},
@ -189,7 +186,7 @@
"name": "brightnessOverride",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 16
},
@ -204,7 +201,7 @@
"name": "viewRange",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 17
},
@ -219,7 +216,7 @@
"name": "shadowRadius",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 18
},
@ -234,7 +231,7 @@
"name": "shadowStrength",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 19
},
@ -249,7 +246,7 @@
"name": "width",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 20
},
@ -264,7 +261,7 @@
"name": "height",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 21
},
@ -279,7 +276,7 @@
"name": "glowColorOverride",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 22
},
@ -299,7 +296,7 @@
"name": "blockId",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 23
},
@ -319,7 +316,7 @@
"name": "item",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 24
},
@ -334,7 +331,7 @@
"name": "displayType",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 25
},
@ -354,7 +351,7 @@
"name": "text",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 26
},
@ -369,7 +366,7 @@
"name": "textColor",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 27
},
@ -384,7 +381,7 @@
"name": "textBackgroundColor",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 28
},
@ -399,7 +396,7 @@
"name": "textBackground",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 29
},
@ -414,7 +411,7 @@
"name": "textScale",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 30
},
@ -429,12 +426,12 @@
"name": "textAlignment",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 31
},
{
"from": 767,
"from": 769,
"to": 762,
"offset": 30
}
@ -444,7 +441,7 @@
"name": "lineWidth",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 32
},
@ -459,7 +456,7 @@
"name": "backgroundColor",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 33
},
@ -474,7 +471,7 @@
"name": "textOpacity",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 34
},
@ -489,7 +486,7 @@
"name": "shadow",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 35
},
@ -504,7 +501,7 @@
"name": "seeThrough",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 36
},
@ -519,7 +516,7 @@
"name": "useDefaultBackground",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 37
},
@ -531,10 +528,10 @@
]
},
{
"name": "allighnLeft",
"name": "alignLeft",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 38
},
@ -546,10 +543,10 @@
]
},
{
"name": "allighnRight",
"name": "alignRight",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 39
},
@ -561,10 +558,10 @@
]
},
{
"name": "allighnCenter",
"name": "alignCenter",
"checks": [
{
"from": 767,
"from": 769,
"to": 764,
"offset": 40
},