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 //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())
.pattern(" R ", " B ", "CDC") .pattern(" R ", " B ", "CDC")
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get()) .define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
.define('B', ActuallyItems.BATTERY_DOUBLE.get()) .define('B', ActuallyItems.BATTERY_DOUBLE.get())
.define('C', ActuallyBlocks.IRON_CASING.get()) .define('C', ActuallyBlocks.IRON_CASING.get())
.define('D', ActuallyBlocks.DISPLAY_STAND.get()) .define('D', ActuallyBlocks.DISPLAY_STAND.get())
.save(consumer); .save(consumer);
//Tiny Torch //Tiny Torch
Recipe.shaped(ActuallyBlocks.TINY_TORCH.get(), 2) Recipe.shaped(ActuallyBlocks.TINY_TORCH.get(), 2)
.pattern("C", "S") .pattern("C", "S")
.define('C', ActuallyTags.Items.TINY_COALS) .define('C', ActuallyTags.Items.TINY_COALS)
.define('S', Tags.Items.RODS_WOODEN) .define('S', Tags.Items.RODS_WOODEN)
.save(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_torch")); .save(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_torch"));
//Fireworks Box //Fireworks Box
Recipe.shaped(ActuallyBlocks.FIREWORK_BOX.get()) Recipe.shaped(ActuallyBlocks.FIREWORK_BOX.get())
.pattern("GFG", "SAS", "CCC") .pattern("GFG", "SAS", "CCC")
.define('G', Tags.Items.GUNPOWDER) .define('G', Tags.Items.GUNPOWDER)
.define('S', Tags.Items.RODS_WOODEN) .define('S', Tags.Items.RODS_WOODEN)
.define('A', ActuallyBlocks.IRON_CASING.get()) .define('A', ActuallyBlocks.IRON_CASING.get())
.define('F', Items.FIREWORK_ROCKET) .define('F', Items.FIREWORK_ROCKET)
.define('C', ActuallyItems.ENORI_CRYSTAL.get()) .define('C', ActuallyItems.ENORI_CRYSTAL.get())
.save(consumer); .save(consumer);
//Shock Suppressor //Shock Suppressor
Recipe.shaped(ActuallyBlocks.SHOCK_SUPPRESSOR.get()) Recipe.shaped(ActuallyBlocks.SHOCK_SUPPRESSOR.get())
.pattern("OAO", "ACA", "OAO") .pattern("OAO", "ACA", "OAO")
.define('A', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get()) .define('A', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
.define('O', Tags.Items.OBSIDIAN) .define('O', Tags.Items.OBSIDIAN)
.define('C', ActuallyItems.COIL_ADVANCED.get()) .define('C', ActuallyItems.COIL_ADVANCED.get())
.save(consumer); .save(consumer);
//Display Stand //Display Stand
Recipe.shaped(ActuallyBlocks.DISPLAY_STAND.get()) Recipe.shaped(ActuallyBlocks.DISPLAY_STAND.get())
.pattern(" R ", "EEE", "GGG") .pattern(" R ", "EEE", "GGG")
.define('R', ActuallyItems.COIL_ADVANCED.get()) .define('R', ActuallyItems.COIL_ADVANCED.get())
.define('E', ActuallyBlocks.ETHETIC_GREEN_BLOCK.get()) .define('E', ActuallyBlocks.ETHETIC_GREEN_BLOCK.get())
.define('G', ActuallyBlocks.ETHETIC_WHITE_BLOCK.get()) .define('G', ActuallyBlocks.ETHETIC_WHITE_BLOCK.get())
.save(consumer); .save(consumer);
//Vertical Digger //Vertical Digger
Recipe.shaped(ActuallyBlocks.Vertical_DIGGER.get()) Recipe.shaped(ActuallyBlocks.Vertical_DIGGER.get())
.pattern("IRI", "RCR", "IDI") .pattern("IRI", "RCR", "IDI")
.define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE) .define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE)
.define('I', ActuallyBlocks.IRON_CASING.get()) .define('I', ActuallyBlocks.IRON_CASING.get())
.define('C', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get()) .define('C', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
.define('D', ActuallyItems.DRILL.get()) .define('D', ActuallyItems.DRILL.get())
.save(consumer); .save(consumer);
//Black Quartz Wall //Black Quartz Wall
Recipe.wall(ActuallyBlocks.BLACK_QUARTZ_WALL.get(), ActuallyBlocks.BLACK_QUARTZ_PILLAR_BLOCK.get(), consumer); 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 // 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();
} }
@ -80,13 +80,13 @@ public class ContainerFurnaceDouble extends Container {
if (irecipe == null) { if (irecipe == null) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
ItemStack recipeOutput = irecipe.getResultItem(); ItemStack recipeOutput = irecipe.getResultItem();
//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,24 +28,20 @@ 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;
this.isDouble = tile.isDouble; this.isDouble = tile.isDouble;
this.addSlot(new SlotItemHandlerUnconditioned(this.tileGrinder.inv, TileEntityCrusher.SLOT_INPUT_1, this.isDouble this.addSlot(new SlotItemHandlerUnconditioned(this.tileGrinder.inv, TileEntityCrusher.SLOT_INPUT_1, this.isDouble
? 51 ? 51
: 80, 21)); : 80, 21));
this.addSlot(new SlotOutput(this.tileGrinder.inv, TileEntityCrusher.SLOT_OUTPUT_1_1, this.isDouble this.addSlot(new SlotOutput(this.tileGrinder.inv, TileEntityCrusher.SLOT_OUTPUT_1_1, this.isDouble
? 37 ? 37
: 66, 69)); : 66, 69));
this.addSlot(new SlotOutput(this.tileGrinder.inv, TileEntityCrusher.SLOT_OUTPUT_1_2, this.isDouble this.addSlot(new SlotOutput(this.tileGrinder.inv, TileEntityCrusher.SLOT_OUTPUT_1_2, this.isDouble
? 64 ? 64
: 92, 69)); : 92, 69));
if (this.isDouble) { if (this.isDouble) {
this.addSlot(new SlotItemHandlerUnconditioned(this.tileGrinder.inv, TileEntityCrusher.SLOT_INPUT_2, 109, 21)); 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)); 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 @Override
public ItemStack quickMoveStack(PlayerEntity player, int slot) { public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = this.isDouble int inventoryStart = this.isDouble
? 6 ? 6
: 3; : 3;
int inventoryEnd = inventoryStart + 26; int inventoryEnd = inventoryStart + 26;
int hotbarStart = inventoryEnd + 1; int hotbarStart = inventoryEnd + 1;
int hotbarEnd = hotbarStart + 8; int hotbarEnd = hotbarStart + 8;
@ -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;
@ -39,8 +35,8 @@ public class ContainerLaserRelayItemWhitelist extends Container {
for (int x = 0; x < 3; x++) { for (int x = 0; x < 3; x++) {
for (int y = 0; y < 4; y++) { for (int y = 0; y < 4; y++) {
this.addSlot(new SlotFilter(i == 0 this.addSlot(new SlotFilter(i == 0
? this.tile.leftFilter ? this.tile.leftFilter
: this.tile.rightFilter, y + x * 4, 20 + i * 84 + x * 18, 6 + y * 18)); : 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 @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,16 +86,16 @@ 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);
} }
} }
private boolean isMouseOver(int mouseX, int mouseY) { private boolean isMouseOver(int mouseX, int mouseY) {
return mouseX >= this.x && mouseY >= this.y && mouseX < this.x + (this.outline return mouseX >= this.x && mouseY >= this.y && mouseX < this.x + (this.outline
? 26 ? 26
: 18) && mouseY < this.y + (this.outline : 18) && mouseY < this.y + (this.outline
? 93 ? 93
: 85); : 85);
} }
private String getOverlayText() { private String getOverlayText() {