mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-09 01:17:36 +00:00
fix redo exception; fix positioning of entities in redo
This commit is contained in:
parent
51cdd66c62
commit
84d2c8f2ce
@ -78,12 +78,12 @@ public class MutableEntityChange implements Change {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<DoubleTag> pos = (List<DoubleTag>) posTag.getValue();
|
List<DoubleTag> pos = (List<DoubleTag>) posTag.getValue();
|
||||||
int x = MathMan.roundInt(pos.get(0).getValue());
|
double x = pos.get(0).getValue();
|
||||||
int y = MathMan.roundInt(pos.get(1).getValue());
|
double y = pos.get(1).getValue();
|
||||||
int z = MathMan.roundInt(pos.get(2).getValue());
|
double z = pos.get(2).getValue();
|
||||||
Extent extent = context.getExtent();
|
Extent extent = context.getExtent();
|
||||||
Location location = new Location(extent, x, y, z, 0, 0);
|
Location location = new Location(extent, x, y, z, 0, 0);
|
||||||
String id = tag.getString("id");
|
String id = tag.getString("Id");
|
||||||
EntityType type = EntityTypes.parse(id);
|
EntityType type = EntityTypes.parse(id);
|
||||||
BaseEntity entity = new BaseEntity(type, tag);
|
BaseEntity entity = new BaseEntity(type, tag);
|
||||||
context.getExtent().createEntity(location, entity);
|
context.getExtent().createEntity(location, entity);
|
||||||
|
Loading…
Reference in New Issue
Block a user