diff --git a/README.md b/README.md
index fb00fae..47729e4 100644
--- a/README.md
+++ b/README.md
@@ -30,10 +30,57 @@ The command used for the `insaneBehaviors` rule.
* Options `true`, `ops`, `false`, `0`, `1`, `2`, `3`, `4`
* Default value: `ops`
+### insaneBehaviorsIncrement
+Determines the incrementing behavior of the `insaneBehaviors` rule. If set to `normal`, the counter increments normally until all points of the current resolution have been exhausted, then step to the next resolution.\n`loopCurrentResolution` will instead restart at the beginning of the current resolution.\n`Freeze` will stop both the counter and resolution from incrementing.
+
+* Type: `String`
+* Categories: `CREATIVE`, `JOA`
+* Options `normal`, `loopCurrentResolution`, `freeze`
+* Default value: `normal`
+
+### insaneBehaviorsSkipVisitedPoints
+Makes the `insaneBehaviors` rule skip points that coincide with previous resolutions, reducing the overall search space by a fraction that approaches 1/(2^resolution)
+
+* Type: `Boolean`
+* Categories: `CREATIVE`, `JOA`
+* Options `true`, `false`
+* Default value: `false`
+
### blockTickling
Lets you send manual block and/or shape updates to blocks using a feather item. Shape updates are sent from the block in front of the face you're clicking on. Useful if you're working with update interactions off or with budded blocks.
* Type: `String`
* Categories: `CREATIVE`, `JOA`
* Options `off`, `blockupdates`, `shapeupdates`, `both`
-* Default value: `off`
\ No newline at end of file
+* Default value: `off`
+
+## disableEndermanGriefing
+Disables enderman griefing.
+
+* Type: `Boolean`
+* Categories: `SURVIVAL`, `JOA`
+* Options `true`, `false`
+* Default value: `false`
+
+## disableElytraRockets
+Disables using rockets with elytra.
+
+* Type: `Boolean`
+* Categories: `SURVIVAL`, `JOA`
+* Options `true`, `false`
+* Default value: `false`
+
+## verticalRocketsFromStandstill
+Makes rocket flying only activate while standing on the ground, and makes it only propel you upwards. Disables using rockets while already flying.
+
+* Type: `Boolean`
+* Categories: `SURVIVAL`, `JOA`, `EXPERIMENTAL`
+* Options `true`, `false`
+* Default value: `false`
+
+## verticalRocketPower
+The vertical acceleration power used with the `verticalRocketsFromStandstill` rule.
+
+* Type: `Double`
+* Categories: `SURVIVAL`, `JOA`, `EXPERIMENTAL`
+* Default value: `0.75`
\ No newline at end of file
diff --git a/common.gradle b/common.gradle
index f0c42db..b12d922 100644
--- a/common.gradle
+++ b/common.gradle
@@ -97,7 +97,7 @@ if (System.getenv("JITPACK") == "true") {
version = 'v' + fullModVersion
} else {
base.archivesName = project.archives_base_name
- version = 'mc' + project.minecraft_version + '-v' + fullModVersion
+ version = 'mc' + project.minecraft_display_version + '-v' + fullModVersion
}
// See https://youtrack.jetbrains.com/issue/IDEA-296490
diff --git a/gradle.properties b/gradle.properties
index 8b17b1b..5c3565e 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -8,7 +8,7 @@
# Mod Properties
mod_id=joacarpet
mod_name=JoaCarpet
- mod_version=2.1.0
+ mod_version=2.2.0
maven_group=me.fallenbreath
archives_base_name=joacarpet
diff --git a/src/main/java/com/joacarpet/JoaCarpetSettings.java b/src/main/java/com/joacarpet/JoaCarpetSettings.java
index cfa7298..7630478 100644
--- a/src/main/java/com/joacarpet/JoaCarpetSettings.java
+++ b/src/main/java/com/joacarpet/JoaCarpetSettings.java
@@ -22,10 +22,13 @@
//#if MC >= 11900
import carpet.api.settings.Rule;
+import carpet.api.settings.Validators;
+
import static carpet.api.settings.RuleCategory.*;
//#else
//$$ import carpet.settings.Rule;
//$$ import static carpet.settings.RuleCategory.*;
+//$$ import carpet.settings.Validator;
//#endif
public class JoaCarpetSettings {
@@ -47,7 +50,7 @@ public class JoaCarpetSettings {
categories = {CREATIVE, JOA},
//#else
//$$ category = {CREATIVE, JOA},
-//$$ desc="Determines the incrementing behavior of the `insaneBehaviors` rule. If set to normal, the counter increments normally until all points of the current resolution have been exhausted, then step to the next resolution.\n`loopCurrentResolution` will instead restart at the beginning of the current resolution.\n`Freeze` will stop both the counter and resolution from incrementing.",
+//$$ desc="Determines the incrementing behavior of the `insaneBehaviors` rule. If set to `normal`, the counter increments normally until all points of the current resolution have been exhausted, then step to the next resolution.\n`loopCurrentResolution` will instead restart at the beginning of the current resolution.\n`Freeze` will stop both the counter and resolution from incrementing.",
//#endif
options = {"normal", "loopCurrentResolution", "freeze"}
)
@@ -107,4 +110,27 @@ public class JoaCarpetSettings {
options = {"true", "false"}
)
public static String disableElytraRockets = "false";
+
+ @Rule(
+ //#if MC >= 11900
+ categories = {SURVIVAL, JOA, EXPERIMENTAL},
+ //#else
+//$$ category = {SURVIVAL, JOA},
+//$$ desc="Makes rocket flying only activate while standing on the ground, and makes it only propel you upwards. Disables using rockets while already flying.",
+ //#endif
+ options = {"true", "false"}
+ )
+ public static String verticalRocketsFromStandstill = "false";
+
+ @Rule(
+ //#if MC >= 11900
+ categories = {SURVIVAL, JOA, EXPERIMENTAL},
+ validators = Validators.NonNegativeNumber.class
+ //#else
+//$$ category = {SURVIVAL, JOA},
+//$$ desc="The vertical acceleration power used with the `verticalRocketsFromStandstill` rule.",
+//$$ validate = Validator.NONNEGATIVE_NUMBER.class
+ //#endif
+ )
+ public static double verticalRocketPower = 0.75;
}
diff --git a/src/main/java/com/joacarpet/mixin/miscSurvival/VerticalRocketsFromStandstillMixin1.java b/src/main/java/com/joacarpet/mixin/miscSurvival/VerticalRocketsFromStandstillMixin1.java
new file mode 100644
index 0000000..e419455
--- /dev/null
+++ b/src/main/java/com/joacarpet/mixin/miscSurvival/VerticalRocketsFromStandstillMixin1.java
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the JoaCarpet project, licensed under the
+ * GNU Lesser General Public License v3.0
+ *
+ * Copyright (C) 2024 Joa and contributors
+ *
+ * JoaCarpet is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * JoaCarpet is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with JoaCarpet. If not, see .
+ */
+
+package com.joacarpet.mixin.miscSurvival;
+
+import com.google.common.collect.Iterables;
+import com.joacarpet.JoaCarpetSettings;
+import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
+import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
+import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.item.FireworkRocketItem;
+import net.minecraft.world.item.Items;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+
+import static com.google.common.collect.Iterables.get;
+
+@Mixin(FireworkRocketItem.class)
+public class VerticalRocketsFromStandstillMixin1 {
+
+ @WrapOperation(
+ method = "use",
+ at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/player/Player;isFallFlying()Z")
+ )
+ private boolean requireOnGround(Player player, Operation original) {
+ if (JoaCarpetSettings.verticalRocketsFromStandstill.equals("true"))
+ return player.onGround()
+ && Iterables.get(player.getArmorSlots(), 2).is(Items.ELYTRA)
+ && Iterables.get(player.getArmorSlots(), 2).getDamageValue() < 431;
+ return original.call(player);
+ }
+}
diff --git a/src/main/java/com/joacarpet/mixin/miscSurvival/VerticalRocketsFromStandstillMixin2.java b/src/main/java/com/joacarpet/mixin/miscSurvival/VerticalRocketsFromStandstillMixin2.java
new file mode 100644
index 0000000..91c64f2
--- /dev/null
+++ b/src/main/java/com/joacarpet/mixin/miscSurvival/VerticalRocketsFromStandstillMixin2.java
@@ -0,0 +1,56 @@
+/*
+ * This file is part of the JoaCarpet project, licensed under the
+ * GNU Lesser General Public License v3.0
+ *
+ * Copyright (C) 2024 Joa and contributors
+ *
+ * JoaCarpet is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * JoaCarpet is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with JoaCarpet. If not, see .
+ */
+
+package com.joacarpet.mixin.miscSurvival;
+
+import com.joacarpet.JoaCarpetSettings;
+import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
+import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
+import net.minecraft.world.entity.LivingEntity;
+import net.minecraft.world.entity.projectile.FireworkRocketEntity;
+import net.minecraft.world.phys.Vec3;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.ModifyArgs;
+import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
+
+@Mixin(FireworkRocketEntity.class)
+public class VerticalRocketsFromStandstillMixin2 {
+
+ @WrapOperation(
+ method = "tick",
+ at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;isFallFlying()Z")
+ )
+ private boolean ignoreIsFallFlying(LivingEntity livingEntity, Operation original) {
+ if (JoaCarpetSettings.verticalRocketsFromStandstill.equals("true")){
+ return true;
+ }
+ return original.call(livingEntity);
+ }
+
+ @ModifyArgs(
+ method = "tick",
+ at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;setDeltaMovement(Lnet/minecraft/world/phys/Vec3;)V")
+ )
+ private void rocketStraightUp(Args args) {
+ if (JoaCarpetSettings.verticalRocketsFromStandstill.equals("true"))
+ args.set(0, new Vec3(0.0, JoaCarpetSettings.verticalRocketPower, 0.0));
+ }
+}
diff --git a/src/main/resources/assets/joacarpet/lang/en_us.json b/src/main/resources/assets/joacarpet/lang/en_us.json
index 2a3c9ea..b0801c4 100644
--- a/src/main/resources/assets/joacarpet/lang/en_us.json
+++ b/src/main/resources/assets/joacarpet/lang/en_us.json
@@ -1,9 +1,11 @@
{
"carpet.rule.insaneBehaviors.desc": "Makes the random velocities of droppers and projectiles (as well as both the position and velocity of blocks broken by pistons) systematically iterate through the most extreme values possible, and then repeatedly iterate through all the halfway points in between, in a sense attempting every point in a 3d/5d \"grid\" that slowly increases in resolution.\nFor droppers and projectiles, this setting determines whether the max value corresponds to the old gaussian randomness limits (\"extreme\"), or the limits of the triangular randomness introduced in 1.19 (\"sensible\"). Both settings function the same for blocks being broken by pistons.\nFor the `/insanebehaviors ` command, see `/carpet commandInsaneBehaviors`.\nDo note that insaneBehaviors works on a global iterator: any triggering event will step through an iteration from all other insaneBehaviors events, too.",
"carpet.rule.insaneBehaviorsSkipVisitedPoints.desc": "Makes the `insaneBehaviors` rule skip points that coincide with previous resolutions, reducing the overall search space by a fraction that approaches 1/(2^resolution)",
- "carpet.rule.insaneBehaviorsIncrement.desc": "Determines the incrementing behavior of the `insaneBehaviors` rule. If set to normal, the counter increments normally until all points of the current resolution have been exhausted, then step to the next resolution.\n`loopCurrentResolution` will instead restart at the beginning of the current resolution.\n`Freeze` will stop both the counter and resolution from incrementing.",
+ "carpet.rule.insaneBehaviorsIncrement.desc": "Determines the incrementing behavior of the `insaneBehaviors` rule. If set to `normal`, the counter increments normally until all points of the current resolution have been exhausted, then step to the next resolution.\n`loopCurrentResolution` will instead restart at the beginning of the current resolution.\n`Freeze` will stop both the counter and resolution from incrementing.",
"carpet.rule.commandInsaneBehaviors.desc": "The command used for the `insaneBehaviors` rule.\n\"reset\" sets the `resolution` and `counter` back to the default values. \"getstate\" and \"setstate\" are used to manually read and write the current iteration state.",
"carpet.rule.commandBlockTickling.desc": "Controls who can use the `/blocktickling` command, which lets you send manual block and/or shape updates to blocks using a feather item. Updates are sent from the block in front of the face you're clicking on. Useful if you're working with budded blocks, with /carpet interactionUpdates off, or with intricarpet's /interaction command.",
"carpet.rule.disableEndermanGriefing.desc": "Disables enderman griefing.",
- "carpet.rule.disableElytraRockets.desc": "Disables using rockets with elytra."
+ "carpet.rule.disableElytraRockets.desc": "Disables using rockets with elytra.",
+ "carpet.rule.verticalRocketsFromStandstill.desc": "Makes rocket flying only activate while standing on the ground, and makes it only propel you upwards. Disables using rockets while already flying.\nOnly works in singleplayer, or with JoaCarpet installed both serverside and clientside.",
+ "carpet.rule.verticalRocketPower.desc": "The vertical acceleration power used with the `verticalRocketsFromStandstill` rule."
}
\ No newline at end of file
diff --git a/src/main/resources/joacarpet.mixins.json b/src/main/resources/joacarpet.mixins.json
index b63b2df..b60941a 100644
--- a/src/main/resources/joacarpet.mixins.json
+++ b/src/main/resources/joacarpet.mixins.json
@@ -12,7 +12,9 @@
"insaneBehaviors.PistonBaseBlockMixin",
"insaneBehaviors.ProjectileMixin",
"miscSurvival.DisableEndermanGriefingMixin",
- "miscSurvival.DisableElytraRocketsMixin"
+ "miscSurvival.DisableElytraRocketsMixin",
+ "miscSurvival.VerticalRocketsFromStandstillMixin1",
+ "miscSurvival.VerticalRocketsFromStandstillMixin2"
],
"client": [
],
diff --git a/versions/1.17.1/gradle.properties b/versions/1.17.1/gradle.properties
index fc47970..9de411c 100644
--- a/versions/1.17.1/gradle.properties
+++ b/versions/1.17.1/gradle.properties
@@ -3,6 +3,9 @@
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.65
+# Jar build filename version
+ minecraft_display_version=1.17.x
+
# Fabric Mod Metadata
minecraft_dependency=1.17.x
diff --git a/versions/1.18.2/gradle.properties b/versions/1.18.2/gradle.properties
index 1c07adf..1fba64f 100644
--- a/versions/1.18.2/gradle.properties
+++ b/versions/1.18.2/gradle.properties
@@ -3,6 +3,9 @@
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.4
+# Jar build filename version
+ minecraft_display_version=1.18.x
+
# Fabric Mod Metadata
minecraft_dependency=1.18.x
diff --git a/versions/1.19.4/gradle.properties b/versions/1.19.4/gradle.properties
index 2641801..5855a69 100644
--- a/versions/1.19.4/gradle.properties
+++ b/versions/1.19.4/gradle.properties
@@ -3,6 +3,9 @@
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.2
+# Jar build filename version
+ minecraft_display_version=1.19.x
+
# Fabric Mod Metadata
minecraft_dependency=1.19.x
diff --git a/versions/1.20.2/gradle.properties b/versions/1.20.2/gradle.properties
index 7937e3a..19aac30 100644
--- a/versions/1.20.2/gradle.properties
+++ b/versions/1.20.2/gradle.properties
@@ -3,6 +3,9 @@
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.4
+# Jar build filename version
+ minecraft_display_version=1.20.x
+
# Fabric Mod Metadata
minecraft_dependency=1.20.x