only check tiles on the minecraft resource domain, should be a bit quicker

This commit is contained in:
modmuss50 2018-05-27 10:58:20 +01:00
parent 6bc73adc35
commit 874b08e919
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82

View file

@ -143,8 +143,10 @@ public enum ModTileEntities {
@Override @Override
public NBTTagCompound fixTagCompound(NBTTagCompound compound) { public NBTTagCompound fixTagCompound(NBTTagCompound compound) {
ResourceLocation tileEntityLocation = new ResourceLocation(compound.getString("id")); ResourceLocation tileEntityLocation = new ResourceLocation(compound.getString("id"));
if(tileEntityLocation.getResourceDomain().equalsIgnoreCase("minecraft")){
Optional<ModTileEntities> tileData = getFromOldName(tileEntityLocation.getResourcePath()); Optional<ModTileEntities> tileData = getFromOldName(tileEntityLocation.getResourcePath());
tileData.ifPresent(modTileEntities -> compound.setString("id", modTileEntities.name.toString())); tileData.ifPresent(modTileEntities -> compound.setString("id", modTileEntities.name.toString()));
}
return compound; return compound;
} }
}); });