mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 05:02:18 +00:00
Remove references to the now-broken BlockEntity#save(CompoundTag) method (#8235)
This commit is contained in:
1 parent
00fafb07ce
commit
75408c1a70
5 files changed
+8
-16
No files matched your search
@@ -24,17 +24,12 @@
|
||||
}
|
||||
|
||||
public static BlockPos m_187472_(CompoundTag p_187473_) {
|
||||
@@ -48,6 +_,13 @@
|
||||
@@ -48,6 +_,8 @@
|
||||
}
|
||||
|
||||
public void m_142466_(CompoundTag p_155245_) {
|
||||
+ if (p_155245_.m_128441_("ForgeData")) this.customTileData = p_155245_.m_128469_("ForgeData");
|
||||
+ if (getCapabilities() != null && p_155245_.m_128441_("ForgeCaps")) deserializeCaps(p_155245_.m_128469_("ForgeCaps"));
|
||||
+ }
|
||||
+
|
||||
+ public CompoundTag save(CompoundTag tag) {
|
||||
+ m_187478_(tag);
|
||||
+ return tag;
|
||||
}
|
||||
|
||||
protected void m_183515_(CompoundTag p_187471_) {
|
||||
|
||||
@@ -54,9 +54,7 @@ public interface IForgeBlockEntity extends ICapabilitySerializable<CompoundTag>
|
||||
@Override
|
||||
default CompoundTag serializeNBT()
|
||||
{
|
||||
CompoundTag ret = new CompoundTag();
|
||||
self().save(ret);
|
||||
return ret;
|
||||
return self().saveWithFullMetadata();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -84,7 +84,7 @@ public class BlockSnapshot
|
||||
@Nullable
|
||||
private static CompoundTag getBlockEntityTag(@Nullable BlockEntity te)
|
||||
{
|
||||
return te == null ? null : te.save(new CompoundTag());
|
||||
return te == null ? null : te.saveWithFullMetadata();
|
||||
}
|
||||
|
||||
public BlockState getCurrentBlock()
|
||||
|
||||
@@ -52,11 +52,10 @@ public class TileFluidHandler extends BlockEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundTag save(CompoundTag tag)
|
||||
protected void saveAdditional(CompoundTag tag)
|
||||
{
|
||||
super.save(tag);
|
||||
super.saveAdditional(tag);
|
||||
tank.writeToNBT(tag);
|
||||
return tag;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -205,7 +205,7 @@ public class FullPotsAccessorDemo
|
||||
@Override
|
||||
public CompoundTag getUpdateTag()
|
||||
{
|
||||
return save(new CompoundTag());
|
||||
return saveWithFullMetadata();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -238,11 +238,11 @@ public class FullPotsAccessorDemo
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundTag save(CompoundTag tag)
|
||||
protected void saveAdditional(CompoundTag tag)
|
||||
{
|
||||
//noinspection ConstantConditions
|
||||
tag.putString("plant", plant.getRegistryName().toString());
|
||||
return super.save(tag);
|
||||
super.saveAdditional(tag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user