fix: issues with merge

This commit is contained in:
Michael Hillcox 2021-08-22 22:40:28 +01:00
parent ab166cb0e4
commit cb45e86529
7 changed files with 112 additions and 111 deletions

View file

@ -28,10 +28,10 @@ public class BlockRecipeGenerator extends RecipeProvider {
//Farmer //Farmer
Recipe.shaped(ActuallyBlocks.FARMER.get()) Recipe.shaped(ActuallyBlocks.FARMER.get())
.pattern("ISI", "SCS", "ISI") .pattern("ISI", "SCS", "ISI")
.key('I', ActuallyBlocks.ENORI_CRYSTAL.getItem()) .define('I', ActuallyBlocks.ENORI_CRYSTAL.getItem())
.key('C', ActuallyBlocks.IRON_CASING.get()) .define('C', ActuallyBlocks.IRON_CASING.get())
.key('S', Tags.Items.SEEDS) .define('S', Tags.Items.SEEDS)
.build(consumer); .save(consumer);
//Empowerer //Empowerer
Recipe.shaped(ActuallyBlocks.EMPOWERER.get()) Recipe.shaped(ActuallyBlocks.EMPOWERER.get())
@ -132,59 +132,60 @@ public class BlockRecipeGenerator extends RecipeProvider {
// Atomic Reconstructor // Atomic Reconstructor
Recipe.shaped(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get()) Recipe.shaped(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get())
.pattern("IRI", "RCR", "IRI") .pattern("IRI", "RCR", "IRI")
.key('R', Tags.Items.DUSTS_REDSTONE) .define('R', Tags.Items.DUSTS_REDSTONE)
.key('I', Tags.Items.INGOTS_IRON) .define('I', Tags.Items.INGOTS_IRON)
.key('C', ActuallyBlocks.IRON_CASING.get()) .define('C', ActuallyBlocks.IRON_CASING.get())
.build(consumer); .save(consumer);
// Laser Relay // Laser Relay
Recipe.shaped(ActuallyBlocks.LASER_RELAY.get(), 4) Recipe.shaped(ActuallyBlocks.LASER_RELAY.get(), 4)
.pattern("OBO","RCR","OBO") .pattern("OBO", "RCR", "OBO")
.key('B', Tags.Items.STORAGE_BLOCKS_REDSTONE) .define('B', Tags.Items.STORAGE_BLOCKS_REDSTONE)
.key('O', Tags.Items.OBSIDIAN) .define('O', Tags.Items.OBSIDIAN)
.key('R', ActuallyItems.RESTONIA_CRYSTAL.get()) .define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
.key('C', ActuallyItems.COIL_ADVANCED.get()) .define('C', ActuallyItems.COIL_ADVANCED.get())
.build(consumer); .save(consumer);
// Advanced Laser Relay // Advanced Laser Relay
Recipe.shaped(ActuallyBlocks.LASER_RELAY_ADVANCED.get()) Recipe.shaped(ActuallyBlocks.LASER_RELAY_ADVANCED.get())
.pattern(" I ", "XRX", " I ") .pattern(" I ", "XRX", " I ")
.key('I', ActuallyItems.ENORI_CRYSTAL.get()) .define('I', ActuallyItems.ENORI_CRYSTAL.get())
.key('R', ActuallyBlocks.LASER_RELAY.get()) .define('R', ActuallyBlocks.LASER_RELAY.get())
.key('X', ActuallyItems.RESTONIA_CRYSTAL.get()) .define('X', ActuallyItems.RESTONIA_CRYSTAL.get())
.build(consumer); .save(consumer);
// Extreme Laser Relay // Extreme Laser Relay
Recipe.shaped(ActuallyBlocks.LASER_RELAY_EXTREME.get()) Recipe.shaped(ActuallyBlocks.LASER_RELAY_EXTREME.get())
.pattern(" I ", "XRX", " I ") .pattern(" I ", "XRX", " I ")
.key('I', ActuallyItems.DIAMATINE_EMPOWERED_CRYSTAL.get()) .define('I', ActuallyItems.DIAMATINE_EMPOWERED_CRYSTAL.get())
.key('R', ActuallyBlocks.LASER_RELAY_ADVANCED.get()) .define('R', ActuallyBlocks.LASER_RELAY_ADVANCED.get())
.key('X', ActuallyItems.RESTONIA_CRYSTAL.get()) .define('X', ActuallyItems.RESTONIA_CRYSTAL.get())
.build(consumer); .save(consumer);
// Whitelist Item Laser Relay // Whitelist Item Laser Relay
Recipe.shapeless(ActuallyBlocks.LASER_RELAY_ITEM_ADVANCED.get()) Recipe.shapeless(ActuallyBlocks.LASER_RELAY_ITEM_ADVANCED.get())
.ingredients(ActuallyBlocks.LASER_RELAY_ITEM.get(), ActuallyItems.COIL_ADVANCED.get(), ActuallyItems.BLACK_QUARTZ.get()) .ingredients(ActuallyBlocks.LASER_RELAY_ITEM.get(), ActuallyItems.COIL_ADVANCED.get(), ActuallyItems.BLACK_QUARTZ.get())
.build(consumer); .save(consumer);
// Item Interface // Item Interface
Recipe.shaped(ActuallyBlocks.ITEM_VIEWER.get()) Recipe.shaped(ActuallyBlocks.ITEM_VIEWER.get())
.pattern("OBO", "RCR", "OBO") .pattern("OBO", "RCR", "OBO")
.key('B', Tags.Items.DUSTS_REDSTONE) .define('B', Tags.Items.DUSTS_REDSTONE)
.key('O', ActuallyItems.COIL.get()) .define('O', ActuallyItems.COIL.get())
.key('R', ActuallyItems.RESTONIA_CRYSTAL.get()) .define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
.key('C', Tags.Items.CHESTS_WOODEN) .define('C', Tags.Items.CHESTS_WOODEN)
.build(consumer); .save(consumer);
// Hopping Item Interface // Hopping Item Interface
Recipe.shapeless(ActuallyBlocks.ITEM_VIEWER_HOPPING.get()).ingredients(ActuallyBlocks.ITEM_VIEWER.get()).build(consumer); Recipe.shapeless(ActuallyBlocks.ITEM_VIEWER_HOPPING.get()).ingredients(ActuallyBlocks.ITEM_VIEWER.get()).save(consumer);
} }
@Override @Override
protected void saveRecipeAdvancement(DirectoryCache cache, JsonObject cache2, Path advancementJson) { protected void saveAdvancement(DirectoryCache p_208310_1_, JsonObject p_208310_2_, Path p_208310_3_) {
//Nope... maybe later... //Nope... maybe later...
} }
public static class Recipe { public static class Recipe {

View file

@ -26,10 +26,6 @@ public class ContainerDirectionalBreaker extends Container {
public final TileEntityLongRangeBreaker breaker; public final TileEntityLongRangeBreaker breaker;
public static ContainerDirectionalBreaker fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerDirectionalBreaker(windowId, inv, (TileEntityDirectionalBreaker) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
}
public ContainerDirectionalBreaker(int windowId, PlayerInventory inventory, TileEntityLongRangeBreaker tile) { public ContainerDirectionalBreaker(int windowId, PlayerInventory inventory, TileEntityLongRangeBreaker tile) {
super(ActuallyContainers.DIRECTIONAL_BREAKER_CONTAINER.get(), windowId); super(ActuallyContainers.DIRECTIONAL_BREAKER_CONTAINER.get(), windowId);
this.breaker = tile; this.breaker = tile;
@ -50,6 +46,10 @@ public class ContainerDirectionalBreaker extends Container {
} }
} }
public static ContainerDirectionalBreaker fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerDirectionalBreaker(windowId, inv, (TileEntityLongRangeBreaker) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
}
@Override @Override
public ItemStack quickMoveStack(PlayerEntity player, int slot) { public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 9; int inventoryStart = 9;

View file

@ -30,10 +30,6 @@ public class ContainerFurnaceDouble extends Container {
public final TileEntityPoweredFurnace furnace; public final TileEntityPoweredFurnace furnace;
public static ContainerFurnaceDouble fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerFurnaceDouble(windowId, inv, (TileEntityFurnaceDouble) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
}
public ContainerFurnaceDouble(int windowId, PlayerInventory inventory, TileEntityPoweredFurnace tile) { public ContainerFurnaceDouble(int windowId, PlayerInventory inventory, TileEntityPoweredFurnace tile) {
super(ActuallyContainers.FURNACE_DOUBLE_CONTAINER.get(), windowId); super(ActuallyContainers.FURNACE_DOUBLE_CONTAINER.get(), windowId);
this.furnace = tile; this.furnace = tile;
@ -53,6 +49,10 @@ public class ContainerFurnaceDouble extends Container {
} }
} }
public static ContainerFurnaceDouble fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerFurnaceDouble(windowId, inv, (TileEntityPoweredFurnace) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
}
@Override @Override
public ItemStack quickMoveStack(PlayerEntity player, int slot) { public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 4; int inventoryStart = 4;
@ -67,7 +67,7 @@ public class ContainerFurnaceDouble extends Container {
ItemStack currentStack = newStack.copy(); ItemStack currentStack = newStack.copy();
//Slots in Inventory to shift from //Slots in Inventory to shift from
if (slot == TileEntityFurnaceDouble.SLOT_OUTPUT_1 || slot == TileEntityFurnaceDouble.SLOT_OUTPUT_2) { if (slot == TileEntityPoweredFurnace.SLOT_OUTPUT_1 || slot == TileEntityPoweredFurnace.SLOT_OUTPUT_2) {
if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, true)) { if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, true)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
@ -85,8 +85,8 @@ public class ContainerFurnaceDouble extends Container {
//Shift from Inventory //Shift from Inventory
if (StackUtil.isValid(recipeOutput)) { if (StackUtil.isValid(recipeOutput)) {
if (!this.moveItemStackTo(newStack, TileEntityFurnaceDouble.SLOT_INPUT_1, TileEntityFurnaceDouble.SLOT_INPUT_1 + 1, false)) { if (!this.moveItemStackTo(newStack, TileEntityPoweredFurnace.SLOT_INPUT_1, TileEntityPoweredFurnace.SLOT_INPUT_1 + 1, false)) {
if (!this.moveItemStackTo(newStack, TileEntityFurnaceDouble.SLOT_INPUT_2, TileEntityFurnaceDouble.SLOT_INPUT_2 + 1, false)) { if (!this.moveItemStackTo(newStack, TileEntityPoweredFurnace.SLOT_INPUT_2, TileEntityPoweredFurnace.SLOT_INPUT_2 + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} }

View file

@ -28,10 +28,6 @@ public class ContainerGrinder extends Container {
public final TileEntityCrusher tileGrinder; public final TileEntityCrusher tileGrinder;
public final boolean isDouble; public final boolean isDouble;
public static ContainerGrinder fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerGrinder(windowId, inv, (TileEntityGrinder) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
}
public ContainerGrinder(int windowId, PlayerInventory inventory, TileEntityCrusher tile) { public ContainerGrinder(int windowId, PlayerInventory inventory, TileEntityCrusher tile) {
super(ActuallyContainers.GRINDER_CONTAINER.get(), windowId); super(ActuallyContainers.GRINDER_CONTAINER.get(), windowId);
this.tileGrinder = tile; this.tileGrinder = tile;
@ -62,6 +58,10 @@ public class ContainerGrinder extends Container {
} }
} }
public static ContainerGrinder fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerGrinder(windowId, inv, (TileEntityCrusher) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
}
@Override @Override
public ItemStack quickMoveStack(PlayerEntity player, int slot) { public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = this.isDouble int inventoryStart = this.isDouble
@ -78,7 +78,7 @@ public class ContainerGrinder extends Container {
ItemStack currentStack = newStack.copy(); ItemStack currentStack = newStack.copy();
//Slots in Inventory to shift from //Slots in Inventory to shift from
if (slot == TileEntityGrinder.SLOT_OUTPUT_1_1 || slot == TileEntityGrinder.SLOT_OUTPUT_1_2 || this.isDouble && (slot == TileEntityGrinder.SLOT_OUTPUT_2_1 || slot == TileEntityGrinder.SLOT_OUTPUT_2_2)) { if (slot == TileEntityCrusher.SLOT_OUTPUT_1_1 || slot == TileEntityCrusher.SLOT_OUTPUT_1_2 || this.isDouble && (slot == TileEntityCrusher.SLOT_OUTPUT_2_1 || slot == TileEntityCrusher.SLOT_OUTPUT_2_2)) {
if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, true)) { if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, true)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
@ -88,9 +88,9 @@ public class ContainerGrinder extends Container {
else if (slot >= inventoryStart) { else if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (CrusherRecipeRegistry.getRecipeFromInput(newStack) != null) { if (CrusherRecipeRegistry.getRecipeFromInput(newStack) != null) {
if (!this.moveItemStackTo(newStack, TileEntityGrinder.SLOT_INPUT_1, TileEntityGrinder.SLOT_INPUT_1 + 1, false)) { if (!this.moveItemStackTo(newStack, TileEntityCrusher.SLOT_INPUT_1, TileEntityCrusher.SLOT_INPUT_1 + 1, false)) {
if (this.isDouble) { if (this.isDouble) {
if (!this.moveItemStackTo(newStack, TileEntityGrinder.SLOT_INPUT_2, TileEntityGrinder.SLOT_INPUT_2 + 1, false)) { if (!this.moveItemStackTo(newStack, TileEntityCrusher.SLOT_INPUT_2, TileEntityCrusher.SLOT_INPUT_2 + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} else { } else {

View file

@ -27,10 +27,6 @@ public class ContainerLaserRelayItemWhitelist extends Container {
public final TileEntityLaserRelayItemAdvanced tile; public final TileEntityLaserRelayItemAdvanced tile;
public static ContainerLaserRelayItemWhitelist fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerLaserRelayItemWhitelist(windowId, inv, (TileEntityLaserRelayItemWhitelist) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
}
public ContainerLaserRelayItemWhitelist(int windowId, PlayerInventory inventory, TileEntityLaserRelayItemAdvanced tile) { public ContainerLaserRelayItemWhitelist(int windowId, PlayerInventory inventory, TileEntityLaserRelayItemAdvanced tile) {
super(ActuallyContainers.LASER_RELAY_ITEM_WHITELIST_CONTAINER.get(), windowId); super(ActuallyContainers.LASER_RELAY_ITEM_WHITELIST_CONTAINER.get(), windowId);
this.tile = tile; this.tile = tile;
@ -55,6 +51,10 @@ public class ContainerLaserRelayItemWhitelist extends Container {
} }
} }
public static ContainerLaserRelayItemWhitelist fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerLaserRelayItemWhitelist(windowId, inv, (TileEntityLaserRelayItemAdvanced) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
}
@Override @Override
public ItemStack quickMoveStack(PlayerEntity player, int slot) { public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 24; int inventoryStart = 24;

View file

@ -26,10 +26,6 @@ public class ContainerMiner extends Container {
public final TileEntityVerticalDigger miner; public final TileEntityVerticalDigger miner;
public static ContainerMiner fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerMiner(windowId, inv, (TileEntityMiner) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
}
public ContainerMiner(int windowId, PlayerInventory inventory, TileEntityVerticalDigger tile) { public ContainerMiner(int windowId, PlayerInventory inventory, TileEntityVerticalDigger tile) {
super(ActuallyContainers.MINER_CONTAINER.get(), windowId); super(ActuallyContainers.MINER_CONTAINER.get(), windowId);
this.miner = tile; this.miner = tile;
@ -50,6 +46,10 @@ public class ContainerMiner extends Container {
} }
} }
public static ContainerMiner fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerMiner(windowId, inv, (TileEntityVerticalDigger) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
}
@Override @Override
public ItemStack quickMoveStack(PlayerEntity player, int slot) { public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 9; int inventoryStart = 9;

View file

@ -86,7 +86,7 @@ public class EnergyDisplay extends AbstractGui {
List<String> text = new ArrayList<>(); List<String> text = new ArrayList<>();
text.add(this.getOverlayText()); text.add(this.getOverlayText());
GuiUtils.drawHoveringText(text, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.font); GuiUtils.drawHoveringText(matrices, text, mouseX, mouseY, mc.getWindow().getWidth(), mc.getWindow().getHeight(), -1, mc.font);
} }
} }