Skip to content

Commit

Permalink
Fixed Simple Compacting Drawers not respecting Downgrades, closes #323
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuz135 committed Oct 28, 2024
1 parent 39f9726 commit 2cb4708
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Added obsidian generator upgrade, closes #334
* Fixed compacting recipes generating in the wrong path
* Added a tick for access points to update connections, closes #327
* Fixed NBT getting readded every time drawers get placed and broken, closes #330

# VERSION 1.3.3
* Added dripping upgrade that will fill fluid drawers with lava
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.chat.Component;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
Expand Down Expand Up @@ -110,6 +111,7 @@
import net.neoforged.neoforge.common.crafting.IngredientType;
import net.neoforged.neoforge.common.util.Lazy;
import net.neoforged.neoforge.data.event.GatherDataEvent;
import net.neoforged.neoforge.event.entity.player.ItemTooltipEvent;
import net.neoforged.neoforge.event.entity.player.PlayerInteractEvent;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.NeoForgeRegistries;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
import com.buuz135.functionalstorage.item.LinkingToolItem;
import com.hrznstudio.titanium.block.RotatableBlock;
import com.hrznstudio.titanium.datagenerator.loot.block.BasicBlockLootTables;
import com.hrznstudio.titanium.nbthandler.NBTManager;
import com.hrznstudio.titanium.util.RayTraceUtils;
import com.hrznstudio.titanium.util.TileUtil;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.NonNullList;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.world.InteractionHand;
Expand All @@ -42,6 +44,7 @@
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;
import org.checkerframework.checker.units.qual.C;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;
Expand Down Expand Up @@ -138,7 +141,7 @@ public NonNullList<ItemStack> getDynamicDrops(BlockState state, Level worldIn, B

protected void copyTo(T tile, ItemStack stack) {
if (!tile.isEverythingEmpty()) {
stack.set(FSAttachments.TILE, tile.saveWithoutMetadata(tile.getLevel().registryAccess()));
stack.set(FSAttachments.TILE, NBTManager.getInstance().writeTileEntity(tile, new CompoundTag()));
}
if (tile.isLocked()) {
stack.set(FSAttachments.LOCKED, tile.isLocked());
Expand Down

0 comments on commit 2cb4708

Please sign in to comment.