Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Fix Piglin bartering animation (Fixes #863)
Dieser Commit ist enthalten in:
Ursprung
a16deb269a
Commit
c2be7a181d
@ -31,6 +31,7 @@ import com.nukkitx.protocol.bedrock.data.entity.EntityData;
|
|||||||
import com.nukkitx.protocol.bedrock.data.entity.EntityFlag;
|
import com.nukkitx.protocol.bedrock.data.entity.EntityFlag;
|
||||||
import org.geysermc.connector.entity.type.EntityType;
|
import org.geysermc.connector.entity.type.EntityType;
|
||||||
import org.geysermc.connector.network.session.GeyserSession;
|
import org.geysermc.connector.network.session.GeyserSession;
|
||||||
|
import org.geysermc.connector.network.translators.item.ItemRegistry;
|
||||||
|
|
||||||
public class PiglinEntity extends MonsterEntity {
|
public class PiglinEntity extends MonsterEntity {
|
||||||
|
|
||||||
@ -56,4 +57,13 @@ public class PiglinEntity extends MonsterEntity {
|
|||||||
|
|
||||||
super.updateBedrockMetadata(entityMetadata, session);
|
super.updateBedrockMetadata(entityMetadata, session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateEquipment(GeyserSession session) {
|
||||||
|
// Check if the Piglin is holding Gold and set the ADMIRING flag accordingly
|
||||||
|
metadata.getFlags().setFlag(EntityFlag.ADMIRING, offHand.getId() == ItemRegistry.GOLD);
|
||||||
|
super.updateBedrockMetadata(session);
|
||||||
|
|
||||||
|
super.updateEquipment(session);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,8 @@ public class ItemRegistry {
|
|||||||
public static final int SHIELD = 829;
|
public static final int SHIELD = 829;
|
||||||
// Boat ID, used in BedrockInventoryTransactionTranslator.java
|
// Boat ID, used in BedrockInventoryTransactionTranslator.java
|
||||||
public static final int BOAT = 333;
|
public static final int BOAT = 333;
|
||||||
|
// Gold ID, used in PiglinEntity.java
|
||||||
|
public static final int GOLD = 266;
|
||||||
|
|
||||||
public static int BARRIER_INDEX = 0;
|
public static int BARRIER_INDEX = 0;
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren