mirror of
https://github.com/GTNewHorizons/Baubles-Expanded.git
synced 2026-11-22 21:09:54 +00:00
allow other mods to force a save by marking the inventory as dirty
This commit is contained in:
1 parent
f3b5e12dac
commit
5d7c4825e5
4 files changed
+11
-3
No files matched your search
@@ -26,7 +26,7 @@ public class Baubles {
|
||||
|
||||
public static final String MODID = "Baubles";
|
||||
public static final String MODNAME = "Baubles";
|
||||
public static final String VERSION = "1.0.0.3";
|
||||
public static final String VERSION = "1.0.0.4";
|
||||
|
||||
@SidedProxy(clientSide = "baubles.client.ClientProxy", serverSide = "baubles.common.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
|
||||
public class InventoryBaubles implements IInventory {
|
||||
public ItemStack[] stackList;
|
||||
@@ -140,7 +141,11 @@ public class InventoryBaubles implements IInventory {
|
||||
* to disk later - the game won't think it hasn't changed and skip it.
|
||||
*/
|
||||
@Override
|
||||
public void markDirty() { }
|
||||
public void markDirty() {
|
||||
try {
|
||||
PlayerHandler.updatePlayerBaubles(player.get());
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not make give this method the name canInteractWith because it clashes
|
||||
|
||||
Reference in new issue
Block a user