More Tweaks

This commit is contained in:
simibubi 2020-10-20 21:21:33 +02:00
parent a8031b7569
commit 0b3f0fd198
2 changed files with 14 additions and 7 deletions

View file

@ -90,7 +90,7 @@ public class FilterItem extends Item implements INamedContainerProvider {
.getBoolean("Blacklist");
list.add(TextFormatting.GOLD
+ (blacklist ? Lang.translate("gui.filter.blacklist") : Lang.translate("gui.filter.whitelist")));
+ (blacklist ? Lang.translate("gui.filter.deny_list") : Lang.translate("gui.filter.allow_list")));
int count = 0;
for (int i = 0; i < filterItems.getSlots(); i++) {
if (count > 3) {
@ -114,10 +114,10 @@ public class FilterItem extends Item implements INamedContainerProvider {
WhitelistMode whitelistMode = WhitelistMode.values()[filter.getOrCreateTag()
.getInt("WhitelistMode")];
list.add(TextFormatting.GOLD + (whitelistMode == WhitelistMode.WHITELIST_CONJ
? Lang.translate("gui.attribute_filter.whitelist_conjunctive")
? Lang.translate("gui.attribute_filter.allow_list_conjunctive")
: whitelistMode == WhitelistMode.WHITELIST_DISJ
? Lang.translate("gui.attribute_filter.whitelist_disjunctive")
: Lang.translate("gui.attribute_filter.blacklist")));
? Lang.translate("gui.attribute_filter.allow_list_disjunctive")
: Lang.translate("gui.attribute_filter.deny_list")));
int count = 0;
ListNBT attributes = filter.getOrCreateTag()

View file

@ -5,6 +5,7 @@ import java.util.Vector;
import com.google.common.collect.ImmutableList;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllKeys;
import com.simibubi.create.content.schematics.SchematicWorld;
@ -28,6 +29,7 @@ import net.minecraft.nbt.NBTUtil;
import net.minecraft.util.Mirror;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.template.PlacementSettings;
import net.minecraft.world.gen.feature.template.Template;
@ -199,11 +201,16 @@ public class SchematicHandler {
return;
if (!pressed || button != 1)
return;
if (Minecraft.getInstance().player.isSneaking())
Minecraft mc = Minecraft.getInstance();
if (mc.player.isSneaking())
return;
if (mc.objectMouseOver instanceof BlockRayTraceResult) {
BlockRayTraceResult blockRayTraceResult = (BlockRayTraceResult) mc.objectMouseOver;
if (AllBlocks.SCHEMATICANNON.has(mc.world.getBlockState(blockRayTraceResult.getPos())))
return;
}
currentTool.getTool()
.handleRightClick();
.handleRightClick();
}
public void onKeyInput(int key, boolean pressed) {