From a12aed71d2d0a2e8e190cd938c1ecc4c7d7843e2 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Thu, 19 Mar 2020 12:27:44 +0100 Subject: [PATCH] Bug Fixes - Fix typos - Swapped terminology in stress information shown by goggles - Added an overall block movement limit to contraptions - Wrench no longer shows bulk range of chassis above a certain amount - Chassis no longer use up slime when all sides are made sticky with the convenience shortcut - fan now requires less su --- .../java/com/simibubi/create/config/CKinetics.java | 6 ++---- .../create/config/StressConfigDefaults.java | 2 +- .../contraptions/ChassisRangeDisplay.java | 14 ++++++++++++-- .../components/contraptions/Contraption.java | 3 ++- .../contraptions/chassis/AbstractChassisBlock.java | 2 -- .../relays/gauge/GaugeInformationRenderer.java | 12 ++++++------ src/main/resources/assets/create/lang/en_us.json | 4 ++-- ...ce in Create => Rotational Force in Create.txt} | 0 8 files changed, 25 insertions(+), 18 deletions(-) rename wiki/{Rotational Force in Create => Rotational Force in Create.txt} (100%) diff --git a/src/main/java/com/simibubi/create/config/CKinetics.java b/src/main/java/com/simibubi/create/config/CKinetics.java index 26b2e01cc..073eb5991 100644 --- a/src/main/java/com/simibubi/create/config/CKinetics.java +++ b/src/main/java/com/simibubi/create/config/CKinetics.java @@ -21,8 +21,7 @@ public class CKinetics extends ConfigBase { public ConfigInt inWorldProcessingTime = i(150, 0, "inWorldProcessingTime", Comments.inWorldProcessingTime); public ConfigGroup contraptions = group(0, "contraptions", "Moving Contraptions"); - public ConfigInt maxChassisForTranslation = i(16, 1, "maxChassisForTranslation", Comments.maxChassisForTranslation); - public ConfigInt maxChassisForRotation = i(16, 1, "maxChassisForRotation", Comments.maxChassisForRotation); + public ConfigInt maxBlocksMoved = i(2048, 1, "maxBlocksMoved", Comments.maxBlocksMoved); public ConfigInt maxChassisRange = i(16, 1, "maxChassisRange", Comments.maxChassisRange); public ConfigInt maxPistonPoles = i(64, 1, "maxPistonPoles", Comments.maxPistonPoles); public ConfigInt maxRopeLength = i(128, 1, "maxRopeLength", Comments.maxRopeLength); @@ -54,8 +53,7 @@ public class CKinetics extends ConfigBase { static String fanRotationArgmax = "Rotation speed at which the maximum stats of fans are reached."; static String generatingFanSpeed = "Rotation speed generated by a vertical fan above fire."; static String inWorldProcessingTime = "Game ticks required for a Fan-based processing recipe to take effect."; - static String maxChassisForTranslation = "Maximum amount of chassis blocks movable by a Mechanical Piston."; - static String maxChassisForRotation = "Maximum amount of chassis blocks movable by a Mechanical Bearing."; + static String maxBlocksMoved = "Maximum amount of blocks in a structure movable by Pistons, Bearings or other means."; static String maxChassisRange = "Maximum value of a chassis attachment range."; static String maxPistonPoles = "Maximum amount of extension poles behind a Mechanical Piston."; static String maxRopeLength = "Max length of rope available off a Rope Pulley."; diff --git a/src/main/java/com/simibubi/create/config/StressConfigDefaults.java b/src/main/java/com/simibubi/create/config/StressConfigDefaults.java index 83d90c3b0..23ebbd34d 100644 --- a/src/main/java/com/simibubi/create/config/StressConfigDefaults.java +++ b/src/main/java/com/simibubi/create/config/StressConfigDefaults.java @@ -33,7 +33,6 @@ public class StressConfigDefaults { case DRILL: case SAW: case DEPLOYER: - case ENCASED_FAN: case MECHANICAL_MIXER: return 4; @@ -47,6 +46,7 @@ public class StressConfigDefaults { return 2; case BELT: + case ENCASED_FAN: case CUCKOO_CLOCK: return 1; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java index 4986495d3..cdc074ba5 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java @@ -1,16 +1,19 @@ package com.simibubi.create.modules.contraptions.components.contraptions; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import com.mojang.blaze3d.platform.GlStateManager; +import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; import com.simibubi.create.AllKeys; import com.simibubi.create.foundation.utility.TessellatorHelper; import com.simibubi.create.modules.contraptions.components.contraptions.chassis.ChassisTileEntity; +import com.simibubi.create.modules.contraptions.components.contraptions.chassis.LinearChassisBlock; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; @@ -47,8 +50,8 @@ public class ChassisRangeDisplay { if (positions == null) return shape; for (BlockPos blockPos : positions) - shape = VoxelShapes.or(shape, - BLOCK_OUTLINE.withOffset(blockPos.getX(), blockPos.getY(), blockPos.getZ())); + shape = + VoxelShapes.or(shape, BLOCK_OUTLINE.withOffset(blockPos.getX(), blockPos.getY(), blockPos.getZ())); return shape; } @@ -68,6 +71,13 @@ public class ChassisRangeDisplay { includedTEs = te.collectChassisGroup(); if (includedTEs == null) return shape; + + // outlining algo is not very scalable -> display only single chassis if group gets too large + if (LinearChassisBlock.isChassis(chassis.getBlockState()) && includedTEs.size() > 32) + includedTEs = Arrays.asList(chassis); + if (AllBlocks.ROTATION_CHASSIS.typeOf(chassis.getBlockState()) && includedTEs.size() > 8) + includedTEs = Arrays.asList(chassis); + for (ChassisTileEntity chassisTileEntity : includedTEs) shape = VoxelShapes.or(shape, super.createSelection(chassisTileEntity)); return shape; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java index 080ca1645..1b63899e1 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java @@ -115,7 +115,8 @@ public abstract class Contraption { if (!addToInitialFrontier(world, pos, forcedDirection, frontier)) return false; - for (int limit = 1000; limit > 0; limit--) { + Integer blockLimit = AllConfigs.SERVER.kinetics.maxBlocksMoved.get(); + for (int limit = blockLimit; limit > 0; limit--) { if (frontier.isEmpty()) return true; if (!moveBlock(world, frontier.remove(0), forcedDirection, frontier, visited)) diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/chassis/AbstractChassisBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/chassis/AbstractChassisBlock.java index e2d13f6eb..e11ca9928 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/chassis/AbstractChassisBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/chassis/AbstractChassisBlock.java @@ -60,8 +60,6 @@ public abstract class AbstractChassisBlock extends RotatedPillarBlock { return true; } worldIn.playSound(null, pos, AllSoundEvents.SLIME_ADDED.get(), SoundCategory.BLOCKS, .5f, 1); - if (!player.isCreative()) - heldItem.shrink(1); state = state.with(glueableSide, true); } } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeInformationRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeInformationRenderer.java index daa470f0d..aeaa8c39d 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeInformationRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeInformationRenderer.java @@ -131,9 +131,9 @@ public class GaugeInformationRenderer { tooltip.add(spacing + _kineticStatsTitle); tooltip.add(spacing + GRAY + _stressImpact); - String addedStress = AQUA + "" + format(stressApplied) + _stressUnit + " " + DARK_GRAY + _atCurrentSpeed; + String addedStress = AQUA + "" + format(stressApplied) + _stressUnit + " " + DARK_GRAY + _baseValue; String addedStressAtBase = - GRAY + "" + format(stressApplied * Math.abs(te.getSpeed())) + _stressUnit + " " + DARK_GRAY + _baseValue; + GRAY + "" + format(stressApplied * Math.abs(te.getSpeed())) + _stressUnit + " " + DARK_GRAY + _atCurrentSpeed; tooltip.add(spacing + " " + addedStress); tooltip.add(spacing + " " + addedStressAtBase); } @@ -163,8 +163,8 @@ public class GaugeInformationRenderer { relativeCap = addedStressCapacity * actualSpeed; String addedCapacity = - AQUA + "" + format(addedStressCapacity) + _stressUnit + " " + DARK_GRAY + _atCurrentSpeed; - String addedCapacityAtBase = GRAY + "" + format(relativeCap) + _stressUnit + " " + DARK_GRAY + _baseValue; + AQUA + "" + format(addedStressCapacity) + _stressUnit + " " + DARK_GRAY + _baseValue; + String addedCapacityAtBase = GRAY + "" + format(relativeCap) + _stressUnit + " " + DARK_GRAY + _atCurrentSpeed; tooltip.add(spacing + " " + addedCapacity); tooltip.add(spacing + " " + addedCapacityAtBase); } @@ -228,8 +228,8 @@ public class GaugeInformationRenderer { tooltip.add(spacing + GRAY + _capacity); String capacity = color + "" + format((cap - stress) / Math.abs(theoreticalSpeed)) + _stressUnit + " " - + DARK_GRAY + _atCurrentSpeed; - String capacityAtBase = GRAY + "" + format(cap - stress) + _stressUnit + " " + DARK_GRAY + _baseValue; + + DARK_GRAY + _baseValue; + String capacityAtBase = GRAY + "" + format(cap - stress) + _stressUnit + " " + DARK_GRAY + _atCurrentSpeed; tooltip.add(spacing + " " + capacity); tooltip.add(spacing + " " + capacityAtBase); } diff --git a/src/main/resources/assets/create/lang/en_us.json b/src/main/resources/assets/create/lang/en_us.json index d4b3e4078..d3e4c9652 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -212,7 +212,7 @@ "block.create.weathered_limestone_bricks_wall": "Weathered Limestone Brick Wall", "block.create.weathered_limestone_bricks_slab": "Weathered Limestone Brick Slab", "block.create.weathered_limestone_pillar": "Weathered Limestone Pillar", - "block.create.weathered_limestone_layers": "Weathered Layered Limestone", + "block.create.weathered_limestone_layers": "Layered Weathered Limestone", "block.create.dolomite_pillar": "Dolomite Pillar", "block.create.dolomite": "Dolomite", @@ -1144,7 +1144,7 @@ "item.create.shadow_steel.tooltip.summary": "A Chromatic material forged _in_ _the_ _void_.", "item.create.slot_cover.tooltip": "SLOT COVER", - "item.create.slot_cover.tooltip.summary": "Used to mark a _Mechanical_ _Crafter_ as an empty slot in a recipe. Crafters do not necessarily have to form a full square gri. This is useful when there are recipes where _ingredients_ _are_ _diagonal_ to each other.", + "item.create.slot_cover.tooltip.summary": "Used to mark a _Mechanical_ _Crafter_ as an empty slot in a recipe. Crafters do not necessarily have to form a full square grid. This is useful when there are recipes where _ingredients_ _are_ _diagonal_ to each other.", "tool.create.shadow_steel.tooltip": "SHADOW STEEL TOOLS", "tool.create.shadow_steel.tooltip.summary": "A fast and powerful tool that _destroys_ _drops_ from any block or entity. Killed mobs can drop _more_ _experience_ based on the _Looting_ modifier of this tool.", diff --git a/wiki/Rotational Force in Create b/wiki/Rotational Force in Create.txt similarity index 100% rename from wiki/Rotational Force in Create rename to wiki/Rotational Force in Create.txt