Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Fix tags and attributes
Dieser Commit ist enthalten in:
Ursprung
aed7f1bed7
Commit
94e533ea7c
@ -299,7 +299,7 @@ public class LivingEntity extends Entity {
|
|||||||
case GENERIC_MOVEMENT_SPEED -> newAttributes.add(calculateAttribute(javaAttribute, GeyserAttributeType.MOVEMENT_SPEED));
|
case GENERIC_MOVEMENT_SPEED -> newAttributes.add(calculateAttribute(javaAttribute, GeyserAttributeType.MOVEMENT_SPEED));
|
||||||
case GENERIC_FOLLOW_RANGE -> newAttributes.add(calculateAttribute(javaAttribute, GeyserAttributeType.FOLLOW_RANGE));
|
case GENERIC_FOLLOW_RANGE -> newAttributes.add(calculateAttribute(javaAttribute, GeyserAttributeType.FOLLOW_RANGE));
|
||||||
case GENERIC_KNOCKBACK_RESISTANCE -> newAttributes.add(calculateAttribute(javaAttribute, GeyserAttributeType.KNOCKBACK_RESISTANCE));
|
case GENERIC_KNOCKBACK_RESISTANCE -> newAttributes.add(calculateAttribute(javaAttribute, GeyserAttributeType.KNOCKBACK_RESISTANCE));
|
||||||
case HORSE_JUMP_STRENGTH -> newAttributes.add(calculateAttribute(javaAttribute, GeyserAttributeType.HORSE_JUMP_STRENGTH));
|
case GENERIC_JUMP_STRENGTH -> newAttributes.add(calculateAttribute(javaAttribute, GeyserAttributeType.HORSE_JUMP_STRENGTH));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ public class AxolotlEntity extends AnimalEntity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canEat(Item item) {
|
public boolean canEat(Item item) {
|
||||||
return session.getTagCache().isAxolotlTemptItem(item);
|
return session.getTagCache().isAxolotlFood(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -368,7 +368,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
|||||||
/**
|
/**
|
||||||
* All dimensions that the client could possibly connect to.
|
* All dimensions that the client could possibly connect to.
|
||||||
*/
|
*/
|
||||||
private final Map<String, JavaDimension> dimensions = new Object2ObjectOpenHashMap<>(3);
|
private final Int2ObjectMap<JavaDimension> dimensions = new Int2ObjectOpenHashMap<>(4);
|
||||||
|
|
||||||
private final Int2ObjectMap<TextDecoration> chatTypes = new Int2ObjectOpenHashMap<>(7);
|
private final Int2ObjectMap<TextDecoration> chatTypes = new Int2ObjectOpenHashMap<>(7);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public class TagCache {
|
|||||||
private IntList requiresDiamondTool;
|
private IntList requiresDiamondTool;
|
||||||
|
|
||||||
/* Items */
|
/* Items */
|
||||||
private IntList axolotlTemptItems;
|
private IntList axolotlFood;
|
||||||
private IntList creeperIgniters;
|
private IntList creeperIgniters;
|
||||||
private IntList fishes;
|
private IntList fishes;
|
||||||
private IntList flowers;
|
private IntList flowers;
|
||||||
@ -96,7 +96,7 @@ public class TagCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Map<String, int[]> itemTags = packet.getTags().get("minecraft:item");
|
Map<String, int[]> itemTags = packet.getTags().get("minecraft:item");
|
||||||
this.axolotlTemptItems = IntList.of(itemTags.get("minecraft:axolotl_tempt_items"));
|
this.axolotlFood = IntList.of(itemTags.get("minecraft:axolotl_food"));
|
||||||
this.creeperIgniters = load(itemTags.get("minecraft:creeper_igniters"));
|
this.creeperIgniters = load(itemTags.get("minecraft:creeper_igniters"));
|
||||||
this.fishes = IntList.of(itemTags.get("minecraft:fishes"));
|
this.fishes = IntList.of(itemTags.get("minecraft:fishes"));
|
||||||
this.flowers = IntList.of(itemTags.get("minecraft:flowers"));
|
this.flowers = IntList.of(itemTags.get("minecraft:flowers"));
|
||||||
@ -133,7 +133,7 @@ public class TagCache {
|
|||||||
this.requiresIronTool = IntLists.emptyList();
|
this.requiresIronTool = IntLists.emptyList();
|
||||||
this.requiresDiamondTool = IntLists.emptyList();
|
this.requiresDiamondTool = IntLists.emptyList();
|
||||||
|
|
||||||
this.axolotlTemptItems = IntLists.emptyList();
|
this.axolotlFood = IntLists.emptyList();
|
||||||
this.creeperIgniters = IntLists.emptyList();
|
this.creeperIgniters = IntLists.emptyList();
|
||||||
this.fishes = IntLists.emptyList();
|
this.fishes = IntLists.emptyList();
|
||||||
this.flowers = IntLists.emptyList();
|
this.flowers = IntLists.emptyList();
|
||||||
@ -143,8 +143,8 @@ public class TagCache {
|
|||||||
this.snifferFood = IntLists.emptyList();
|
this.snifferFood = IntLists.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAxolotlTemptItem(Item item) {
|
public boolean isAxolotlFood(Item item) {
|
||||||
return axolotlTemptItems.contains(item.javaId());
|
return axolotlFood.contains(item.javaId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCreeperIgniter(Item item) {
|
public boolean isCreeperIgniter(Item item) {
|
||||||
|
@ -15,7 +15,7 @@ protocol-connection = "3.0.0.Beta1-20240411.165033-128"
|
|||||||
raknet = "1.0.0.CR3-20240416.144209-1"
|
raknet = "1.0.0.CR3-20240416.144209-1"
|
||||||
blockstateupdater="1.20.80-20240411.142413-1"
|
blockstateupdater="1.20.80-20240411.142413-1"
|
||||||
mcauthlib = "d9d773e"
|
mcauthlib = "d9d773e"
|
||||||
mcprotocollib = "b2e93c520a" # Revert from jitpack after release
|
mcprotocollib = "897eb241b6" # Revert from jitpack after release
|
||||||
adventure = "4.14.0"
|
adventure = "4.14.0"
|
||||||
adventure-platform = "4.3.0"
|
adventure-platform = "4.3.0"
|
||||||
junit = "5.9.2"
|
junit = "5.9.2"
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren