parent
72c85fa67b
commit
9096dbd53a
@ -0,0 +1,14 @@
|
||||
package com.thebrokenrail.energonrelics.api.item;
|
||||
|
||||
import net.minecraft.text.MutableText;
|
||||
|
||||
/**
|
||||
* Implement To provide Extra Information In Multimeter
|
||||
*/
|
||||
public interface MultimeterExtra {
|
||||
/**
|
||||
* Get Extra Information
|
||||
* @return Text
|
||||
*/
|
||||
MutableText getExtra();
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
package com.thebrokenrail.energonrelics.block;
|
||||
|
||||
import com.thebrokenrail.energonrelics.EnergonRelics;
|
||||
import com.thebrokenrail.energonrelics.api.block.energy.EnergyBlock;
|
||||
import com.thebrokenrail.energonrelics.block.entity.shifter.PhaseShifterBlockEntity;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.DyeItem;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.screen.HopperScreenHandler;
|
||||
import net.minecraft.screen.SimpleNamedScreenHandlerFactory;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.BooleanProperty;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
import net.minecraft.state.property.Properties;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.DyeColor;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PhaseShifterBlock extends EnergyBlock {
|
||||
public static final BooleanProperty POWERED = Properties.POWERED;
|
||||
public static final BooleanProperty IS_OUTPUT = BooleanProperty.of("is_output");
|
||||
public static final EnumProperty<DyeColor> COLOR = EnumProperty.of("color", DyeColor.class);
|
||||
|
||||
public PhaseShifterBlock() {
|
||||
super(FabricBlockSettings.copy(Blocks.IRON_BLOCK).lightLevel(state -> state.get(POWERED) ? 13 : 0).emissiveLighting((state, world, pos) -> state.get(POWERED)));
|
||||
setDefaultState(getDefaultState().with(POWERED, false).with(IS_OUTPUT, false).with(COLOR, DyeColor.WHITE));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
super.appendProperties(builder);
|
||||
builder.add(POWERED, IS_OUTPUT, COLOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Function<BlockEntityType<BlockEntity>, BlockEntity> getFactory() {
|
||||
return PhaseShifterBlockEntity::new;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext ctx) {
|
||||
return getDefaultState().with(IS_OUTPUT, ctx.getWorld().isReceivingRedstonePower(ctx.getBlockPos()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) {
|
||||
if (!world.isClient()) {
|
||||
boolean bl = state.get(IS_OUTPUT);
|
||||
if (bl != world.isReceivingRedstonePower(pos)) {
|
||||
if (bl) {
|
||||
world.getBlockTickScheduler().schedule(pos, this, 4);
|
||||
} else {
|
||||
world.setBlockState(pos, state.cycle(IS_OUTPUT), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||
if (state.get(IS_OUTPUT) && !world.isReceivingRedstonePower(pos)) {
|
||||
world.setBlockState(pos, state.cycle(IS_OUTPUT), 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
ItemStack stack = player.getStackInHand(hand);
|
||||
BlockEntity entity = world.getBlockEntity(pos);
|
||||
|
||||
if (stack.getItem() instanceof DyeItem) {
|
||||
DyeColor newColor = ((DyeItem) stack.getItem()).getColor();
|
||||
if (state.get(COLOR) != newColor) {
|
||||
world.setBlockState(pos, state.with(COLOR, newColor));
|
||||
if (!player.isCreative()) {
|
||||
stack.decrement(1);
|
||||
}
|
||||
return ActionResult.SUCCESS;
|
||||
} else {
|
||||
return ActionResult.PASS;
|
||||
}
|
||||
} else {
|
||||
if (entity instanceof Inventory) {
|
||||
if (!world.isClient()) {
|
||||
player.openHandledScreen(new SimpleNamedScreenHandlerFactory((i, inv, player2) -> new HopperScreenHandler(i, inv, (Inventory) entity), new TranslatableText("block." + EnergonRelics.NAMESPACE + ".phase_shifter")));
|
||||
}
|
||||
return ActionResult.SUCCESS;
|
||||
} else {
|
||||
return ActionResult.FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean hasInventory() {
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,267 @@
|
||||
package com.thebrokenrail.energonrelics.block.entity.shifter;
|
||||
|
||||
import com.thebrokenrail.energonrelics.EnergonRelics;
|
||||
import com.thebrokenrail.energonrelics.api.block.entity.core.EnergyReceiverBlockEntity;
|
||||
import com.thebrokenrail.energonrelics.api.energy.Action;
|
||||
import com.thebrokenrail.energonrelics.api.energy.tick.EnergyTickable;
|
||||
import com.thebrokenrail.energonrelics.api.energy.tick.EnergyTicker;
|
||||
import com.thebrokenrail.energonrelics.api.item.MultimeterExtra;
|
||||
import com.thebrokenrail.energonrelics.block.PhaseShifterBlock;
|
||||
import com.thebrokenrail.energonrelics.block.entity.reactor.ReactorInputBlockEntity;
|
||||
import com.thebrokenrail.energonrelics.config.HardcodedConfig;
|
||||
import com.thebrokenrail.energonrelics.util.WeightedList;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.Inventories;
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListTag;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.MutableText;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public class PhaseShifterBlockEntity extends EnergyReceiverBlockEntity implements Inventory, MultimeterExtra {
|
||||
private final static int INVENTORY_SIZE = ReactorInputBlockEntity.INVENTORY_SIZE;
|
||||
|
||||
private final DefaultedList<ItemStack> inv = DefaultedList.ofSize(INVENTORY_SIZE, ItemStack.EMPTY);
|
||||
|
||||
private int cooldown = 0;
|
||||
|
||||
public PhaseShifterBlockEntity(BlockEntityType<?> type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return inv.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
boolean empty = false;
|
||||
for (ItemStack stack : inv) {
|
||||
if (stack.isEmpty()) {
|
||||
empty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return empty;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStack(int slot) {
|
||||
return inv.get(slot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeStack(int slot, int amount) {
|
||||
ItemStack stack = Inventories.splitStack(inv, slot, amount);
|
||||
if (!stack.isEmpty()) {
|
||||
markDirty();
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeStack(int slot) {
|
||||
return Inventories.removeStack(inv, slot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStack(int slot, ItemStack stack) {
|
||||
inv.set(slot, stack);
|
||||
if (stack.getCount() > getMaxCountPerStack()) {
|
||||
stack.setCount(getMaxCountPerStack());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayerUse(PlayerEntity player) {
|
||||
if (Objects.requireNonNull(getWorld()).getBlockEntity(getPos()) != this) {
|
||||
return false;
|
||||
} else {
|
||||
return player.squaredDistanceTo((double) getPos().getX() + 0.5D, (double) getPos().getY() + 0.5D, (double) getPos().getZ() + 0.5D) <= 64.0D;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
inv.clear();
|
||||
}
|
||||
|
||||
private final List<PhasedItem> phasedItems = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void fromTag(BlockState state, CompoundTag tag) {
|
||||
super.fromTag(state, tag);
|
||||
inv.clear();
|
||||
Inventories.fromTag(tag, inv);
|
||||
cooldown = tag.getInt("Cooldown");
|
||||
|
||||
phasedItems.clear();
|
||||
Tag list = tag.get("PhasedItems");
|
||||
if (list instanceof ListTag) {
|
||||
ListTag itemsTag = (ListTag) list;
|
||||
for (int i = 0; i < itemsTag.size(); i++) {
|
||||
phasedItems.add(PhasedItem.fromTag(itemsTag.getCompound(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int canInsert(ItemStack stack) {
|
||||
if (stack.getCount() <= getMaxCountPerStack()) {
|
||||
for (int slot = 0; slot < size(); slot++) {
|
||||
ItemStack oldStack = getStack(slot);
|
||||
if (oldStack.isItemEqual(stack)) {
|
||||
int newCount = oldStack.getCount() + stack.getCount();
|
||||
if (newCount <= Math.min(oldStack.getMaxCount(), getMaxCountPerStack())) {
|
||||
return slot;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int slot = 0; slot < size(); slot++) {
|
||||
ItemStack oldStack = getStack(slot);
|
||||
if (oldStack.isEmpty()) {
|
||||
return slot;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
private long getCost() {
|
||||
return getCachedState().get(PhaseShifterBlock.IS_OUTPUT) ? HardcodedConfig.PHASE_SHIFTER_OUTPUT_ENERGY_REQUIRED : HardcodedConfig.PHASE_SHIFTER_INPUT_ENERGY_REQUIRED_BASE + (HardcodedConfig.PHASE_SHIFTER_INPUT_ENERGY_REQUIRED_PER_ITEM * phasedItems.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void energyTick() {
|
||||
assert getWorld() != null;
|
||||
|
||||
addAction(Action.createBlockStatePropertyAction(getCost(), PhaseShifterBlock.POWERED, true, false));
|
||||
|
||||
boolean dirty = false;
|
||||
|
||||
if (cooldown > 0) {
|
||||
cooldown--;
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
if (getCachedState().get(PhaseShifterBlock.POWERED) && !getCachedState().get(PhaseShifterBlock.IS_OUTPUT)) {
|
||||
List<PhaseShifterBlockEntity> outputs = new ArrayList<>();
|
||||
for (EnergyTickable tickable : EnergyTicker.allLoaded) {
|
||||
if (tickable instanceof PhaseShifterBlockEntity && ((PhaseShifterBlockEntity) tickable).getCachedState().get(PhaseShifterBlock.IS_OUTPUT) && Objects.requireNonNull(((PhaseShifterBlockEntity) tickable).getWorld()).getRegistryKey() == getWorld().getRegistryKey() && ((PhaseShifterBlockEntity) tickable).cooldown == 0 && ((PhaseShifterBlockEntity) tickable).getCachedState().get(PhaseShifterBlock.COLOR) == getCachedState().get(PhaseShifterBlock.COLOR)) {
|
||||
outputs.add((PhaseShifterBlockEntity) tickable);
|
||||
}
|
||||
}
|
||||
|
||||
if (phasedItems.size() > 0) {
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
Iterator<PhasedItem> iterator = phasedItems.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
PhasedItem item = iterator.next();
|
||||
|
||||
if (item.cooldown > 0) {
|
||||
item.cooldown--;
|
||||
} else {
|
||||
Map<PhaseShifterBlockEntity, Integer> validOutputs = new HashMap<>();
|
||||
for (PhaseShifterBlockEntity output : outputs) {
|
||||
int slot = output.canInsert(item.item);
|
||||
if (slot != -1 && output.getPos().isWithinDistance(getPos(), item.getRange())) {
|
||||
validOutputs.put(output, slot);
|
||||
}
|
||||
}
|
||||
|
||||
boolean success = validOutputs.size() > 0 && HardcodedConfig.PHASE_SHIFTER_SUCCESS_CHANCE >= getWorld().random.nextFloat();
|
||||
|
||||
if (success) {
|
||||
WeightedList<PhaseShifterBlockEntity> weightedList = new WeightedList<>();
|
||||
for (PhaseShifterBlockEntity output : validOutputs.keySet()) {
|
||||
weightedList.add(1, output);
|
||||
}
|
||||
|
||||
PhaseShifterBlockEntity output = weightedList.pick(getWorld().random);
|
||||
|
||||
int slot = validOutputs.get(output);
|
||||
|
||||
ItemStack stack = item.item.copy();
|
||||
stack.increment(output.getStack(slot).getCount());
|
||||
|
||||
output.setStack(slot, stack);
|
||||
|
||||
output.resetCooldown();
|
||||
|
||||
output.markDirty();
|
||||
|
||||
iterator.remove();
|
||||
} else {
|
||||
item.roll++;
|
||||
item.cooldown = HardcodedConfig.PHASE_SHIFTER_INPUT_ROLL_COOLDOWN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cooldown == 0) {
|
||||
ItemStack next = ItemStack.EMPTY;
|
||||
|
||||
for (int slot = 0; slot < size(); slot++) {
|
||||
ItemStack stack = getStack(slot);
|
||||
if (!stack.isEmpty()) {
|
||||
next = stack.split(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!next.isEmpty()) {
|
||||
phasedItems.add(new PhasedItem(next));
|
||||
resetCooldown();
|
||||
dirty = true;
|
||||
}
|
||||
}
|
||||
} else if (phasedItems.size() > 0) {
|
||||
phasedItems.clear();
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
if (dirty) {
|
||||
markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
private void resetCooldown() {
|
||||
cooldown = getCachedState().get(PhaseShifterBlock.IS_OUTPUT) ? HardcodedConfig.PHASE_SHIFTER_OUTPUT_COOLDOWN : HardcodedConfig.PHASE_SHIFTER_INPUT_COOLDOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundTag toTag(CompoundTag tag) {
|
||||
super.toTag(tag);
|
||||
Inventories.toTag(tag, inv);
|
||||
tag.putInt("Cooldown", cooldown);
|
||||
|
||||
ListTag itemsTag = new ListTag();
|
||||
for (PhasedItem item : phasedItems) {
|
||||
itemsTag.add(item.toTag());
|
||||
}
|
||||
tag.put("PhasedItems", itemsTag);
|
||||
|
||||
return tag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MutableText getExtra() {
|
||||
return getCachedState().get(PhaseShifterBlock.IS_OUTPUT) ? null : new TranslatableText("text." + EnergonRelics.NAMESPACE + ".phase_shifter_extra", new LiteralText(String.valueOf(phasedItems.size())).formatted(Formatting.WHITE));
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.thebrokenrail.energonrelics.block.entity.shifter;
|
||||
|
||||
import com.thebrokenrail.energonrelics.config.HardcodedConfig;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
||||
class PhasedItem {
|
||||
final ItemStack item;
|
||||
int cooldown = 0;
|
||||
int roll = 0;
|
||||
|
||||
PhasedItem(ItemStack item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
int getRange() {
|
||||
return HardcodedConfig.PHASE_SHIFTER_INPUT_RANGE_BASE + (roll * HardcodedConfig.PHASE_SHIFTER_INPUT_RANGE_INCREMENT);
|
||||
}
|
||||
|
||||
CompoundTag toTag() {
|
||||
CompoundTag tag = new CompoundTag();
|
||||
tag.put("Item", item.toTag(new CompoundTag()));
|
||||
tag.putInt("Cooldown", cooldown);
|
||||
tag.putInt("Roll", roll);
|
||||
return tag;
|
||||
}
|
||||
|
||||
static PhasedItem fromTag(CompoundTag tag) {
|
||||
PhasedItem item = new PhasedItem(ItemStack.fromTag(tag.getCompound("Item")));
|
||||
item.cooldown = tag.getInt("Cooldown");
|
||||
item.roll = tag.getInt("Roll");
|
||||
return item;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"variants": {
|
||||
"powered=false,is_output=false": {
|
||||
"model": "energonrelics:block/phase_shifter_off_input"
|
||||
},
|
||||
"powered=true,is_output=false": {
|
||||
"model": "energonrelics:block/phase_shifter_on_input"
|
||||
},
|
||||
"powered=false,is_output=true": {
|
||||
"model": "energonrelics:block/phase_shifter_off_output"
|
||||
},
|
||||
"powered=true,is_output=true": {
|
||||
"model": "energonrelics:block/phase_shifter_on_output"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"particle": "#all",
|
||||
"tint": "energonrelics:block/phase_shifter_tint"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"down": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "down"},
|
||||
"up": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "up"},
|
||||
"north": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "north"},
|
||||
"south": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "south"},
|
||||
"west": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "west"},
|
||||
"east": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "east"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"down": {"uv": [0, 0, 16, 16], "texture": "#tint", "cullface": "down", "tintindex": 0},
|
||||
"up": {"uv": [0, 0, 16, 16], "texture": "#tint", "cullface": "up", "tintindex": 0},
|
||||
"north": {"uv": [0, 0, 16, 16], "texture": "#tint", "cullface": "north", "tintindex": 0},
|
||||
"south": {"uv": [0, 0, 16, 16], "texture": "#tint", "cullface": "south", "tintindex": 0},
|
||||
"west": {"uv": [0, 0, 16, 16], "texture": "#tint", "cullface": "west", "tintindex": 0},
|
||||
"east": {"uv": [0, 0, 16, 16], "texture": "#tint", "cullface": "east", "tintindex": 0}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "energonrelics:block/phase_shifter",
|
||||
"textures": {
|
||||
"all": "energonrelics:block/phase_shifter_off_input"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "energonrelics:block/phase_shifter",
|
||||
"textures": {
|
||||
"all": "energonrelics:block/phase_shifter_off_output"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "energonrelics:block/phase_shifter",
|
||||
"textures": {
|
||||
"all": "energonrelics:block/phase_shifter_on_input"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "energonrelics:block/phase_shifter",
|
||||
"textures": {
|
||||
"all": "energonrelics:block/phase_shifter_on_output"
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "energonrelics:block/phase_shifter_off_input"
|
||||
}
|
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 6.9 KiB |
@ -0,0 +1,19 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "energonrelics:phase_shifter"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"#I#",
|
||||
"IEI",
|
||||
"#I#"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "energonrelics:circuit_board"
|
||||
},
|
||||
"I": {
|
||||
"item": "minecraft:iron_ingot"
|
||||
},
|
||||
"E": {
|
||||
"item": "minecraft:ender_pearl"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "energonrelics:phase_shifter",
|
||||
"count": 2
|
||||
}
|
||||
}
|
Loading…
Reference in new issue