Skip to content

Commit

Permalink
Макс где мои пельмени?
Browse files Browse the repository at this point in the history
  • Loading branch information
Reider745 committed May 9, 2024
1 parent ca04aef commit 48b5bec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/resources/innercore/coreengine/core-engine.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -828,19 +828,21 @@ var TileEntity = {

Prototype.saverId = Saver.registerObjectSaver(saverName, {
read: function(obj) {
if(TileEntity.getTileEntity(obj.coords.x, obj.coords.y, obj.coords.z, BlockSource.getDefaultForDimension(obj.coords.d))){
print("Duplicate TileEntity detected: "+obj.coords.x+":"+obj.coords.y+":"+obj.coords.z);
if (!obj || !obj.coords) {
print("Corrupted data "+JSON.stringify(obj));
return;
}

if (!obj || !obj.coords) {
if(TileEntity.getTileEntity(obj.coords.x, obj.coords.y, obj.coords.z, BlockSource.getDefaultForDimension(obj.coords.d))){
print("Duplicate TileEntity detected: "+obj.coords.x+":"+obj.coords.y+":"+obj.coords.z);
return;
}

var instance = {};
for (var property in Prototype) {
instance[property] = Prototype[property];
}
instance.data = obj.data;
instance.data = obj.data || {};
instance.x = obj.coords.x || 0;
instance.y = obj.coords.y || 0;
instance.z = obj.coords.z || 0;
Expand Down

0 comments on commit 48b5bec

Please sign in to comment.