mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Sack finished i think? for now...
This commit is contained in:
parent
e125e80e8c
commit
38f4824757
4 changed files with 14 additions and 9 deletions
|
@ -25,6 +25,7 @@ import net.minecraft.world.entity.player.Inventory;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.inventory.ClickType;
|
||||
import net.minecraft.world.inventory.ContainerListener;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
|
@ -105,13 +106,12 @@ public class SackContainer extends AbstractContainerMenu implements IButtonReact
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/* @Override
|
||||
public void broadcastChanges() { // TODO is this needed anymore?
|
||||
super.broadcastChanges();
|
||||
|
||||
if (this.filter.needsUpdateSend() || this.autoInsert != this.oldAutoInsert) {
|
||||
/*
|
||||
for (IContainerListener listener : this.containerListeners) {
|
||||
for (ContainerListener listener : this..containerListeners) {
|
||||
listener.setContainerData(this, 0, this.filter.isWhitelist
|
||||
? 1
|
||||
: 0);
|
||||
|
@ -129,7 +129,6 @@ public class SackContainer extends AbstractContainerMenu implements IButtonReact
|
|||
? 1
|
||||
: 0);
|
||||
}
|
||||
*/
|
||||
this.filter.updateLasts();
|
||||
this.oldAutoInsert = this.autoInsert;
|
||||
}
|
||||
|
@ -145,7 +144,7 @@ public class SackContainer extends AbstractContainerMenu implements IButtonReact
|
|||
} else if (id == 2) {
|
||||
this.filter.respectMod = data == 1;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public ItemStack quickMoveStack(@Nonnull Player player, int slot) {
|
||||
|
|
|
@ -41,11 +41,17 @@ public class FilterSettingsGui {
|
|||
public FilterSettingsGui(FilterSettings settings, int x, int y, Consumer<AbstractButton> buttonConsumer, int idOffset) {
|
||||
this.theSettings = settings;
|
||||
|
||||
this.whitelistButton = Button.builder(Component.literal("WH"), $ -> buttonClicked(idOffset))
|
||||
this.whitelistButton = Button.builder(Component.literal("WH"), $ -> {
|
||||
theSettings.isWhitelist = !theSettings.isWhitelist;
|
||||
buttonClicked(idOffset);
|
||||
})
|
||||
.bounds(x, y, 16, 12).build();
|
||||
buttonConsumer.accept(this.whitelistButton);
|
||||
y += 14;
|
||||
this.modButton = Button.builder(Component.literal("MO"), $ -> buttonClicked(idOffset + 1))
|
||||
this.modButton = Button.builder(Component.literal("MO"), $ -> {
|
||||
theSettings.respectMod = !theSettings.respectMod;
|
||||
buttonClicked(idOffset + 1);
|
||||
})
|
||||
.bounds(x, y, 16, 12).build();
|
||||
buttonConsumer.accept(this.modButton);
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public class SackGui extends AAScreen<SackContainer> {
|
|||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.filter = new FilterSettingsGui(this.container.filter, this.leftPos + 138, this.topPos + 10, this::addRenderableWidget, 1);
|
||||
this.filter = new FilterSettingsGui(this.container.filter, this.leftPos + 137, this.topPos + 10, this::addRenderableWidget, 1);
|
||||
|
||||
this.buttonAutoInsert = Button.builder(
|
||||
Component.literal("I")
|
||||
|
|
|
@ -382,7 +382,7 @@
|
|||
"item.actuallyadditions.biocoal": "Bio Coal (wip)",
|
||||
"item.actuallyadditions.player_probe": "Player Probe (wip)",
|
||||
"item.actuallyadditions.worm": "Worm",
|
||||
"item.actuallyadditions.travelers_sack": "Traveler's Sack (wip)",
|
||||
"item.actuallyadditions.travelers_sack": "Traveler's Sack",
|
||||
"item.actuallyadditions.bag.storage": "filled slots (wip)",
|
||||
"item.actuallyadditions.void_sack": "Void Sack (wip)",
|
||||
"item.actuallyadditions.crystallized_canola_seed": "Crystallized Canola Seed",
|
||||
|
|
Loading…
Reference in a new issue