Merge pull request #4118 from Jobieskii/mc1.18/dev

Add survivalContraptionPickup option to config
This commit is contained in:
simibubi 2022-12-12 13:07:42 +01:00 committed by GitHub
commit 76aeb83254
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -5,6 +5,8 @@ import java.util.List;
import javax.annotation.Nullable;
import com.simibubi.create.foundation.config.AllConfigs;
import org.apache.commons.lang3.tuple.MutablePair;
import com.google.common.io.ByteArrayDataOutput;
@ -203,6 +205,9 @@ public class MinecartContraptionItem extends Item {
public static void wrenchCanBeUsedToPickUpMinecartContraptions(PlayerInteractEvent.EntityInteract event) {
Entity entity = event.getTarget();
Player player = event.getPlayer();
if (!AllConfigs.SERVER.kinetics.survivalContraptionPickup.get() && !player.isCreative()) {
return;
}
if (player == null || entity == null)
return;

View file

@ -34,6 +34,7 @@ public class CKinetics extends ConfigBase {
public final ConfigInt maxPistonPoles = i(64, 1, "maxPistonPoles", Comments.maxPistonPoles);
public final ConfigInt maxRopeLength = i(256, 1, "maxRopeLength", Comments.maxRopeLength);
public final ConfigInt maxCartCouplingLength = i(32, 1, "maxCartCouplingLength", Comments.maxCartCouplingLength);
public final ConfigBool survivalContraptionPickup = b(true, "survivalContraptionPickup", Comments.survivalContraptionPickup);
public final ConfigEnum<ContraptionMovementSetting> spawnerMovement =
e(ContraptionMovementSetting.NO_PICKUP, "movableSpawners", Comments.spawnerMovement);
public final ConfigEnum<ContraptionMovementSetting> amethystMovement =
@ -105,6 +106,7 @@ public class CKinetics extends ConfigBase {
static String maxEjectorDistance = "Max Distance in blocks a Weighted Ejector can throw";
static String ejectorScanInterval =
"Time in ticks until the next item launched by an ejector scans blocks for potential collisions";
static String survivalContraptionPickup = "Allow for minecart contartaption pickup in survival mode.";
static String spawnerMovement = "Configure how Spawner blocks can be moved by contraptions.";
static String amethystMovement = "Configure how Budding Amethyst can be moved by contraptions.";
static String obsidianMovement = "Configure how Obsidian blocks can be moved by contraptions.";