Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ShapeCardItem selection process work with the ShieldProjector. #80

Open
wants to merge 1 commit into
base: 1.16
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import mcjty.rftoolsbuilder.modules.builder.BuilderModule;
import mcjty.rftoolsbuilder.modules.builder.blocks.BuilderTileEntity;
import mcjty.rftoolsbuilder.modules.builder.client.GuiShapeCard;
import mcjty.rftoolsbuilder.modules.shield.blocks.ShieldProjectorTileEntity;
import mcjty.rftoolsbuilder.shapes.IFormula;
import mcjty.rftoolsbuilder.shapes.Shape;
import mcjty.rftoolsbuilder.shapes.ShapeModifier;
Expand Down Expand Up @@ -135,13 +136,13 @@ public ActionResultType useOn(ItemUseContext context) {
int mode = getMode(stack);
if (mode == MODE_NONE) {
if (player.isShiftKeyDown()) {
if (world.getBlockEntity(pos) instanceof BuilderTileEntity) {
if (world.getBlockEntity(pos) instanceof BuilderTileEntity || world.getBlockEntity(pos) instanceof ShieldProjectorTileEntity) {
setCurrentBlock(stack, GlobalPos.of(world.dimension(), pos));
Logging.message(player, TextFormatting.GREEN + "Now select the first corner");
setMode(stack, MODE_CORNER1);
setCorner1(stack, null);
} else {
Logging.message(player, TextFormatting.RED + "You can only do this on a builder!");
Logging.message(player, TextFormatting.RED + "You can only do this on a builder or shield Projector!");
}
} else {
return ActionResultType.SUCCESS;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/rftoolsbuilder/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"message.rftoolsbuilder.space_chamber_card.extra": "(final cost depends on infusion level)",

"message.rftoolsbuilder.shape_card.warning": "Disabled in config!",
"message.rftoolsbuilder.shape_card.header": "This card represents an area that can be used by the shield or builder. Sneak right click on builder to start mark mode, then right click to mark two corners of wanted area",
"message.rftoolsbuilder.shape_card.header": "This card represents an area that can be used by the shield or builder. Sneak right click on builder or shield projector to start mark mode, then right click to mark two corners of wanted area",
"message.rftoolsbuilder.shape_card.shape": "Shape: ",
"message.rftoolsbuilder.shape_card.dimension": "Dimension: ",
"message.rftoolsbuilder.shape_card.offset": "Offset: ",
Expand Down