2021-07-13 15:07:56 +02:00
|
|
|
package io.gitlab.jfronny.libjf.mixin;
|
|
|
|
|
2021-09-10 19:02:15 +02:00
|
|
|
import io.gitlab.jfronny.libjf.data.Tags;
|
2021-07-13 15:07:56 +02:00
|
|
|
import net.minecraft.block.entity.ShulkerBoxBlockEntity;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.util.math.Direction;
|
|
|
|
import org.spongepowered.asm.mixin.Mixin;
|
|
|
|
import org.spongepowered.asm.mixin.Overwrite;
|
|
|
|
|
|
|
|
@Mixin(ShulkerBoxBlockEntity.class)
|
|
|
|
public class ShulkerBoxBlockEntityMixin {
|
|
|
|
/**
|
|
|
|
* @reason Required for custom blocked items to work properly.
|
|
|
|
* None of the original content of the method is useful and may actually break this
|
|
|
|
* Any other mod modifying this will have the same intention and collisions would occur
|
|
|
|
* If that ever happens a library should be created but for now this works
|
|
|
|
* @author JFronny
|
|
|
|
*/
|
|
|
|
@Overwrite
|
|
|
|
public boolean canInsert(int slot, ItemStack stack, Direction dir) {
|
2021-09-10 19:02:15 +02:00
|
|
|
return !Tags.SHULKER_ILLEGAL.contains(stack.getItem());
|
2021-07-13 15:07:56 +02:00
|
|
|
}
|
|
|
|
}
|