mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-28 09:48:34 +01:00
Compare commits
4 commits
4d3ba552eb
...
2cadd9e19a
Author | SHA1 | Date | |
---|---|---|---|
|
2cadd9e19a | ||
|
bc5dc44864 | ||
|
d7de3e61d2 | ||
|
9e0ce03580 |
6 changed files with 26 additions and 19 deletions
|
@ -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;
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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));
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Loading…
Reference in a new issue