reduces logging messages
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ loader_version=0.19.3
|
|||||||
loom_version=1.17-SNAPSHOT
|
loom_version=1.17-SNAPSHOT
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=26.2.0.0
|
mod_version=26.2.0.1
|
||||||
maven_group=de.jottyfan.minecraft
|
maven_group=de.jottyfan.minecraft
|
||||||
archives_base_name=quickly
|
archives_base_name=quickly
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,17 @@ package de.jottyfan.minecraft.blockentity;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.jspecify.annotations.Nullable;
|
||||||
|
|
||||||
import com.mojang.serialization.Codec;
|
import com.mojang.serialization.Codec;
|
||||||
|
|
||||||
import de.jottyfan.minecraft.Quickly;
|
import de.jottyfan.minecraft.Quickly;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.HolderLookup.Provider;
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
import net.minecraft.network.protocol.Packet;
|
||||||
|
import net.minecraft.network.protocol.game.ClientGamePacketListener;
|
||||||
import net.minecraft.world.Container;
|
import net.minecraft.world.Container;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.item.ItemEntity;
|
import net.minecraft.world.entity.item.ItemEntity;
|
||||||
@@ -29,7 +35,7 @@ import net.minecraft.world.phys.AABB;
|
|||||||
public class ItemHoarderBlockEntity extends BlockEntity implements Container {
|
public class ItemHoarderBlockEntity extends BlockEntity implements Container {
|
||||||
|
|
||||||
public static final Codec<Map<String, ItemStack>> ITEM_STACK_MAP_CODEC =
|
public static final Codec<Map<String, ItemStack>> ITEM_STACK_MAP_CODEC =
|
||||||
Codec.unboundedMap(Codec.STRING, ItemStack.CODEC);
|
Codec.unboundedMap(Codec.STRING, ItemStack.OPTIONAL_CODEC);
|
||||||
|
|
||||||
private Map<String, ItemStack> stacks = new HashMap<>();
|
private Map<String, ItemStack> stacks = new HashMap<>();
|
||||||
private static final Integer suckradius = 4;
|
private static final Integer suckradius = 4;
|
||||||
@@ -40,7 +46,7 @@ public class ItemHoarderBlockEntity extends BlockEntity implements Container {
|
|||||||
|
|
||||||
public final static boolean setStackToSlots(ItemStack stack, Map<String, ItemStack> stacks) {
|
public final static boolean setStackToSlots(ItemStack stack, Map<String, ItemStack> stacks) {
|
||||||
if (stack.isEmpty()) {
|
if (stack.isEmpty()) {
|
||||||
Quickly.LOGGER.info("FATAL!!! tried to set empty stack. Check your code!");
|
Quickly.LOGGER.error("FATAL!!! tried to set empty stack. Check your code!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String key = stack.getItemName().getString();
|
String key = stack.getItemName().getString();
|
||||||
|
|||||||
Reference in New Issue
Block a user