ultimate tool vein mining
This commit is contained in:
1 parent
c00d57e4e0
commit
3700359dfb
26 files changed
+356
-38
No files matched your search
+27
-4
@@ -392,6 +392,9 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
|
||||
if (this.isKnockedDown()) {
|
||||
this.tickKnockedDown();
|
||||
} else if (this.isLeashed()) {
|
||||
if (this.chargeTicksRemaining > 0 || this.isChargeAnimationActive()) {
|
||||
this.endChargeState();
|
||||
}
|
||||
this.getNavigation().stop();
|
||||
this.setTarget(null);
|
||||
this.updateAmbientAnimation();
|
||||
@@ -484,6 +487,10 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
|
||||
}
|
||||
|
||||
private void tickCharge() {
|
||||
if (this.chargeTicksRemaining <= 0) {
|
||||
this.endChargeState();
|
||||
return;
|
||||
}
|
||||
if (this.getAnimationState() != ANIM_CHARGE) {
|
||||
this.setAnimationState(ANIM_CHARGE);
|
||||
}
|
||||
@@ -910,6 +917,9 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
|
||||
if (!this.isFlying() && !mountedCharge) {
|
||||
this.pendingChargeStart = true;
|
||||
this.requestFlightStart();
|
||||
if (this.getAnimationState() != ANIM_OPEN_WINGS) {
|
||||
this.pendingChargeStart = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.beginChargeStart(this.chargeDirection, this.pendingChargeDuration, mountedCharge);
|
||||
@@ -979,11 +989,21 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
|
||||
serverLevel.sendParticles(ParticleTypes.CRIT, this.getX(), this.getY() + 0.8D, this.getZ(), 20, 2.0D, 0.6D, 2.0D, 0.08D);
|
||||
this.broadcastImpactShake(serverLevel);
|
||||
|
||||
if (this.onGround()) {
|
||||
this.requestFlightStop();
|
||||
} else {
|
||||
this.updateAmbientAnimation();
|
||||
this.endChargeState();
|
||||
}
|
||||
|
||||
private void endChargeState() {
|
||||
this.chargeTicksRemaining = 0;
|
||||
this.groundedMountedCharge = false;
|
||||
this.noPhysics = false;
|
||||
this.setAnimationState(this.isFlying() ? ANIM_FLY : ANIM_IDLE);
|
||||
if (!this.isVehicle() && this.isFlying() && this.hasGroundBelow()) {
|
||||
this.requestFlightStop();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasGroundBelow() {
|
||||
return !this.level().noCollision(this, this.getBoundingBox().move(this.toWorld(0.0D, -0.2D, 0.0D)));
|
||||
}
|
||||
|
||||
private void breakBlocksForChargeImpact(ServerLevel level) {
|
||||
@@ -1424,6 +1444,9 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
|
||||
this.chargeCooldown = tag.getInt("ChargeCooldown");
|
||||
this.attackCooldown = tag.getInt("AttackCooldown");
|
||||
this.combatCryDone = tag.getBoolean("CombatCryDone");
|
||||
if (this.isChargeAnimationActive()) {
|
||||
this.setAnimationState(this.isFlying() ? ANIM_FLY : ANIM_IDLE);
|
||||
}
|
||||
if (this.isKnockedDown() && this.getAnimationState() != ANIM_KNOCKED_DOWN_IDLE) {
|
||||
this.setAnimationState(ANIM_KNOCKED_DOWN_IDLE);
|
||||
}
|
||||
|
||||
@@ -107,6 +107,9 @@ public final class AntarchySettings {
|
||||
private static int ultimateCrossbowEnchantability = 20;
|
||||
private static int ultimateMaceEnchantability = 20;
|
||||
private static boolean ultimateToolsThreeByThreeEnabled = true;
|
||||
private static boolean ultimateToolsVeinMiningEnabled = true;
|
||||
private static int ultimateToolsVeinMiningMaxBlocks = 64;
|
||||
private static int ultimateToolsTreeFellingMaxLogs = 128;
|
||||
private static boolean ultimateArmorComesEnchanted = true;
|
||||
private static int ultimateHelmetArmorValue = 6;
|
||||
private static int ultimateChestplateArmorValue = 11;
|
||||
@@ -975,6 +978,18 @@ public final class AntarchySettings {
|
||||
return ultimateToolsThreeByThreeEnabled;
|
||||
}
|
||||
|
||||
public static boolean ultimateToolsVeinMiningEnabled() {
|
||||
return ultimateToolsVeinMiningEnabled;
|
||||
}
|
||||
|
||||
public static int ultimateToolsVeinMiningMaxBlocks() {
|
||||
return ultimateToolsVeinMiningMaxBlocks;
|
||||
}
|
||||
|
||||
public static int ultimateToolsTreeFellingMaxLogs() {
|
||||
return ultimateToolsTreeFellingMaxLogs;
|
||||
}
|
||||
|
||||
public static boolean ultimateArmorComesEnchanted() {
|
||||
return ultimateArmorComesEnchanted;
|
||||
}
|
||||
@@ -1625,6 +1640,18 @@ public final class AntarchySettings {
|
||||
ultimateToolsThreeByThreeEnabled = value;
|
||||
}
|
||||
|
||||
public static void setUltimateToolsVeinMiningEnabled(boolean value) {
|
||||
ultimateToolsVeinMiningEnabled = value;
|
||||
}
|
||||
|
||||
public static void setUltimateToolsVeinMiningMaxBlocks(int value) {
|
||||
ultimateToolsVeinMiningMaxBlocks = value;
|
||||
}
|
||||
|
||||
public static void setUltimateToolsTreeFellingMaxLogs(int value) {
|
||||
ultimateToolsTreeFellingMaxLogs = value;
|
||||
}
|
||||
|
||||
public static void setUltimateArmorComesEnchanted(boolean value) {
|
||||
ultimateArmorComesEnchanted = value;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.dimension.DimensionType;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
|
||||
public final class AntarchyTags {
|
||||
@@ -157,4 +158,11 @@ public final class AntarchyTags {
|
||||
private Biomes() {
|
||||
}
|
||||
}
|
||||
|
||||
public static final class DimensionTypes {
|
||||
public static final TagKey<DimensionType> NO_MANTIS_CLIMB = TagKey.create(Registries.DIMENSION_TYPE, id("no_mantis_climb"));
|
||||
|
||||
private DimensionTypes() {
|
||||
}
|
||||
}
|
||||
}
|
||||
+27
-4
@@ -391,6 +391,9 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
|
||||
if (this.isKnockedDown()) {
|
||||
this.tickKnockedDown();
|
||||
} else if (this.isLeashed()) {
|
||||
if (this.chargeTicksRemaining > 0 || this.isChargeAnimationActive()) {
|
||||
this.endChargeState();
|
||||
}
|
||||
this.getNavigation().stop();
|
||||
this.setTarget(null);
|
||||
this.updateAmbientAnimation();
|
||||
@@ -483,6 +486,10 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
|
||||
}
|
||||
|
||||
private void tickCharge() {
|
||||
if (this.chargeTicksRemaining <= 0) {
|
||||
this.endChargeState();
|
||||
return;
|
||||
}
|
||||
if (this.getAnimationState() != ANIM_CHARGE) {
|
||||
this.setAnimationState(ANIM_CHARGE);
|
||||
}
|
||||
@@ -909,6 +916,9 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
|
||||
if (!this.isFlying() && !mountedCharge) {
|
||||
this.pendingChargeStart = true;
|
||||
this.requestFlightStart();
|
||||
if (this.getAnimationState() != ANIM_OPEN_WINGS) {
|
||||
this.pendingChargeStart = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.beginChargeStart(this.chargeDirection, this.pendingChargeDuration, mountedCharge);
|
||||
@@ -978,11 +988,21 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
|
||||
serverLevel.sendParticles(ParticleTypes.CRIT, this.getX(), this.getY() + 0.8D, this.getZ(), 20, 2.0D, 0.6D, 2.0D, 0.08D);
|
||||
this.broadcastImpactShake(serverLevel);
|
||||
|
||||
if (this.onGround()) {
|
||||
this.requestFlightStop();
|
||||
} else {
|
||||
this.updateAmbientAnimation();
|
||||
this.endChargeState();
|
||||
}
|
||||
|
||||
private void endChargeState() {
|
||||
this.chargeTicksRemaining = 0;
|
||||
this.groundedMountedCharge = false;
|
||||
this.noPhysics = false;
|
||||
this.setAnimationState(this.isFlying() ? ANIM_FLY : ANIM_IDLE);
|
||||
if (!this.isVehicle() && this.isFlying() && this.hasGroundBelow()) {
|
||||
this.requestFlightStop();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasGroundBelow() {
|
||||
return !this.level().noCollision(this, this.getBoundingBox().move(this.toWorld(0.0D, -0.2D, 0.0D)));
|
||||
}
|
||||
|
||||
private void breakBlocksForChargeImpact(ServerLevel level) {
|
||||
@@ -1423,6 +1443,9 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
|
||||
this.chargeCooldown = tag.getInt("ChargeCooldown");
|
||||
this.attackCooldown = tag.getInt("AttackCooldown");
|
||||
this.combatCryDone = tag.getBoolean("CombatCryDone");
|
||||
if (this.isChargeAnimationActive()) {
|
||||
this.setAnimationState(this.isFlying() ? ANIM_FLY : ANIM_IDLE);
|
||||
}
|
||||
if (this.isKnockedDown() && this.getAnimationState() != ANIM_KNOCKED_DOWN_IDLE) {
|
||||
this.setAnimationState(ANIM_KNOCKED_DOWN_IDLE);
|
||||
}
|
||||
|
||||
@@ -2,14 +2,24 @@ package com.craisinlord.antarchy.content.item;
|
||||
|
||||
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||
import com.craisinlord.antarchy.content.client.model.ResourceBackedGeoItemModel;
|
||||
import com.craisinlord.antarchy.content.item.ultimate.UltimateToolHelper;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.DoubleSupplier;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.item.AxeItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.item.component.ItemAttributeModifiers;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import software.bernie.geckolib.animatable.GeoItem;
|
||||
import software.bernie.geckolib.animatable.client.GeoRenderProvider;
|
||||
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache;
|
||||
@@ -40,6 +50,25 @@ public class BattleAxeItem extends AxeItem implements GeoItem {
|
||||
return createAttributes(this.tier, (float) this.attackDamage.getAsDouble(), (float) AntarchySettings.battleAxeAttackSpeed());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
|
||||
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
|
||||
if (AntarchySettings.ultimateToolsVeinMiningEnabled()) {
|
||||
tooltipComponents.add(Component.translatable("tooltip.antarchy.battle_axe_tree_felling").withStyle(ChatFormatting.GRAY));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mineBlock(ItemStack stack, Level level, BlockState state, BlockPos pos, LivingEntity miningEntity) {
|
||||
boolean result = super.mineBlock(stack, level, state, pos, miningEntity);
|
||||
if (AntarchySettings.ultimateToolsVeinMiningEnabled()
|
||||
&& miningEntity instanceof ServerPlayer player
|
||||
&& !player.isShiftKeyDown()) {
|
||||
UltimateToolHelper.mineTree(stack, level, state, pos, player, AntarchySettings.ultimateToolsTreeFellingMaxLogs());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnchantable(ItemStack stack) {
|
||||
return stack.getCount() == 1;
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class UltimateAxeItem extends AxeItem {
|
||||
@Override
|
||||
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
|
||||
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
|
||||
UltimateToolHelper.appendThreeByThreeTooltip(tooltipComponents);
|
||||
UltimateToolHelper.appendModeTooltip(UltimateToolHelper.ToolKind.AXE, tooltipComponents);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class UltimateHoeItem extends HoeItem {
|
||||
@Override
|
||||
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
|
||||
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
|
||||
UltimateToolHelper.appendThreeByThreeTooltip(tooltipComponents);
|
||||
UltimateToolHelper.appendModeTooltip(UltimateToolHelper.ToolKind.HOE, tooltipComponents);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class UltimatePickaxeItem extends PickaxeItem {
|
||||
@Override
|
||||
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
|
||||
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
|
||||
UltimateToolHelper.appendThreeByThreeTooltip(tooltipComponents);
|
||||
UltimateToolHelper.appendModeTooltip(UltimateToolHelper.ToolKind.PICKAXE, tooltipComponents);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+172
-24
@@ -3,13 +3,17 @@ package com.craisinlord.antarchy.content.item.ultimate;
|
||||
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||
import com.craisinlord.antarchy.content.item.GiantFryingPanItem;
|
||||
import com.craisinlord.antarchy.content.item.GiantFryingPanToolHelper;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.component.DataComponents;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
@@ -25,12 +29,16 @@ import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.item.component.CustomData;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
public final class UltimateToolHelper {
|
||||
private static final String THREE_BY_THREE_TAG = "antarchy.ultimate_three_by_three";
|
||||
private static final String MINING_MODE_TAG = "antarchy.ultimate_mining_mode";
|
||||
private static final ThreadLocal<Boolean> BREAKING_EXTRA_BLOCKS = ThreadLocal.withInitial(() -> false);
|
||||
private static final float GENERAL_MINING_MULTIPLIER = 1.1F;
|
||||
private static final float ULTIMATE_SHOVEL_MINING_SPEED = 24.0F;
|
||||
@@ -40,26 +48,40 @@ public final class UltimateToolHelper {
|
||||
|
||||
public static InteractionResultHolder<ItemStack> handleToggleUse(Level level, Player player, InteractionHand hand) {
|
||||
ItemStack stack = player.getItemInHand(hand);
|
||||
if (!AntarchySettings.ultimateToolsThreeByThreeEnabled() || !player.isShiftKeyDown()) {
|
||||
if (!player.isShiftKeyDown() || availableModes(toolKindOf(stack.getItem())).size() < 2) {
|
||||
return InteractionResultHolder.pass(stack);
|
||||
}
|
||||
|
||||
toggleThreeByThree(level, player, stack);
|
||||
cycleMiningMode(level, player, stack);
|
||||
return InteractionResultHolder.sidedSuccess(stack, level.isClientSide);
|
||||
}
|
||||
|
||||
public static InteractionResult handleToggleUseOn(UseOnContext context) {
|
||||
Player player = context.getPlayer();
|
||||
if (!AntarchySettings.ultimateToolsThreeByThreeEnabled() || player == null || !player.isShiftKeyDown()) {
|
||||
if (player == null || !player.isShiftKeyDown() || availableModes(toolKindOf(context.getItemInHand().getItem())).size() < 2) {
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
|
||||
toggleThreeByThree(context.getLevel(), player, context.getItemInHand());
|
||||
cycleMiningMode(context.getLevel(), player, context.getItemInHand());
|
||||
return InteractionResult.sidedSuccess(context.getLevel().isClientSide);
|
||||
}
|
||||
|
||||
public static boolean isThreeByThreeEnabled(ItemStack stack) {
|
||||
return stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY).copyTag().getBoolean(THREE_BY_THREE_TAG);
|
||||
return getMiningMode(stack) == MiningMode.THREE_BY_THREE;
|
||||
}
|
||||
|
||||
public static boolean isVeinEnabled(ItemStack stack) {
|
||||
return getMiningMode(stack) == MiningMode.VEIN;
|
||||
}
|
||||
|
||||
public static MiningMode getMiningMode(ItemStack stack) {
|
||||
CompoundTag tag = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY).copyTag();
|
||||
if (tag.contains(MINING_MODE_TAG)) {
|
||||
int index = tag.getByte(MINING_MODE_TAG);
|
||||
MiningMode[] modes = MiningMode.values();
|
||||
return index >= 0 && index < modes.length ? modes[index] : MiningMode.DEFAULT;
|
||||
}
|
||||
return tag.getBoolean(THREE_BY_THREE_TAG) ? MiningMode.THREE_BY_THREE : MiningMode.DEFAULT;
|
||||
}
|
||||
|
||||
public static float getDestroySpeed(ToolKind toolKind, Tier tier, ItemStack stack, BlockState state, float defaultSpeed) {
|
||||
@@ -76,23 +98,127 @@ public final class UltimateToolHelper {
|
||||
return defaultSpeed * GENERAL_MINING_MULTIPLIER;
|
||||
}
|
||||
|
||||
public static void appendThreeByThreeTooltip(List<Component> tooltip) {
|
||||
if (!AntarchySettings.ultimateToolsThreeByThreeEnabled()) {
|
||||
public static void appendModeTooltip(ToolKind toolKind, List<Component> tooltip) {
|
||||
List<MiningMode> modes = availableModes(toolKind);
|
||||
boolean area = modes.contains(MiningMode.THREE_BY_THREE);
|
||||
boolean vein = modes.contains(MiningMode.VEIN);
|
||||
String key;
|
||||
if (area && vein) {
|
||||
key = "tooltip.antarchy.ultimate_tools_3x3_vein";
|
||||
} else if (area) {
|
||||
key = "tooltip.antarchy.ultimate_tools_3x3";
|
||||
} else if (vein) {
|
||||
key = "tooltip.antarchy.ultimate_tools_vein";
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
tooltip.add(Component.translatable("tooltip.antarchy.ultimate_tools_3x3").withStyle(ChatFormatting.GRAY));
|
||||
tooltip.add(Component.translatable(key).withStyle(ChatFormatting.GRAY));
|
||||
}
|
||||
|
||||
public static void handleAreaMining(ToolKind toolKind, ItemStack stack, Level level, BlockState originState, BlockPos origin, LivingEntity entity) {
|
||||
if (!AntarchySettings.ultimateToolsThreeByThreeEnabled()
|
||||
|| level.isClientSide
|
||||
if (level.isClientSide
|
||||
|| BREAKING_EXTRA_BLOCKS.get()
|
||||
|| !isThreeByThreeEnabled(stack)
|
||||
|| !(entity instanceof ServerPlayer player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
MiningMode mode = getMiningMode(stack);
|
||||
if (mode == MiningMode.DEFAULT || !availableModes(toolKind).contains(mode)) {
|
||||
return;
|
||||
}
|
||||
if (mode == MiningMode.THREE_BY_THREE) {
|
||||
mineArea(toolKind, stack, level, originState, origin, player, 1);
|
||||
} else {
|
||||
mineVein(toolKind, stack, level, originState, origin, player, veinLimit(originState));
|
||||
}
|
||||
}
|
||||
|
||||
public static int veinLimit(BlockState state) {
|
||||
return state.is(BlockTags.LOGS)
|
||||
? AntarchySettings.ultimateToolsTreeFellingMaxLogs()
|
||||
: AntarchySettings.ultimateToolsVeinMiningMaxBlocks();
|
||||
}
|
||||
|
||||
public static void mineVein(ToolKind toolKind, ItemStack stack, Level level, BlockState originState, BlockPos origin, ServerPlayer player, int maxBlocks) {
|
||||
if (level.isClientSide || BREAKING_EXTRA_BLOCKS.get() || maxBlocks <= 0 || !matchesToolKind(toolKind, originState)) {
|
||||
return;
|
||||
}
|
||||
|
||||
breakAll(toolKind, stack, level, player, collectConnected(level, origin, originState.getBlock(), maxBlocks, false));
|
||||
}
|
||||
|
||||
public static void mineTree(ItemStack stack, Level level, BlockState originState, BlockPos origin, ServerPlayer player, int maxBlocks) {
|
||||
if (level.isClientSide || BREAKING_EXTRA_BLOCKS.get() || maxBlocks <= 0 || !originState.is(BlockTags.LOGS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
breakAll(ToolKind.AXE, stack, level, player, collectConnected(level, origin, originState.getBlock(), maxBlocks, true));
|
||||
}
|
||||
|
||||
private static void breakAll(ToolKind toolKind, ItemStack stack, Level level, ServerPlayer player, List<BlockPos> targets) {
|
||||
if (targets.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
BREAKING_EXTRA_BLOCKS.set(true);
|
||||
try {
|
||||
for (BlockPos targetPos : targets) {
|
||||
if (!canBreak(toolKind, player, stack, level, targetPos, level.getBlockState(targetPos))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
player.gameMode.destroyBlock(targetPos);
|
||||
if (stack.isEmpty()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
BREAKING_EXTRA_BLOCKS.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
private static List<BlockPos> collectConnected(Level level, BlockPos origin, Block block, int maxBlocks, boolean requireFoliage) {
|
||||
List<BlockPos> found = new ArrayList<>();
|
||||
Set<BlockPos> visited = new HashSet<>();
|
||||
ArrayDeque<BlockPos> queue = new ArrayDeque<>();
|
||||
visited.add(origin);
|
||||
queue.add(origin);
|
||||
boolean foliage = false;
|
||||
|
||||
while (!queue.isEmpty() && found.size() < maxBlocks) {
|
||||
BlockPos current = queue.poll();
|
||||
for (int dx = -1; dx <= 1 && found.size() < maxBlocks; dx++) {
|
||||
for (int dy = -1; dy <= 1 && found.size() < maxBlocks; dy++) {
|
||||
for (int dz = -1; dz <= 1 && found.size() < maxBlocks; dz++) {
|
||||
if (dx == 0 && dy == 0 && dz == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
BlockPos next = current.offset(dx, dy, dz);
|
||||
if (!visited.add(next) || !level.isLoaded(next)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
BlockState state = level.getBlockState(next);
|
||||
if (state.is(block)) {
|
||||
found.add(next);
|
||||
queue.add(next);
|
||||
} else if (requireFoliage && !foliage && isNaturalFoliage(state)) {
|
||||
foliage = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return requireFoliage && !foliage ? List.of() : found;
|
||||
}
|
||||
|
||||
private static boolean isNaturalFoliage(BlockState state) {
|
||||
if (state.is(BlockTags.LEAVES)) {
|
||||
return !state.hasProperty(BlockStateProperties.PERSISTENT) || !state.getValue(BlockStateProperties.PERSISTENT);
|
||||
}
|
||||
return state.is(BlockTags.WART_BLOCKS) || state.is(Blocks.SHROOMLIGHT);
|
||||
}
|
||||
|
||||
public static void mineArea(ToolKind toolKind, ItemStack stack, Level level, BlockState originState, BlockPos origin, ServerPlayer player, int radius) {
|
||||
@@ -213,25 +339,47 @@ public final class UltimateToolHelper {
|
||||
HOE
|
||||
}
|
||||
|
||||
private static void toggleThreeByThree(Level level, Player player, ItemStack stack) {
|
||||
boolean enabled = !isThreeByThreeEnabled(stack);
|
||||
public enum MiningMode {
|
||||
DEFAULT,
|
||||
THREE_BY_THREE,
|
||||
VEIN
|
||||
}
|
||||
|
||||
private static List<MiningMode> availableModes(ToolKind toolKind) {
|
||||
List<MiningMode> modes = new ArrayList<>(3);
|
||||
if (toolKind == null) {
|
||||
return modes;
|
||||
}
|
||||
modes.add(MiningMode.DEFAULT);
|
||||
if (AntarchySettings.ultimateToolsThreeByThreeEnabled()) {
|
||||
modes.add(MiningMode.THREE_BY_THREE);
|
||||
}
|
||||
if (AntarchySettings.ultimateToolsVeinMiningEnabled() && (toolKind == ToolKind.PICKAXE || toolKind == ToolKind.AXE)) {
|
||||
modes.add(MiningMode.VEIN);
|
||||
}
|
||||
return modes;
|
||||
}
|
||||
|
||||
private static void cycleMiningMode(Level level, Player player, ItemStack stack) {
|
||||
List<MiningMode> modes = availableModes(toolKindOf(stack.getItem()));
|
||||
int current = modes.indexOf(getMiningMode(stack));
|
||||
MiningMode next = modes.get((current + 1) % modes.size());
|
||||
CustomData.update(DataComponents.CUSTOM_DATA, stack, tag -> {
|
||||
if (enabled) {
|
||||
tag.putBoolean(THREE_BY_THREE_TAG, true);
|
||||
} else {
|
||||
tag.remove(THREE_BY_THREE_TAG);
|
||||
if (next == MiningMode.DEFAULT) {
|
||||
tag.remove(MINING_MODE_TAG);
|
||||
} else {
|
||||
tag.putByte(MINING_MODE_TAG, (byte) next.ordinal());
|
||||
}
|
||||
});
|
||||
|
||||
if (!level.isClientSide) {
|
||||
player.displayClientMessage(
|
||||
Component.translatable(
|
||||
enabled
|
||||
? "message.antarchy.ultimate_tool.mode_3x3"
|
||||
: "message.antarchy.ultimate_tool.mode_default"
|
||||
),
|
||||
true
|
||||
);
|
||||
String key = switch (next) {
|
||||
case DEFAULT -> "message.antarchy.ultimate_tool.mode_default";
|
||||
case THREE_BY_THREE -> "message.antarchy.ultimate_tool.mode_3x3";
|
||||
case VEIN -> "message.antarchy.ultimate_tool.mode_vein";
|
||||
};
|
||||
player.displayClientMessage(Component.translatable(key), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ public class UtlimateShovelItem extends ShovelItem {
|
||||
@Override
|
||||
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
|
||||
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
|
||||
UltimateToolHelper.appendThreeByThreeTooltip(tooltipComponents);
|
||||
UltimateToolHelper.appendModeTooltip(UltimateToolHelper.ToolKind.SHOVEL, tooltipComponents);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
@@ -1,5 +1,6 @@
|
||||
package com.craisinlord.antarchy.mixins;
|
||||
|
||||
import com.craisinlord.antarchy.content.AntarchyTags;
|
||||
import com.craisinlord.antarchy.content.item.MantisClawItem;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
@@ -91,6 +92,7 @@ public abstract class MantisClawWallClimbMixin extends LivingEntity {
|
||||
Player player = (Player) (Object) this;
|
||||
return MantisClawItem.isDualWielding(player)
|
||||
&& this.horizontalCollision
|
||||
&& !this.level().dimensionTypeRegistration().is(AntarchyTags.DimensionTypes.NO_MANTIS_CLIMB)
|
||||
&& !this.onGround()
|
||||
&& !this.isInWaterOrBubble()
|
||||
&& !this.isPassenger()
|
||||
|
||||
@@ -517,6 +517,7 @@
|
||||
"message.antarchy.big_bertha.mode.molevore": "Molevore",
|
||||
"message.antarchy.big_bertha.mode.toreterror": "Toreterror",
|
||||
"message.antarchy.ultimate_tool.mode_3x3": "Auf 3x3-Abbau umgeschaltet",
|
||||
"message.antarchy.ultimate_tool.mode_vein": "Auf Adernabbau umgeschaltet",
|
||||
"message.antarchy.ultimate_tool.mode_default": "Auf normalen Abbau umgeschaltet",
|
||||
"advancements.antarchy.hey_listen.title": "Hey, hör zu!",
|
||||
"advancements.antarchy.hey_listen.description": "Eine Reverie hat sich dir angeschlossen.",
|
||||
@@ -549,6 +550,9 @@
|
||||
"tooltip.antarchy.big_bertha.mode.molevore": "Rechtsklick, um dich drehend nach vorn zu bohren und Molevore-Blöcke zu durchdringen.",
|
||||
"tooltip.antarchy.big_bertha.mode.toreterror": "Rechtsklick, um in die Luft zu springen und mit einer Flächenschockwelle herabzustürzen.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3": "Umschalt-Rechtsklick, um 3x3-Abbau umzuschalten.",
|
||||
"tooltip.antarchy.ultimate_tools_vein": "Umschalt-Rechtsklick, um Adernabbau umzuschalten.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3_vein": "Umschalt-Rechtsklick wechselt zwischen 3x3-Abbau und Adernabbau.",
|
||||
"tooltip.antarchy.battle_axe_tree_felling": "Fällt ganze Bäume. Schleichen, um einen einzelnen Stamm zu hacken.",
|
||||
"tooltip.antarchy.moggles.reveal": "Gewährt Nachtsicht und weist auf nahe Höhlen hin.",
|
||||
"tooltip.antarchy.moggles.underground": "Funktioniert nur, wenn du keinen freien Blick zum Himmel hast.",
|
||||
"tooltip.antarchy.cornea_ear.vision": "Gewährt %s Sekunden lang Nachtsicht.",
|
||||
|
||||
@@ -801,6 +801,7 @@
|
||||
"message.antarchy.big_bertha.mode.molevore": "Molevore",
|
||||
"message.antarchy.big_bertha.mode.toreterror": "Toreterror",
|
||||
"message.antarchy.ultimate_tool.mode_3x3": "Switched to 3x3 Mining",
|
||||
"message.antarchy.ultimate_tool.mode_vein": "Switched to Vein Mining",
|
||||
"message.antarchy.ultimate_tool.mode_default": "Switched to Default Mining",
|
||||
"advancements.antarchy.hey_listen.title": "Hey Listen",
|
||||
"advancements.antarchy.hey_listen.description": "A Reverie has joined you.",
|
||||
@@ -839,6 +840,9 @@
|
||||
"tooltip.antarchy.big_bertha.mode.molevore": "Use to spin forward and drill through Molevore blocks.",
|
||||
"tooltip.antarchy.big_bertha.mode.toreterror": "Use to launch into the air and crash down with an AOE shockwave.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3": "Shift + use to toggle 3x3 Mining.",
|
||||
"tooltip.antarchy.ultimate_tools_vein": "Shift + use to toggle Vein Mining.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3_vein": "Shift + use to cycle 3x3 and Vein Mining.",
|
||||
"tooltip.antarchy.battle_axe_tree_felling": "Fells whole trees. Sneak to chop a single log.",
|
||||
"tooltip.antarchy.moggles.reveal": "Gives night vision and points to nearby caves.",
|
||||
"tooltip.antarchy.moggles.underground": "Works only while you have no sky access.",
|
||||
"tooltip.antarchy.cornea_ear.vision": "Grants Night Vision for %s seconds.",
|
||||
|
||||
@@ -517,6 +517,7 @@
|
||||
"message.antarchy.big_bertha.mode.molevore": "Molevore",
|
||||
"message.antarchy.big_bertha.mode.toreterror": "Toreterror",
|
||||
"message.antarchy.ultimate_tool.mode_3x3": "Cambiado a minería 3x3",
|
||||
"message.antarchy.ultimate_tool.mode_vein": "Cambiado a minería de vetas",
|
||||
"message.antarchy.ultimate_tool.mode_default": "Cambiado a minería normal",
|
||||
"advancements.antarchy.hey_listen.title": "¡Oye, escucha!",
|
||||
"advancements.antarchy.hey_listen.description": "Una Reverie se ha unido a ti.",
|
||||
@@ -549,6 +550,9 @@
|
||||
"tooltip.antarchy.big_bertha.mode.molevore": "Clic derecho para girar hacia delante y perforar bloques de Molevore.",
|
||||
"tooltip.antarchy.big_bertha.mode.toreterror": "Clic derecho para lanzarte al aire y caer con una onda de choque en área.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3": "Mayús + clic derecho para alternar la minería 3x3.",
|
||||
"tooltip.antarchy.ultimate_tools_vein": "Mayús + clic derecho para alternar la minería de vetas.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3_vein": "Mayús + clic derecho para alternar entre minería 3x3 y de vetas.",
|
||||
"tooltip.antarchy.battle_axe_tree_felling": "Tala árboles enteros. Agáchate para cortar un solo tronco.",
|
||||
"tooltip.antarchy.moggles.reveal": "Otorga Visión nocturna y señala cuevas cercanas.",
|
||||
"tooltip.antarchy.moggles.underground": "Solo funciona cuando no tienes acceso al cielo.",
|
||||
"tooltip.antarchy.cornea_ear.vision": "Otorga Visión nocturna durante %s segundos.",
|
||||
|
||||
@@ -517,6 +517,7 @@
|
||||
"message.antarchy.big_bertha.mode.molevore": "Molevore",
|
||||
"message.antarchy.big_bertha.mode.toreterror": "Toreterror",
|
||||
"message.antarchy.ultimate_tool.mode_3x3": "Mode minage 3x3 activé",
|
||||
"message.antarchy.ultimate_tool.mode_vein": "Mode minage de filons activé",
|
||||
"message.antarchy.ultimate_tool.mode_default": "Mode minage normal activé",
|
||||
"advancements.antarchy.hey_listen.title": "Hé, écoute !",
|
||||
"advancements.antarchy.hey_listen.description": "Une Reverie vous a rejoint.",
|
||||
@@ -549,6 +550,9 @@
|
||||
"tooltip.antarchy.big_bertha.mode.molevore": "Clic droit pour tournoyer vers l’avant et forer les blocs de Molevore.",
|
||||
"tooltip.antarchy.big_bertha.mode.toreterror": "Clic droit pour bondir dans les airs et retomber avec une onde de choc de zone.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3": "Maj + clic droit pour activer ou désactiver le minage 3x3.",
|
||||
"tooltip.antarchy.ultimate_tools_vein": "Maj + clic droit pour activer ou désactiver le minage de filons.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3_vein": "Maj + clic droit pour alterner entre minage 3x3 et minage de filons.",
|
||||
"tooltip.antarchy.battle_axe_tree_felling": "Abat des arbres entiers. Accroupis-toi pour couper une seule bûche.",
|
||||
"tooltip.antarchy.moggles.reveal": "Accorde Vision nocturne et indique les grottes proches.",
|
||||
"tooltip.antarchy.moggles.underground": "Fonctionne uniquement lorsque vous n’avez pas accès au ciel.",
|
||||
"tooltip.antarchy.cornea_ear.vision": "Accorde Vision nocturne pendant %s secondes.",
|
||||
|
||||
@@ -517,6 +517,7 @@
|
||||
"message.antarchy.big_bertha.mode.molevore": "Molevore",
|
||||
"message.antarchy.big_bertha.mode.toreterror": "Toreterror",
|
||||
"message.antarchy.ultimate_tool.mode_3x3": "Scavo 3×3 attivato",
|
||||
"message.antarchy.ultimate_tool.mode_vein": "Scavo di vene attivato",
|
||||
"message.antarchy.ultimate_tool.mode_default": "Scavo normale attivato",
|
||||
"advancements.antarchy.hey_listen.title": "Ehi, ascolta!",
|
||||
"advancements.antarchy.hey_listen.description": "Una Reverie si è unita a te.",
|
||||
@@ -549,6 +550,9 @@
|
||||
"tooltip.antarchy.big_bertha.mode.molevore": "Fai clic destro per ruotare in avanti e perforare i blocchi di Molevore.",
|
||||
"tooltip.antarchy.big_bertha.mode.toreterror": "Fai clic destro per balzare in aria e schiantarti con un’onda d’urto ad area.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3": "Maiusc + clic destro per attivare o disattivare lo scavo 3×3.",
|
||||
"tooltip.antarchy.ultimate_tools_vein": "Maiusc + clic destro per attivare o disattivare lo scavo di vene.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3_vein": "Maiusc + clic destro per alternare scavo 3×3 e scavo di vene.",
|
||||
"tooltip.antarchy.battle_axe_tree_felling": "Abbatte alberi interi. Accovacciati per tagliare un solo tronco.",
|
||||
"tooltip.antarchy.moggles.reveal": "Fornisce Visione notturna e indica le grotte vicine.",
|
||||
"tooltip.antarchy.moggles.underground": "Funziona solo quando non puoi vedere il cielo.",
|
||||
"tooltip.antarchy.cornea_ear.vision": "Conferisce Visione notturna per %s secondi.",
|
||||
|
||||
@@ -517,6 +517,7 @@
|
||||
"message.antarchy.big_bertha.mode.molevore": "モールヴォア",
|
||||
"message.antarchy.big_bertha.mode.toreterror": "トアテラー",
|
||||
"message.antarchy.ultimate_tool.mode_3x3": "3×3採掘に切り替えました",
|
||||
"message.antarchy.ultimate_tool.mode_vein": "鉱脈採掘に切り替えました",
|
||||
"message.antarchy.ultimate_tool.mode_default": "通常採掘に切り替えました",
|
||||
"advancements.antarchy.hey_listen.title": "ねえ、聞いて!",
|
||||
"advancements.antarchy.hey_listen.description": "レヴェリーが仲間になりました。",
|
||||
@@ -549,6 +550,9 @@
|
||||
"tooltip.antarchy.big_bertha.mode.molevore": "右クリックで回転しながら前進し、モールヴォアブロックを掘り抜きます。",
|
||||
"tooltip.antarchy.big_bertha.mode.toreterror": "右クリックで空中へ飛び上がり、範囲衝撃波とともに落下します。",
|
||||
"tooltip.antarchy.ultimate_tools_3x3": "シフトキー+右クリックで3×3採掘を切り替えます。",
|
||||
"tooltip.antarchy.ultimate_tools_vein": "シフトキー+右クリックで鉱脈採掘を切り替えます。",
|
||||
"tooltip.antarchy.ultimate_tools_3x3_vein": "シフトキー+右クリックで3×3採掘と鉱脈採掘を切り替えます。",
|
||||
"tooltip.antarchy.battle_axe_tree_felling": "木を丸ごと伐採します。スニーク中は原木を1つだけ切ります。",
|
||||
"tooltip.antarchy.moggles.reveal": "暗視を付与し、近くの洞窟を示します。",
|
||||
"tooltip.antarchy.moggles.underground": "空が見えない場所でのみ機能します。",
|
||||
"tooltip.antarchy.cornea_ear.vision": "%s秒間暗視を付与します。",
|
||||
|
||||
@@ -792,6 +792,7 @@
|
||||
"message.antarchy.big_bertha.mode.molevore": "몰레보어",
|
||||
"message.antarchy.big_bertha.mode.toreterror": "토레테러",
|
||||
"message.antarchy.ultimate_tool.mode_3x3": "3x3 채굴 모드로 전환됨",
|
||||
"message.antarchy.ultimate_tool.mode_vein": "광맥 채굴 모드로 전환됨",
|
||||
"message.antarchy.ultimate_tool.mode_default": "기본 채굴 모드로 전환됨",
|
||||
"advancements.antarchy.hey_listen.title": "야, 들어봐!",
|
||||
"advancements.antarchy.hey_listen.description": "레버리가 당신과 함께합니다.",
|
||||
@@ -830,6 +831,9 @@
|
||||
"tooltip.antarchy.big_bertha.mode.molevore": "공격 시 추가 피해를 입히고 대상을 공중 높이 띄웁니다.",
|
||||
"tooltip.antarchy.big_bertha.mode.toreterror": "사용하여 앞으로 회전하며 몰레보어 블록을 뚫고 나아갑니다.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3": "Shift + 사용: 3x3 채굴을 켜거나 끕니다.",
|
||||
"tooltip.antarchy.ultimate_tools_vein": "Shift + 사용: 광맥 채굴을 켜거나 끕니다.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3_vein": "Shift + 사용: 3x3 채굴과 광맥 채굴을 전환합니다.",
|
||||
"tooltip.antarchy.battle_axe_tree_felling": "나무 전체를 벱니다. 웅크리면 통나무 하나만 벱니다.",
|
||||
"tooltip.antarchy.moggles.reveal": "야간 시야를 부여하고 근처 동굴을 가리킵니다.",
|
||||
"tooltip.antarchy.moggles.underground": "하늘이 가려진 곳에서만 작동합니다.",
|
||||
"tooltip.antarchy.cornea_ear.vision": "%s초 동안 야간 시야를 부여합니다.",
|
||||
|
||||
@@ -517,6 +517,7 @@
|
||||
"message.antarchy.big_bertha.mode.molevore": "Molevore",
|
||||
"message.antarchy.big_bertha.mode.toreterror": "Toreterror",
|
||||
"message.antarchy.ultimate_tool.mode_3x3": "Alternado para Mineração 3x3",
|
||||
"message.antarchy.ultimate_tool.mode_vein": "Alternado para Mineração de Veios",
|
||||
"message.antarchy.ultimate_tool.mode_default": "Alternado para Mineração Padrão",
|
||||
"advancements.antarchy.hey_listen.title": "Ei, Escute!",
|
||||
"advancements.antarchy.hey_listen.description": "Uma Reverie se juntou a você.",
|
||||
@@ -549,6 +550,9 @@
|
||||
"tooltip.antarchy.big_bertha.mode.molevore": "Clique com o botão direito para girar para a frente e perfurar blocos de Molevore.",
|
||||
"tooltip.antarchy.big_bertha.mode.toreterror": "Clique com o botão direito para se lançar ao ar e cair com uma onda de choque em área.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3": "Shift + clique com o botão direito para alternar a Mineração 3x3.",
|
||||
"tooltip.antarchy.ultimate_tools_vein": "Shift + clique com o botão direito para alternar a Mineração de Veios.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3_vein": "Shift + clique com o botão direito para alternar entre Mineração 3x3 e de Veios.",
|
||||
"tooltip.antarchy.battle_axe_tree_felling": "Derruba árvores inteiras. Agache para cortar um único tronco.",
|
||||
"tooltip.antarchy.moggles.reveal": "Concede Visão Noturna e aponta para cavernas próximas.",
|
||||
"tooltip.antarchy.moggles.underground": "Funciona apenas quando você não tem acesso ao céu.",
|
||||
"tooltip.antarchy.cornea_ear.vision": "Concede Visão Noturna por %s segundos.",
|
||||
|
||||
@@ -488,6 +488,7 @@
|
||||
"message.antarchy.big_bertha.mode.molevore": "Кротожор",
|
||||
"message.antarchy.big_bertha.mode.toreterror": "Тортеррор",
|
||||
"message.antarchy.ultimate_tool.mode_3x3": "Включено копание 3x3",
|
||||
"message.antarchy.ultimate_tool.mode_vein": "Включена добыча жил",
|
||||
"message.antarchy.ultimate_tool.mode_default": "Включено обычное копание",
|
||||
"advancements.antarchy.hey_listen.title": "Эй, послушай",
|
||||
"advancements.antarchy.hey_listen.description": "К вам присоединилась грёза.",
|
||||
@@ -520,6 +521,9 @@
|
||||
"tooltip.antarchy.big_bertha.mode.molevore": "ПКМ для рывка вперёд и бурения сквозь блоки кротожора.",
|
||||
"tooltip.antarchy.big_bertha.mode.toreterror": "ПКМ запускает вас в воздух и обрушивает вниз с ударной волной по площади.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3": "Shift + ПКМ для переключения режима копания 3x3.",
|
||||
"tooltip.antarchy.ultimate_tools_vein": "Shift + ПКМ для переключения добычи жил.",
|
||||
"tooltip.antarchy.ultimate_tools_3x3_vein": "Shift + ПКМ переключает копание 3x3 и добычу жил.",
|
||||
"tooltip.antarchy.battle_axe_tree_felling": "Срубает дерево целиком. Присядьте, чтобы срубить одно бревно.",
|
||||
"tooltip.antarchy.moggles.reveal": "Дают ночное зрение и указывают на ближайшие пещеры.",
|
||||
"tooltip.antarchy.moggles.underground": "Работает только если над вами нет открытого неба.",
|
||||
"tooltip.antarchy.cornea_ear.vision": "Даёт Ночное зрение на %s секунд.",
|
||||
|
||||
@@ -517,6 +517,7 @@
|
||||
"message.antarchy.big_bertha.mode.molevore": "莫尔沃尔",
|
||||
"message.antarchy.big_bertha.mode.toreterror": "托尔泰罗尔",
|
||||
"message.antarchy.ultimate_tool.mode_3x3": "已切换至3×3挖掘",
|
||||
"message.antarchy.ultimate_tool.mode_vein": "已切换至连锁挖矿",
|
||||
"message.antarchy.ultimate_tool.mode_default": "已切换至默认挖掘",
|
||||
"advancements.antarchy.hey_listen.title": "嘿,听着!",
|
||||
"advancements.antarchy.hey_listen.description": "一只雷弗里加入了你。",
|
||||
@@ -549,6 +550,9 @@
|
||||
"tooltip.antarchy.big_bertha.mode.molevore": "右键旋转向前并钻穿莫尔沃尔方块。",
|
||||
"tooltip.antarchy.big_bertha.mode.toreterror": "右键跃向空中并以范围冲击波砸落。",
|
||||
"tooltip.antarchy.ultimate_tools_3x3": "潜行键+右键切换3×3挖掘。",
|
||||
"tooltip.antarchy.ultimate_tools_vein": "潜行键+右键切换连锁挖矿。",
|
||||
"tooltip.antarchy.ultimate_tools_3x3_vein": "潜行键+右键在3×3挖掘与连锁挖矿之间切换。",
|
||||
"tooltip.antarchy.battle_axe_tree_felling": "一次砍倒整棵树。潜行时只砍一块原木。",
|
||||
"tooltip.antarchy.moggles.reveal": "获得夜视并指向附近洞穴。",
|
||||
"tooltip.antarchy.moggles.underground": "仅在无法接触天空时生效。",
|
||||
"tooltip.antarchy.cornea_ear.vision": "获得%s秒夜视。",
|
||||
|
||||
@@ -517,6 +517,7 @@
|
||||
"message.antarchy.big_bertha.mode.molevore": "莫爾沃爾",
|
||||
"message.antarchy.big_bertha.mode.toreterror": "托爾泰羅爾",
|
||||
"message.antarchy.ultimate_tool.mode_3x3": "已切換至3×3挖掘",
|
||||
"message.antarchy.ultimate_tool.mode_vein": "已切換至連鎖挖礦",
|
||||
"message.antarchy.ultimate_tool.mode_default": "已切換至預設挖掘",
|
||||
"advancements.antarchy.hey_listen.title": "嘿,聽著!",
|
||||
"advancements.antarchy.hey_listen.description": "一隻雷弗里加入了你。",
|
||||
@@ -549,6 +550,9 @@
|
||||
"tooltip.antarchy.big_bertha.mode.molevore": "右鍵旋轉向前並鑽穿莫爾沃爾方塊。",
|
||||
"tooltip.antarchy.big_bertha.mode.toreterror": "右鍵躍向空中並以範圍衝擊波砸落。",
|
||||
"tooltip.antarchy.ultimate_tools_3x3": "潛行鍵+右鍵切換3×3挖掘。",
|
||||
"tooltip.antarchy.ultimate_tools_vein": "潛行鍵+右鍵切換連鎖挖礦。",
|
||||
"tooltip.antarchy.ultimate_tools_3x3_vein": "潛行鍵+右鍵在3×3挖掘與連鎖挖礦之間切換。",
|
||||
"tooltip.antarchy.battle_axe_tree_felling": "一次砍倒整棵樹。潛行時只砍一塊原木。",
|
||||
"tooltip.antarchy.moggles.reveal": "獲得夜視並指向附近洞穴。",
|
||||
"tooltip.antarchy.moggles.underground": "僅在無法接觸天空時生效。",
|
||||
"tooltip.antarchy.cornea_ear.vision": "獲得%s秒夜視。",
|
||||
|
||||
@@ -6,7 +6,7 @@ mod_name=Antarchy
|
||||
mod_description=ANTS! ANTS! ANTS! ANTS!
|
||||
mod_authors=CraisinLord
|
||||
mod_group_id=com.craisinlord
|
||||
mod_version=2.2.6
|
||||
mod_version=2.2.7
|
||||
mod_license=All Rights Reserved
|
||||
|
||||
minecraft_version=1.20.1
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ org.gradle.configureondemand=true
|
||||
minecraft_version_1_21_1=1.21.1
|
||||
modid=antarchy
|
||||
mod_id=antarchy
|
||||
mod_version=2.2.6
|
||||
mod_version=2.2.7
|
||||
maven_group=com.craisinlord
|
||||
mixin_version=0.15.4+mixin.0.8.7
|
||||
|
||||
|
||||
+3
@@ -439,6 +439,9 @@ public final class AntarchyConfigModuleNeoforge {
|
||||
AntarchySettings.setUltimateHoeAttackSpeed(AntarchyToolsConfig.ultimateHoeAttackSpeed());
|
||||
AntarchySettings.setUltimateToolEnchantability(AntarchyToolsConfig.ultimateToolEnchantability());
|
||||
AntarchySettings.setUltimateToolsThreeByThreeEnabled(AntarchyToolsConfig.ultimateToolsThreeByThreeEnabled());
|
||||
AntarchySettings.setUltimateToolsVeinMiningEnabled(AntarchyToolsConfig.ultimateToolsVeinMiningEnabled());
|
||||
AntarchySettings.setUltimateToolsVeinMiningMaxBlocks(AntarchyToolsConfig.ultimateToolsVeinMiningMaxBlocks());
|
||||
AntarchySettings.setUltimateToolsTreeFellingMaxLogs(AntarchyToolsConfig.ultimateToolsTreeFellingMaxLogs());
|
||||
|
||||
AntarchySettings.setUltimateBowAttackDamage(AntarchyToolsConfig.ultimateBowAttackDamage());
|
||||
AntarchySettings.setUltimateBowPlayerHeal(AntarchyToolsConfig.ultimateBowPlayerHeal());
|
||||
|
||||
+11
@@ -28,6 +28,9 @@ public final class AntarchyToolsConfig {
|
||||
private static final ModConfigSpec.DoubleValue ULTIMATE_HOE_ATTACK_SPEED;
|
||||
private static final ModConfigSpec.IntValue ULTIMATE_TOOL_ENCHANTABILITY;
|
||||
private static final ModConfigSpec.BooleanValue ULTIMATE_TOOLS_THREE_BY_THREE_ENABLED;
|
||||
private static final ModConfigSpec.BooleanValue ULTIMATE_TOOLS_VEIN_MINING_ENABLED;
|
||||
private static final ModConfigSpec.IntValue ULTIMATE_TOOLS_VEIN_MINING_MAX_BLOCKS;
|
||||
private static final ModConfigSpec.IntValue ULTIMATE_TOOLS_TREE_FELLING_MAX_LOGS;
|
||||
|
||||
|
||||
// Ultimate Bow
|
||||
@@ -306,6 +309,11 @@ public final class AntarchyToolsConfig {
|
||||
ULTIMATE_TOOLS_THREE_BY_THREE_ENABLED = b
|
||||
.comment("If false, Ultimate pickaxe, axe, shovel, and hoe lose their 3x3 mining mode and tooltip.")
|
||||
.define("threeByThreeEnabled", true);
|
||||
ULTIMATE_TOOLS_VEIN_MINING_ENABLED = b
|
||||
.comment("If false, the Ultimate Pickaxe and Axe lose Vein Mining and the Battle Axe stops felling trees.")
|
||||
.define("veinMiningEnabled", true);
|
||||
ULTIMATE_TOOLS_VEIN_MINING_MAX_BLOCKS = b.comment("Most extra blocks the Ultimate Pickaxe or Axe breaks in one Vein Mining swing. Logs use treeFellingMaxLogs instead.").defineInRange("veinMiningMaxBlocks", 64, 1, 1024);
|
||||
ULTIMATE_TOOLS_TREE_FELLING_MAX_LOGS = b.comment("Most extra logs broken at once by Vein Mining on logs or by the Battle Axe.") .defineInRange("treeFellingMaxLogs", 128, 1, 1024);
|
||||
b.pop();
|
||||
|
||||
|
||||
@@ -672,6 +680,9 @@ public final class AntarchyToolsConfig {
|
||||
static double ultimateHoeAttackSpeed() { return ULTIMATE_HOE_ATTACK_SPEED.get(); }
|
||||
static int ultimateToolEnchantability() { return ULTIMATE_TOOL_ENCHANTABILITY.get(); }
|
||||
static boolean ultimateToolsThreeByThreeEnabled() { return ULTIMATE_TOOLS_THREE_BY_THREE_ENABLED.get(); }
|
||||
static boolean ultimateToolsVeinMiningEnabled() { return ULTIMATE_TOOLS_VEIN_MINING_ENABLED.get(); }
|
||||
static int ultimateToolsVeinMiningMaxBlocks() { return ULTIMATE_TOOLS_VEIN_MINING_MAX_BLOCKS.get(); }
|
||||
static int ultimateToolsTreeFellingMaxLogs() { return ULTIMATE_TOOLS_TREE_FELLING_MAX_LOGS.get(); }
|
||||
|
||||
static double ultimateBowAttackDamage() { return ULTIMATE_BOW_ATTACK_DAMAGE.get(); }
|
||||
static double ultimateBowPlayerHeal() { return ULTIMATE_BOW_PLAYER_HEAL.get(); }
|
||||
|
||||
Reference in new issue
Block a user