mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed block disguises losing their state after loading from a save
This commit is contained in:
parent
4af11dfd30
commit
b364111df6
1 changed files with 5 additions and 0 deletions
|
@ -129,6 +129,11 @@ public class Disguise implements NbtSerialisable {
|
||||||
if (source.isClient()) {
|
if (source.isClient()) {
|
||||||
entity = EntityType.fromTag(nbt).map(type -> type.create(source.getWorld())).orElse(null);
|
entity = EntityType.fromTag(nbt).map(type -> type.create(source.getWorld())).orElse(null);
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
|
try {
|
||||||
|
entity.fromTag(nbt);
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
// Mojang pls
|
||||||
|
}
|
||||||
entity = EntityBehaviour.forEntity(entity).onCreate(entity, this);
|
entity = EntityBehaviour.forEntity(entity).onCreate(entity, this);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue