From 51909df66356c30fce4550546024b711bb0ebf0d Mon Sep 17 00:00:00 2001
From: TheBlackfurGuy <64478051+TheBlackfurGuy@users.noreply.github.com>
Date: Tue, 4 Jan 2022 20:04:49 +0100
Subject: [PATCH] Finally fixed a dumb sync issue :D
---
.idea/workspace.xml | 73 ++++++-------------
.../block/ToasterBlockEntity.java | 10 ++-
2 files changed, 29 insertions(+), 54 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 602a358..669ceee 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,9 +4,8 @@
-
+
-
@@ -100,7 +99,7 @@
-
+
@@ -143,50 +142,6 @@
false
-
-
-
-
-
-
-
-
-
-
- true
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- true
- false
-
-
@@ -215,7 +170,7 @@
-
+
@@ -231,10 +186,16 @@
false
+
+
+
+
+
+
+
+
-
-
@@ -306,7 +267,14 @@
1638808282960
-
+
+ 1641316900137
+
+
+
+ 1641316900137
+
+
@@ -330,6 +298,7 @@
-
+
+
\ No newline at end of file
diff --git a/src/main/java/blackfur/tastytoasters/block/ToasterBlockEntity.java b/src/main/java/blackfur/tastytoasters/block/ToasterBlockEntity.java
index 93fd718..1df3adf 100644
--- a/src/main/java/blackfur/tastytoasters/block/ToasterBlockEntity.java
+++ b/src/main/java/blackfur/tastytoasters/block/ToasterBlockEntity.java
@@ -8,10 +8,9 @@ import net.minecraft.nbt.NbtCompound;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
-import net.fabricmc.fabric.api.block.entity.BlockEntityClientSerializable;
-public class ToasterBlockEntity extends BlockEntity implements BlockEntityClientSerializable {
+public class ToasterBlockEntity extends BlockEntity {
private int cookTicks;
public ToasterBlockEntity(BlockPos pos, BlockState state) {
@@ -52,4 +51,11 @@ public class ToasterBlockEntity extends BlockEntity implements BlockEntityClient
super.readNbt(tag);
cookTicks = tag.getInt("cookTime");
}
+
+ @Override
+ public NbtCompound toInitialChunkDataNbt() {
+ NbtCompound tag = super.toInitialChunkDataNbt();
+ tag.putInt("cookTime", cookTicks);
+ return tag;
+ }
}