add dynamic texture changing
This commit is contained in:
parent
aea7c5f7a2
commit
b26e405d41
2 changed files with 13 additions and 4 deletions
|
@ -26,7 +26,7 @@ public class WrapperEntity implements Tickable, TrackedEntity {
|
||||||
private boolean ticking;
|
private boolean ticking;
|
||||||
protected Location location;
|
protected Location location;
|
||||||
private Location preRidingLocation;
|
private Location preRidingLocation;
|
||||||
private final Set<UUID> viewers;
|
protected final Set<UUID> viewers;
|
||||||
private boolean onGround;
|
private boolean onGround;
|
||||||
private boolean spawned;
|
private boolean spawned;
|
||||||
private Vector3d velocity;
|
private Vector3d velocity;
|
||||||
|
|
|
@ -68,10 +68,19 @@ public class WrapperPlayer extends WrapperLivingEntity {
|
||||||
|
|
||||||
public void setTextureProperties(List<TextureProperty> textureProperties) {
|
public void setTextureProperties(List<TextureProperty> textureProperties) {
|
||||||
profile.setTextureProperties(textureProperties);
|
profile.setTextureProperties(textureProperties);
|
||||||
despawn();
|
WrapperPlayServerDestroyEntities destroyEntities = new WrapperPlayServerDestroyEntities(getEntityId());
|
||||||
System.out.println("Despawning");
|
WrapperPlayServerPlayerInfoRemove removePacket = new WrapperPlayServerPlayerInfoRemove(getUuid());
|
||||||
EntityLib.getApi().runLater(() -> spawn(getLocation()), 2L);
|
WrapperPlayServerPlayerInfoUpdate updatePacket = tabListPacket();
|
||||||
|
{
|
||||||
|
sendPacketToViewers(removePacket);
|
||||||
|
sendPacketToViewers(destroyEntities);
|
||||||
|
|
||||||
|
sendPacketToViewers(updatePacket);
|
||||||
|
for (UUID viewer : viewers) {
|
||||||
|
removeViewer(viewer);
|
||||||
|
addViewer(viewer);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameMode getGameMode() {
|
public GameMode getGameMode() {
|
||||||
|
|
Loading…
Reference in a new issue