Compare commits

...

4 commits

Author SHA1 Message Date
Flanks255
2cadd9e19a Fixed booster shape. 2024-06-04 15:18:55 -05:00
Flanks255
bc5dc44864 Gui Fixes 2024-06-04 15:16:17 -05:00
Flanks255
d7de3e61d2 Gui Fixes 2024-06-04 13:44:31 -05:00
Flanks255
9e0ce03580 Fixes 2024-06-04 13:36:41 -05:00
6 changed files with 26 additions and 19 deletions

View file

@ -11,6 +11,11 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
public class BlockPhantomBooster extends BlockBase { public class BlockPhantomBooster extends BlockBase {
@ -29,9 +34,9 @@ public class BlockPhantomBooster extends BlockBase {
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState blockState, BlockEntityType<T> entityType) { public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState blockState, BlockEntityType<T> entityType) {
return level.isClientSide? TileEntityPhantomBooster::clientTick : TileEntityPhantomBooster::serverTick; return level.isClientSide? TileEntityPhantomBooster::clientTick : TileEntityPhantomBooster::serverTick;
} }
*/
@Override @Override
public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
return VoxelShapes.BOOSTER_SHAPE; return VoxelShapes.BOOSTER_SHAPE;
}*/ }
} }

View file

@ -112,11 +112,12 @@ public class FilterSettingsGui {
? Component.translatable("info.actuallyadditions.gui.respectMod") ? Component.translatable("info.actuallyadditions.gui.respectMod")
: Component.translatable("info.actuallyadditions.gui.ignoreMod")).withStyle(ChatFormatting.BOLD)); : Component.translatable("info.actuallyadditions.gui.ignoreMod")).withStyle(ChatFormatting.BOLD));
list.add(Component.translatable("info.actuallyadditions.gui.respectModInfo")); list.add(Component.translatable("info.actuallyadditions.gui.respectModInfo"));
} else if (this.modButton.isMouseOver(mouseX, mouseY)) { list.add(Component.translatable("info.actuallyadditions.gui.respectModInfo2"));
} else if (this.damageButton.isMouseOver(mouseX, mouseY)) {
list.add((this.theSettings.matchDamage list.add((this.theSettings.matchDamage
? Component.translatable("info.actuallyadditions.gui.respectDamage") ? Component.translatable("info.actuallyadditions.gui.respectDamage")
: Component.translatable("info.actuallyadditions.gui.ignoreDamage")).withStyle(ChatFormatting.BOLD)); : Component.translatable("info.actuallyadditions.gui.ignoreDamage")).withStyle(ChatFormatting.BOLD));
} else if (this.modButton.isMouseOver(mouseX, mouseY)) { } else if (this.nbtButton.isMouseOver(mouseX, mouseY)) {
list.add((this.theSettings.matchNBT list.add((this.theSettings.matchNBT
? Component.translatable("info.actuallyadditions.gui.respectNBT") ? Component.translatable("info.actuallyadditions.gui.respectNBT")
: Component.translatable("info.actuallyadditions.gui.ignoreNBT")).withStyle(ChatFormatting.BOLD)); : Component.translatable("info.actuallyadditions.gui.ignoreNBT")).withStyle(ChatFormatting.BOLD));

View file

@ -97,6 +97,8 @@ public class GuiLaserRelayItemWhitelist extends AAScreen<ContainerLaserRelayItem
@Override @Override
public void render(@Nonnull GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) { public void render(@Nonnull GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
super.render(guiGraphics, mouseX, mouseY, partialTicks); super.render(guiGraphics, mouseX, mouseY, partialTicks);
this.leftFilter.drawHover(guiGraphics, mouseX, mouseY);
this.rightFilter.drawHover(guiGraphics, mouseX, mouseY);
if (this.buttonSmartWhitelistLeft.isMouseOver(mouseX, mouseY) || this.buttonSmartWhitelistRight.isMouseOver(mouseX, mouseY)) { if (this.buttonSmartWhitelistLeft.isMouseOver(mouseX, mouseY) || this.buttonSmartWhitelistRight.isMouseOver(mouseX, mouseY)) {
List<FormattedCharSequence> list = new ArrayList<>(); List<FormattedCharSequence> list = new ArrayList<>();
@ -104,9 +106,6 @@ public class GuiLaserRelayItemWhitelist extends AAScreen<ContainerLaserRelayItem
list.addAll(this.font.split(Component.translatable("info.actuallyadditions.gui.smartInfo"), 200)); list.addAll(this.font.split(Component.translatable("info.actuallyadditions.gui.smartInfo"), 200));
guiGraphics.renderTooltip(this.font, list, mouseX, mouseY); //renderTooltip guiGraphics.renderTooltip(this.font, list, mouseX, mouseY); //renderTooltip
} }
this.leftFilter.drawHover(guiGraphics, mouseX, mouseY);
this.rightFilter.drawHover(guiGraphics, mouseX, mouseY);
} }
@Override @Override

View file

@ -88,8 +88,8 @@ public class SackGui extends AAScreen<SackContainer> {
text.add(Component.literal("Auto-Insert " + (this.container.autoInsert text.add(Component.literal("Auto-Insert " + (this.container.autoInsert
? "On" ? "On"
: "Off")).withStyle(ChatFormatting.BOLD)); : "Off")).withStyle(ChatFormatting.BOLD));
text.add(Component.literal("Turn this on to make items that get picked up automatically go into the bag.")); //TODO how to word wrap these to 200? text.add(Component.literal("Turn this on to make items that get picked up automatically go into the sack.")); //TODO how to word wrap these to 200?
text.add(Component.literal("Note that this WON'T work when you are holding the bag in your hand.").withStyle(ChatFormatting.GRAY).withStyle(ChatFormatting.ITALIC)); //TODO this too text.add(Component.literal("Note that this WON'T work when you are holding the sack in your hand.").withStyle(ChatFormatting.GRAY).withStyle(ChatFormatting.ITALIC)); //TODO this too
guiGraphics.renderTooltip(font, text, Optional.empty(), mouseX, mouseY); //TODO i have no idea what im doing here... guiGraphics.renderTooltip(font, text, Optional.empty(), mouseX, mouseY); //TODO i have no idea what im doing here...
} }
} }

View file

@ -24,7 +24,8 @@ public class AllInOneTool extends DiggerItem {
ToolActions.PICKAXE_DIG, ToolActions.PICKAXE_DIG,
ToolActions.SHOVEL_DIG, ToolActions.SHOVEL_DIG,
ToolActions.HOE_TILL, ToolActions.HOE_TILL,
ToolActions.SHOVEL_FLATTEN ToolActions.SHOVEL_FLATTEN,
ToolActions.AXE_STRIP
); );
public AllInOneTool(Tier tier) { public AllInOneTool(Tier tier) {
@ -56,13 +57,13 @@ public class AllInOneTool extends DiggerItem {
} }
// Player not sneaking? Act as a Hoe to the block, else, Act as a shovel // Player not sneaking? Act as a Hoe to the block, else, Act as a shovel
if (!context.getPlayer().isCrouching()) { if (context.getPlayer().isCrouching()) {
BlockState toolModifiedState = context.getLevel().getBlockState(context.getClickedPos()).getToolModifiedState(context, ToolActions.HOE_TILL, false); return Items.IRON_SHOVEL.useOn(context);
ActuallyAdditions.LOGGER.info("Tool Modified State: " + toolModifiedState);
return Items.IRON_HOE.useOn(context);
} }
InteractionResult tmp = Items.IRON_AXE.useOn(context);
return Items.IRON_SHOVEL.useOn(context); if (tmp != InteractionResult.SUCCESS)
return tmp;
return Items.IRON_HOE.useOn(context);
} }
@Override @Override

View file

@ -377,8 +377,8 @@
"item.actuallyadditions.worm": "Worm", "item.actuallyadditions.worm": "Worm",
"item.actuallyadditions.travelers_sack": "Traveler's Sack", "item.actuallyadditions.travelers_sack": "Traveler's Sack",
"item.actuallyadditions.void_sack": "Void Sack", "item.actuallyadditions.void_sack": "Void Sack",
"item.actuallyadditions.crystallized_canola_seed": "Crystallized Canola Seed", "item.actuallyadditions.crystallized_canola_seed": "Crystallized Canola Seeds",
"item.actuallyadditions.empowered_canola_seed": "Empowered Canola Seed", "item.actuallyadditions.empowered_canola_seed": "Empowered Canola Seeds",
"item.actuallyadditions.lens_of_the_miner": "Lens of the Miner", "item.actuallyadditions.lens_of_the_miner": "Lens of the Miner",
"item.actuallyadditions.lens_of_the_killer": "Lens of the Killer (WIP)", "item.actuallyadditions.lens_of_the_killer": "Lens of the Killer (WIP)",
"item.actuallyadditions.handheld_filler": "Handheld Filler", "item.actuallyadditions.handheld_filler": "Handheld Filler",
@ -472,7 +472,8 @@
"info.actuallyadditions.gui.ignoreNBT": "Ignoring NBT Data", "info.actuallyadditions.gui.ignoreNBT": "Ignoring NBT Data",
"info.actuallyadditions.gui.ignoreMod": "Mod Mode Off", "info.actuallyadditions.gui.ignoreMod": "Mod Mode Off",
"info.actuallyadditions.gui.respectMod": "Mod Mode On", "info.actuallyadditions.gui.respectMod": "Mod Mode On",
"info.actuallyadditions.gui.respectModInfo": "If this is enabled, the filter will compare the mods items come from §cinstead of comparing the items themselves§r. This can be useful for storage systems with mod-based chests. Can be combined with damage matching, but that normally isn't very useful.", "info.actuallyadditions.gui.respectModInfo": "If this is enabled, the filter will compare the mods items come from §cinstead of comparing the items themselves.§r ",
"info.actuallyadditions.gui.respectModInfo2": "This can be useful for storage systems with mod-based chests. Can be combined with damage matching, but that normally isn't very useful.",
"info.actuallyadditions.gui.autosplititems.on": "Auto-Split Items On", "info.actuallyadditions.gui.autosplititems.on": "Auto-Split Items On",
"info.actuallyadditions.gui.autosplititems.off": "Auto-Split Items Off", "info.actuallyadditions.gui.autosplititems.off": "Auto-Split Items Off",
"info.actuallyadditions.gui.inbound": "INBOUND", "info.actuallyadditions.gui.inbound": "INBOUND",