Skip to content

Commit

Permalink
stopped caching the machine tier
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed May 28, 2024
1 parent 9f6becc commit e117210
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion common/src/main/java/muramasa/antimatter/Ref.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public class Ref {
public static final String KEY_STACK_NO_CONSUME = "nc";
public static final String KEY_STACK_IGNORE_NBT = "inb";

public static final String KEY_MACHINE_TIER = "t";
public static final String KEY_MACHINE_ITEMS = "it";
public static final String KEY_MACHINE_STATE = "s";
public static final String KEY_MACHINE_STATE_D = "sd";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,6 @@ public void animateTick(BlockState state, Level level, BlockPos pos, Random rand
@Override
public void load(CompoundTag tag) {
super.load(tag);
this.tier = AntimatterAPI.get(Tier.class, tag.getString(Ref.KEY_MACHINE_TIER));

setMachineState(MachineState.VALUES[tag.getInt(Ref.KEY_MACHINE_STATE)]);
if (tag.contains(Ref.KEY_MACHINE_MUFFLED)) {
Expand Down Expand Up @@ -667,7 +666,6 @@ public void load(CompoundTag tag) {
@Override
public void saveAdditional(CompoundTag tag) {
super.saveAdditional(tag);
tag.putString(Ref.KEY_MACHINE_TIER, getMachineTier().getId());
tag.putInt(Ref.KEY_MACHINE_STATE, machineState.ordinal());
tag.putBoolean(Ref.KEY_MACHINE_MUFFLED, muffled);
if (disabledState != null)
Expand All @@ -689,7 +687,6 @@ public CompoundTag getUpdateTag() {
if (this.getMachineType().renderContainerLiquids()) {
fluidHandler.ifPresent(e -> tag.put(Ref.KEY_MACHINE_FLUIDS, e.serialize(new CompoundTag())));
}
tag.putString(Ref.KEY_MACHINE_TIER, getMachineTier().getId());
tag.putInt(Ref.KEY_MACHINE_STATE, machineState.ordinal());
tag.putBoolean(Ref.KEY_MACHINE_MUFFLED, muffled);
return tag;
Expand Down

0 comments on commit e117210

Please sign in to comment.