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

@ -27,62 +27,62 @@ public class BlockRecipeGenerator extends RecipeProvider {
//Farmer
Recipe.shaped(ActuallyBlocks.FARMER.get())
.pattern("ISI", "SCS", "ISI")
.key('I', ActuallyBlocks.ENORI_CRYSTAL.getItem())
.key('C', ActuallyBlocks.IRON_CASING.get())
.key('S', Tags.Items.SEEDS)
.build(consumer);
.pattern("ISI", "SCS", "ISI")
.define('I', ActuallyBlocks.ENORI_CRYSTAL.getItem())
.define('C', ActuallyBlocks.IRON_CASING.get())
.define('S', Tags.Items.SEEDS)
.save(consumer);
//Empowerer
Recipe.shaped(ActuallyBlocks.EMPOWERER.get())
.pattern(" R ", " B ", "CDC")
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
.define('B', ActuallyItems.BATTERY_DOUBLE.get())
.define('C', ActuallyBlocks.IRON_CASING.get())
.define('D', ActuallyBlocks.DISPLAY_STAND.get())
.save(consumer);
.pattern(" R ", " B ", "CDC")
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
.define('B', ActuallyItems.BATTERY_DOUBLE.get())
.define('C', ActuallyBlocks.IRON_CASING.get())
.define('D', ActuallyBlocks.DISPLAY_STAND.get())
.save(consumer);
//Tiny Torch
Recipe.shaped(ActuallyBlocks.TINY_TORCH.get(), 2)
.pattern("C", "S")
.define('C', ActuallyTags.Items.TINY_COALS)
.define('S', Tags.Items.RODS_WOODEN)
.save(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_torch"));
.pattern("C", "S")
.define('C', ActuallyTags.Items.TINY_COALS)
.define('S', Tags.Items.RODS_WOODEN)
.save(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_torch"));
//Fireworks Box
Recipe.shaped(ActuallyBlocks.FIREWORK_BOX.get())
.pattern("GFG", "SAS", "CCC")
.define('G', Tags.Items.GUNPOWDER)
.define('S', Tags.Items.RODS_WOODEN)
.define('A', ActuallyBlocks.IRON_CASING.get())
.define('F', Items.FIREWORK_ROCKET)
.define('C', ActuallyItems.ENORI_CRYSTAL.get())
.save(consumer);
.pattern("GFG", "SAS", "CCC")
.define('G', Tags.Items.GUNPOWDER)
.define('S', Tags.Items.RODS_WOODEN)
.define('A', ActuallyBlocks.IRON_CASING.get())
.define('F', Items.FIREWORK_ROCKET)
.define('C', ActuallyItems.ENORI_CRYSTAL.get())
.save(consumer);
//Shock Suppressor
Recipe.shaped(ActuallyBlocks.SHOCK_SUPPRESSOR.get())
.pattern("OAO", "ACA", "OAO")
.define('A', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
.define('O', Tags.Items.OBSIDIAN)
.define('C', ActuallyItems.COIL_ADVANCED.get())
.save(consumer);
.pattern("OAO", "ACA", "OAO")
.define('A', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
.define('O', Tags.Items.OBSIDIAN)
.define('C', ActuallyItems.COIL_ADVANCED.get())
.save(consumer);
//Display Stand
Recipe.shaped(ActuallyBlocks.DISPLAY_STAND.get())
.pattern(" R ", "EEE", "GGG")
.define('R', ActuallyItems.COIL_ADVANCED.get())
.define('E', ActuallyBlocks.ETHETIC_GREEN_BLOCK.get())
.define('G', ActuallyBlocks.ETHETIC_WHITE_BLOCK.get())
.save(consumer);
.pattern(" R ", "EEE", "GGG")
.define('R', ActuallyItems.COIL_ADVANCED.get())
.define('E', ActuallyBlocks.ETHETIC_GREEN_BLOCK.get())
.define('G', ActuallyBlocks.ETHETIC_WHITE_BLOCK.get())
.save(consumer);
//Vertical Digger
Recipe.shaped(ActuallyBlocks.Vertical_DIGGER.get())
.pattern("IRI", "RCR", "IDI")
.define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE)
.define('I', ActuallyBlocks.IRON_CASING.get())
.define('C', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
.define('D', ActuallyItems.DRILL.get())
.save(consumer);
.pattern("IRI", "RCR", "IDI")
.define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE)
.define('I', ActuallyBlocks.IRON_CASING.get())
.define('C', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
.define('D', ActuallyItems.DRILL.get())
.save(consumer);
//Black Quartz Wall
Recipe.wall(ActuallyBlocks.BLACK_QUARTZ_WALL.get(), ActuallyBlocks.BLACK_QUARTZ_PILLAR_BLOCK.get(), consumer);
@ -131,60 +131,61 @@ public class BlockRecipeGenerator extends RecipeProvider {
// Atomic Reconstructor
Recipe.shaped(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get())
.pattern("IRI", "RCR", "IRI")
.key('R', Tags.Items.DUSTS_REDSTONE)
.key('I', Tags.Items.INGOTS_IRON)
.key('C', ActuallyBlocks.IRON_CASING.get())
.build(consumer);
.pattern("IRI", "RCR", "IRI")
.define('R', Tags.Items.DUSTS_REDSTONE)
.define('I', Tags.Items.INGOTS_IRON)
.define('C', ActuallyBlocks.IRON_CASING.get())
.save(consumer);
// Laser Relay
Recipe.shaped(ActuallyBlocks.LASER_RELAY.get(), 4)
.pattern("OBO","RCR","OBO")
.key('B', Tags.Items.STORAGE_BLOCKS_REDSTONE)
.key('O', Tags.Items.OBSIDIAN)
.key('R', ActuallyItems.RESTONIA_CRYSTAL.get())
.key('C', ActuallyItems.COIL_ADVANCED.get())
.build(consumer);
.pattern("OBO", "RCR", "OBO")
.define('B', Tags.Items.STORAGE_BLOCKS_REDSTONE)
.define('O', Tags.Items.OBSIDIAN)
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
.define('C', ActuallyItems.COIL_ADVANCED.get())
.save(consumer);
// Advanced Laser Relay
Recipe.shaped(ActuallyBlocks.LASER_RELAY_ADVANCED.get())
.pattern(" I ", "XRX", " I ")
.key('I', ActuallyItems.ENORI_CRYSTAL.get())
.key('R', ActuallyBlocks.LASER_RELAY.get())
.key('X', ActuallyItems.RESTONIA_CRYSTAL.get())
.build(consumer);
.pattern(" I ", "XRX", " I ")
.define('I', ActuallyItems.ENORI_CRYSTAL.get())
.define('R', ActuallyBlocks.LASER_RELAY.get())
.define('X', ActuallyItems.RESTONIA_CRYSTAL.get())
.save(consumer);
// Extreme Laser Relay
Recipe.shaped(ActuallyBlocks.LASER_RELAY_EXTREME.get())
.pattern(" I ", "XRX", " I ")
.key('I', ActuallyItems.DIAMATINE_EMPOWERED_CRYSTAL.get())
.key('R', ActuallyBlocks.LASER_RELAY_ADVANCED.get())
.key('X', ActuallyItems.RESTONIA_CRYSTAL.get())
.build(consumer);
.pattern(" I ", "XRX", " I ")
.define('I', ActuallyItems.DIAMATINE_EMPOWERED_CRYSTAL.get())
.define('R', ActuallyBlocks.LASER_RELAY_ADVANCED.get())
.define('X', ActuallyItems.RESTONIA_CRYSTAL.get())
.save(consumer);
// Whitelist Item Laser Relay
Recipe.shapeless(ActuallyBlocks.LASER_RELAY_ITEM_ADVANCED.get())
.ingredients(ActuallyBlocks.LASER_RELAY_ITEM.get(), ActuallyItems.COIL_ADVANCED.get(), ActuallyItems.BLACK_QUARTZ.get())
.build(consumer);
.ingredients(ActuallyBlocks.LASER_RELAY_ITEM.get(), ActuallyItems.COIL_ADVANCED.get(), ActuallyItems.BLACK_QUARTZ.get())
.save(consumer);
// Item Interface
Recipe.shaped(ActuallyBlocks.ITEM_VIEWER.get())
.pattern("OBO", "RCR", "OBO")
.key('B', Tags.Items.DUSTS_REDSTONE)
.key('O', ActuallyItems.COIL.get())
.key('R', ActuallyItems.RESTONIA_CRYSTAL.get())
.key('C', Tags.Items.CHESTS_WOODEN)
.build(consumer);
.pattern("OBO", "RCR", "OBO")
.define('B', Tags.Items.DUSTS_REDSTONE)
.define('O', ActuallyItems.COIL.get())
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
.define('C', Tags.Items.CHESTS_WOODEN)
.save(consumer);
// 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
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...
}
public static class Recipe {

View file

@ -26,10 +26,6 @@ public class ContainerDirectionalBreaker extends Container {
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) {
super(ActuallyContainers.DIRECTIONAL_BREAKER_CONTAINER.get(), windowId);
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
public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 9;

View file

@ -30,10 +30,6 @@ public class ContainerFurnaceDouble extends Container {
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) {
super(ActuallyContainers.FURNACE_DOUBLE_CONTAINER.get(), windowId);
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
public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 4;
@ -67,7 +67,7 @@ public class ContainerFurnaceDouble extends Container {
ItemStack currentStack = newStack.copy();
//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)) {
return StackUtil.getEmpty();
}
@ -80,13 +80,13 @@ public class ContainerFurnaceDouble extends Container {
if (irecipe == null) {
return StackUtil.getEmpty();
}
ItemStack recipeOutput = irecipe.getResultItem();
//Shift from Inventory
if (StackUtil.isValid(recipeOutput)) {
if (!this.moveItemStackTo(newStack, TileEntityFurnaceDouble.SLOT_INPUT_1, TileEntityFurnaceDouble.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_1, TileEntityPoweredFurnace.SLOT_INPUT_1 + 1, false)) {
if (!this.moveItemStackTo(newStack, TileEntityPoweredFurnace.SLOT_INPUT_2, TileEntityPoweredFurnace.SLOT_INPUT_2 + 1, false)) {
return StackUtil.getEmpty();
}
}

View file

@ -28,24 +28,20 @@ public class ContainerGrinder extends Container {
public final TileEntityCrusher tileGrinder;
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) {
super(ActuallyContainers.GRINDER_CONTAINER.get(), windowId);
this.tileGrinder = tile;
this.isDouble = tile.isDouble;
this.addSlot(new SlotItemHandlerUnconditioned(this.tileGrinder.inv, TileEntityCrusher.SLOT_INPUT_1, this.isDouble
? 51
: 80, 21));
? 51
: 80, 21));
this.addSlot(new SlotOutput(this.tileGrinder.inv, TileEntityCrusher.SLOT_OUTPUT_1_1, this.isDouble
? 37
: 66, 69));
? 37
: 66, 69));
this.addSlot(new SlotOutput(this.tileGrinder.inv, TileEntityCrusher.SLOT_OUTPUT_1_2, this.isDouble
? 64
: 92, 69));
? 64
: 92, 69));
if (this.isDouble) {
this.addSlot(new SlotItemHandlerUnconditioned(this.tileGrinder.inv, TileEntityCrusher.SLOT_INPUT_2, 109, 21));
this.addSlot(new SlotOutput(this.tileGrinder.inv, TileEntityCrusher.SLOT_OUTPUT_2_1, 96, 69));
@ -62,11 +58,15 @@ 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
public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = this.isDouble
? 6
: 3;
? 6
: 3;
int inventoryEnd = inventoryStart + 26;
int hotbarStart = inventoryEnd + 1;
int hotbarEnd = hotbarStart + 8;
@ -78,7 +78,7 @@ public class ContainerGrinder extends Container {
ItemStack currentStack = newStack.copy();
//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)) {
return StackUtil.getEmpty();
}
@ -88,9 +88,9 @@ public class ContainerGrinder extends Container {
else if (slot >= inventoryStart) {
//Shift from Inventory
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.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();
}
} else {

View file

@ -27,10 +27,6 @@ public class ContainerLaserRelayItemWhitelist extends Container {
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) {
super(ActuallyContainers.LASER_RELAY_ITEM_WHITELIST_CONTAINER.get(), windowId);
this.tile = tile;
@ -39,8 +35,8 @@ public class ContainerLaserRelayItemWhitelist extends Container {
for (int x = 0; x < 3; x++) {
for (int y = 0; y < 4; y++) {
this.addSlot(new SlotFilter(i == 0
? this.tile.leftFilter
: this.tile.rightFilter, y + x * 4, 20 + i * 84 + x * 18, 6 + y * 18));
? this.tile.leftFilter
: this.tile.rightFilter, y + x * 4, 20 + i * 84 + x * 18, 6 + y * 18));
}
}
}
@ -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
public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 24;

View file

@ -26,10 +26,6 @@ public class ContainerMiner extends Container {
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) {
super(ActuallyContainers.MINER_CONTAINER.get(), windowId);
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
public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 9;

View file

@ -86,16 +86,16 @@ public class EnergyDisplay extends AbstractGui {
List<String> text = new ArrayList<>();
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);
}
}
private boolean isMouseOver(int mouseX, int mouseY) {
return mouseX >= this.x && mouseY >= this.y && mouseX < this.x + (this.outline
? 26
: 18) && mouseY < this.y + (this.outline
? 93
: 85);
? 26
: 18) && mouseY < this.y + (this.outline
? 93
: 85);
}
private String getOverlayText() {