Scorpion, bed bug, creeping horror overhaul. Pill bug assets.
Big Bertha mode switching bug. Gravity gun keybind bug
No files matched your search
@@ -90,7 +90,7 @@ public final class AntTeleportHelper {
|
||||
return destination;
|
||||
}
|
||||
|
||||
// If the player's respawn is not in the overworld, return them to overworld spawn instead.
|
||||
// If the player's respawn is not in the overworld, return them to overworld spawn instead
|
||||
return player.server.overworld();
|
||||
}
|
||||
|
||||
|
||||
@@ -335,6 +335,15 @@ public class BigBerthaItem extends SwordItem implements GeoItem {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean tryCycleModeWhileCoolingDown(Level level, Player player, ItemStack stack) {
|
||||
if (player.getMainHandItem() != stack || !player.isShiftKeyDown() || !player.getCooldowns().isOnCooldown(this)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
cycleMode(level, player, stack);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void startMolevoreSpin(Level level, Player player, ItemStack stack) {
|
||||
Vec3 direction = player.getLookAngle().multiply(1.0D, 0.0D, 1.0D);
|
||||
if (direction.lengthSqr() < 1.0E-4D) {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.craisinlord.antarchy.content.network;
|
||||
|
||||
import com.craisinlord.antarchy.Antarchy;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.network.codec.StreamCodec;
|
||||
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public record BigBerthaModeCyclePayload() implements CustomPacketPayload {
|
||||
public static final Type<BigBerthaModeCyclePayload> TYPE = new Type<>(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "big_bertha_mode_cycle"));
|
||||
public static final StreamCodec<ByteBuf, BigBerthaModeCyclePayload> STREAM_CODEC = StreamCodec.unit(new BigBerthaModeCyclePayload());
|
||||
|
||||
@Override
|
||||
public Type<BigBerthaModeCyclePayload> type() {
|
||||
return TYPE;
|
||||
}
|
||||
}
|
||||
@@ -103,22 +103,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"rightEye": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [-25, 25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"4.5": {
|
||||
"post": {
|
||||
"vector": [-25, 25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"rightGrip": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
@@ -349,22 +333,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"leftEye": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [-25, -25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"4.5": {
|
||||
"post": {
|
||||
"vector": [-25, -25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"leftGrip": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
@@ -705,16 +673,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"rightEye": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [-25, 25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"rightGrip": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
@@ -1271,16 +1229,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"leftEye": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [-25, -25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"leftGrip": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
@@ -1728,28 +1676,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"rightEye": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [-25, 25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"2.0": {
|
||||
"post": {
|
||||
"vector": [-25, 25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"2.5": {
|
||||
"post": {
|
||||
"vector": [-25, 25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"rightGrip": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
@@ -2292,28 +2218,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"leftEye": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [-25, -25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"2.0": {
|
||||
"post": {
|
||||
"vector": [-25, -25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"2.5": {
|
||||
"post": {
|
||||
"vector": [-25, -25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"leftGrip": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
@@ -2615,22 +2519,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"rightEye": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [-25, 25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"1.0": {
|
||||
"post": {
|
||||
"vector": [-25, 25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"rightGrip": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
@@ -2873,22 +2761,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"leftEye": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [-25, -25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"1.0": {
|
||||
"post": {
|
||||
"vector": [-25, -25, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"leftGrip": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
|
||||
@@ -137,28 +137,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"l_claw": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [0, -12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"2.0": {
|
||||
"post": {
|
||||
"vector": [17.5, -12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"4.0": {
|
||||
"post": {
|
||||
"vector": [0, -12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"r_leg": {
|
||||
"rotation": {
|
||||
"vector": [0, -22.5, 0]
|
||||
@@ -178,6 +156,28 @@
|
||||
"rotation": {
|
||||
"vector": [0, -22.5, 0]
|
||||
}
|
||||
},
|
||||
"l_claw": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [0, 12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"2.0": {
|
||||
"post": {
|
||||
"vector": [17.5, 12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"4.0": {
|
||||
"post": {
|
||||
"vector": [0, 12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -311,34 +311,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"l_claw": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [0, -12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.1667": {
|
||||
"post": {
|
||||
"vector": [-15, -17.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.3333": {
|
||||
"post": {
|
||||
"vector": [0, -22.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.5": {
|
||||
"post": {
|
||||
"vector": [0, -12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"r_leg": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
@@ -568,6 +540,34 @@
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"l_claw": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [0, 12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.1667": {
|
||||
"post": {
|
||||
"vector": [-15, 17.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.3333": {
|
||||
"post": {
|
||||
"vector": [0, 22.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.5": {
|
||||
"post": {
|
||||
"vector": [0, 12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -766,40 +766,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"l_claw": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [0, -12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.1667": {
|
||||
"post": {
|
||||
"vector": [0, -82.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.5": {
|
||||
"post": {
|
||||
"vector": [0, -82.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.6667": {
|
||||
"post": {
|
||||
"vector": [0, 27.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"1.0": {
|
||||
"post": {
|
||||
"vector": [0, -12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"r_leg": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
@@ -1031,6 +997,96 @@
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"r_claw_open": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.1667": {
|
||||
"post": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.3333": {
|
||||
"post": {
|
||||
"vector": [0, -67.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.75": {
|
||||
"post": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"l_claw": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [0, -12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.1667": {
|
||||
"post": {
|
||||
"vector": [0, -82.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.5": {
|
||||
"post": {
|
||||
"vector": [0, -82.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.6667": {
|
||||
"post": {
|
||||
"vector": [0, 27.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"1.0": {
|
||||
"post": {
|
||||
"vector": [0, -12.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
},
|
||||
"l_claw_open": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"post": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.1667": {
|
||||
"post": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.3333": {
|
||||
"post": {
|
||||
"vector": [0, 67.5, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.75": {
|
||||
"post": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
"parent": "neck",
|
||||
"pivot": [0, 4.5, -12],
|
||||
"cubes": [
|
||||
{"origin": [-3.5, 4.25, -16], "size": [7, 4, 4], "pivot": [-0.5, 4.5, -10], "rotation": [22.5, 0, 0], "uv": [0, 49]},
|
||||
{"origin": [-2.5, 4.25, -17], "size": [5, 2, 2], "pivot": [-0.5, 4.5, -10], "rotation": [22.5, 0, 0], "uv": [44, 37]}
|
||||
{"origin": [-3.5, 4.25, -17], "size": [7, 4, 5], "pivot": [-0.5, 4.5, -10], "rotation": [22.5, 0, 0], "uv": [0, 50]}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -64,8 +63,7 @@
|
||||
"parent": "head",
|
||||
"pivot": [-3, 3, -12],
|
||||
"cubes": [
|
||||
{"origin": [-4.5, 3.25, -19], "size": [3, 1, 7], "pivot": [-0.5, 4.5, -10], "rotation": [22.5, 0, 0], "uv": [22, 49]},
|
||||
{"origin": [-1.5, 3.25, -19], "size": [2, 1, 1], "pivot": [-0.5, 4.5, -10], "rotation": [22.5, 0, 0], "uv": [44, 41]}
|
||||
{"origin": [-4.5, 3.25, -19], "size": [3, 1, 7], "pivot": [-0.5, 4.5, -10], "rotation": [22.5, 0, 0], "uv": [25, 50]}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -73,8 +71,7 @@
|
||||
"parent": "head",
|
||||
"pivot": [3, 3, -12],
|
||||
"cubes": [
|
||||
{"origin": [1.5, 3.25, -19], "size": [3, 1, 7], "pivot": [0.5, 4.5, -10], "rotation": [22.5, 0, 0], "uv": [22, 49], "mirror": true},
|
||||
{"origin": [-0.5, 3.25, -19], "size": [2, 1, 1], "pivot": [0.5, 4.5, -10], "rotation": [22.5, 0, 0], "uv": [44, 41], "mirror": true}
|
||||
{"origin": [1.5, 3.25, -19], "size": [3, 1, 7], "pivot": [0.5, 4.5, -10], "rotation": [22.5, 0, 0], "uv": [25, 50], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -21,14 +21,11 @@
|
||||
"pivot": [0, 0, 0],
|
||||
"cubes": [
|
||||
{"origin": [-6, 0, -7], "size": [12, 12, 14], "uv": [0, 0]},
|
||||
{"origin": [-6, 0, -7], "size": [12, 12, 14], "inflate": 0.25, "uv": [0, 46]},
|
||||
{"origin": [-6, 0, -7], "size": [12, 12, 14], "inflate": 0.5, "uv": [52, 0]},
|
||||
{"origin": [-4, 2, -11], "size": [1, 2, 5], "pivot": [-3.5, 3, -7], "rotation": [24.14867, 20.70481, 9.00717], "uv": [0, 0]},
|
||||
{"origin": [3, 2, -11], "size": [1, 2, 5], "pivot": [3.5, 3, -7], "rotation": [24.14867, -20.70481, -9.00717], "uv": [0, 0], "mirror": true},
|
||||
{"origin": [-4, 8, -11], "size": [1, 2, 5], "pivot": [-3.5, 9, -7], "rotation": [-24.14867, 20.70481, -9.00717], "uv": [0, 0]},
|
||||
{"origin": [3, 8, -11], "size": [1, 2, 5], "pivot": [3.5, 9, -7], "rotation": [-24.14867, -20.70481, 9.00717], "uv": [0, 0], "mirror": true},
|
||||
{"origin": [-4, 2, -7], "size": [8, 8, 2], "uv": [104, 12]},
|
||||
{"origin": [-6, 9.85673, -2.40373], "size": [12, 0, 5], "pivot": [0, 6, -7], "rotation": [50, 0, 0], "uv": [100, 84]},
|
||||
{"origin": [-6, 10.24264, -0.75736], "size": [12, 0, 6], "pivot": [0, 6, -5], "rotation": [45, 0, 0], "uv": [100, 54]},
|
||||
{"origin": [-6, 11.19615, 1], "size": [12, 0, 7], "pivot": [0, 6, -2], "rotation": [30, 0, 0], "uv": [100, 43]},
|
||||
{"origin": [-6, 11.43785, 4.53571], "size": [12, 0, 8], "pivot": [0, 6, 2], "rotation": [25, 0, 0], "uv": [92, 35]},
|
||||
{"origin": [-6, 11.79555, 8.55291], "size": [12, 0, 9], "pivot": [0, 6, 7], "rotation": [15, 0, 0], "uv": [92, 26]},
|
||||
{"origin": [-6, 0, -7], "size": [12, 0, 5], "pivot": [0, 0, -7], "rotation": [30, 0, -180], "uv": [100, 84]},
|
||||
{"origin": [-6, 0, -5], "size": [12, 0, 6], "pivot": [0, 0, -5], "rotation": [25, 0, -180], "uv": [100, 54]},
|
||||
{"origin": [-6, 0, -2], "size": [12, 0, 7], "pivot": [0, 0, -2], "rotation": [15, 0, -180], "uv": [100, 43]},
|
||||
@@ -42,6 +39,18 @@
|
||||
{"origin": [0, 6, -2], "size": [12, 0, 7], "pivot": [6, 6, -2], "rotation": [20, 0, 90], "uv": [100, 43]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bone",
|
||||
"parent": "body",
|
||||
"pivot": [0, 6, -7],
|
||||
"cubes": [
|
||||
{"origin": [-6, 9.85673, -2.40373], "size": [12, 0, 5], "pivot": [0, 6, -7], "rotation": [50, 0, 0], "uv": [100, 84]},
|
||||
{"origin": [-6, 10.24264, -0.75736], "size": [12, 0, 6], "pivot": [0, 6, -5], "rotation": [45, 0, 0], "uv": [100, 54]},
|
||||
{"origin": [-6, 11.19615, 1], "size": [12, 0, 7], "pivot": [0, 6, -2], "rotation": [30, 0, 0], "uv": [100, 43]},
|
||||
{"origin": [-6, 11.43785, 4.53571], "size": [12, 0, 8], "pivot": [0, 6, 2], "rotation": [25, 0, 0], "uv": [92, 35]},
|
||||
{"origin": [-6, 11.79555, 8.55291], "size": [12, 0, 9], "pivot": [0, 6, 7], "rotation": [15, 0, 0], "uv": [92, 26]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rightjaw",
|
||||
"parent": "body",
|
||||
@@ -63,9 +72,7 @@
|
||||
"parent": "body",
|
||||
"pivot": [0, 6, 7],
|
||||
"cubes": [
|
||||
{"origin": [-5, 1, 7], "size": [10, 10, 14], "uv": [52, 46]},
|
||||
{"origin": [-5, 1, 7], "size": [10, 10, 14], "inflate": 0.25, "uv": [52, 70]},
|
||||
{"origin": [-5, 1, 7], "size": [10, 10, 14], "inflate": 0.5, "uv": [0, 72]}
|
||||
{"origin": [-5, 1, 7], "size": [10, 10, 14], "uv": [52, 46]}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -73,9 +80,7 @@
|
||||
"parent": "tailbase",
|
||||
"pivot": [0, 6, 21],
|
||||
"cubes": [
|
||||
{"origin": [-3.5, 2.5, 21], "size": [7, 7, 14], "uv": [48, 94]},
|
||||
{"origin": [-3.5, 2.5, 21], "size": [7, 7, 14], "inflate": 0.25, "uv": [90, 94]},
|
||||
{"origin": [-3.5, 2.5, 21], "size": [7, 7, 14], "inflate": 0.5, "uv": [0, 96]}
|
||||
{"origin": [-3.5, 2.5, 21], "size": [7, 7, 14], "uv": [48, 94]}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -92,9 +97,7 @@
|
||||
"parent": "root",
|
||||
"pivot": [-6, 8, -3],
|
||||
"cubes": [
|
||||
{"origin": [-18, 6, -6], "size": [12, 4, 4], "uv": [100, 60]},
|
||||
{"origin": [-18, 6, -6], "size": [12, 4, 4], "inflate": 0.25, "uv": [100, 68]},
|
||||
{"origin": [-18, 6, -6], "size": [12, 4, 4], "inflate": 0.5, "uv": [100, 76]}
|
||||
{"origin": [-18, 6, -6], "size": [12, 4, 4], "uv": [100, 60]}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -118,9 +121,7 @@
|
||||
"parent": "root",
|
||||
"pivot": [-6, 8, 4],
|
||||
"cubes": [
|
||||
{"origin": [-18, 6, 3], "size": [12, 4, 4], "uv": [100, 60]},
|
||||
{"origin": [-18, 6, 3], "size": [12, 4, 4], "inflate": 0.25, "uv": [100, 68]},
|
||||
{"origin": [-18, 6, 3], "size": [12, 4, 4], "inflate": 0.5, "uv": [100, 76]}
|
||||
{"origin": [-18, 6, 3], "size": [12, 4, 4], "uv": [100, 60]}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -144,9 +145,7 @@
|
||||
"parent": "root",
|
||||
"pivot": [6, 8, -3],
|
||||
"cubes": [
|
||||
{"origin": [6, 6, -6], "size": [12, 4, 4], "uv": [100, 60], "mirror": true},
|
||||
{"origin": [6, 6, -6], "size": [12, 4, 4], "inflate": 0.25, "uv": [100, 68], "mirror": true},
|
||||
{"origin": [6, 6, -6], "size": [12, 4, 4], "inflate": 0.5, "uv": [100, 76], "mirror": true}
|
||||
{"origin": [6, 6, -6], "size": [12, 4, 4], "uv": [100, 60], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -170,9 +169,7 @@
|
||||
"parent": "root",
|
||||
"pivot": [6, 8, 4],
|
||||
"cubes": [
|
||||
{"origin": [6, 6, 3], "size": [12, 4, 4], "uv": [100, 60], "mirror": true},
|
||||
{"origin": [6, 6, 3], "size": [12, 4, 4], "inflate": 0.25, "uv": [100, 68], "mirror": true},
|
||||
{"origin": [6, 6, 3], "size": [12, 4, 4], "inflate": 0.5, "uv": [100, 76], "mirror": true}
|
||||
{"origin": [6, 6, 3], "size": [12, 4, 4], "uv": [100, 60], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -24,33 +24,30 @@
|
||||
{"origin": [-12, 97, -46], "size": [24, 12, 80], "uv": [0, 0]},
|
||||
{"origin": [-10, 81, 18], "size": [20, 16, 16], "uv": [224, 152]},
|
||||
{"origin": [-8, 97, -78], "size": [16, 12, 32], "uv": [176, 92]},
|
||||
{"origin": [-10, 109, -58], "size": [20, 4, 12], "uv": [224, 184]},
|
||||
{"origin": [-4, 89, -78], "size": [8, 8, 4], "uv": [176, 152]},
|
||||
{"origin": [-2.5, 85, -78], "size": [5, 12, 8], "uv": [129, 0]},
|
||||
{"origin": [0, 73, -78], "size": [0, 18, 15], "uv": [200, -15]},
|
||||
{"origin": [0, 91, -78], "size": [0, 6, 60], "uv": [268, -60]},
|
||||
{"origin": [0, 65, -74], "size": [0, 6, 56], "uv": [268, -50]},
|
||||
{"origin": [-18, 67, -16], "size": [8, 24, 32], "uv": [208, 0]},
|
||||
{"origin": [10, 67, -16], "size": [8, 24, 32], "uv": [112, 212]},
|
||||
{"origin": [-10, 89, -26], "size": [20, 8, 8], "uv": [192, 252]},
|
||||
{"origin": [-2, 79, -34], "size": [4, 4, 16], "uv": [228, 268]},
|
||||
{"origin": [-10, 65, -26], "size": [20, 8, 8], "uv": [248, 252]},
|
||||
{"origin": [-6, 65, -40], "size": [12, 6, 14], "uv": [64, 268]},
|
||||
{"origin": [10, 67, -16], "size": [8, 24, 32], "uv": [208, 0], "mirror": true},
|
||||
{"origin": [-12, 57, -42], "size": [24, 8, 64], "uv": [0, 92]},
|
||||
{"origin": [-8, 57, -74], "size": [16, 8, 32], "uv": [192, 212]},
|
||||
{"origin": [-4, 65, -74], "size": [8, 8, 4], "uv": [200, 152]}
|
||||
{"origin": [-8, 57, -74], "size": [16, 8, 32], "uv": [192, 212]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rightEye",
|
||||
"name": "right_eye",
|
||||
"parent": "body",
|
||||
"pivot": [-10, 82, -18],
|
||||
"pivot": [-18.32132, 90.25, -12.53553],
|
||||
"cubes": [
|
||||
{"origin": [-14, 78, -22], "size": [8, 8, 8], "uv": [0, 272]}
|
||||
{"origin": [-22.7, 83.25, -17], "size": [5, 14, 14], "pivot": [-16.2, 90.25, -9], "rotation": [0, -45, 0], "uv": [0, 0]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leftEye",
|
||||
"name": "left_eye",
|
||||
"parent": "body",
|
||||
"pivot": [10, 82, -18],
|
||||
"pivot": [18.32132, 90.25, -12.53553],
|
||||
"cubes": [
|
||||
{"origin": [6, 78, -22], "size": [8, 8, 8], "uv": [0, 272], "mirror": true}
|
||||
{"origin": [17.7, 83.25, -17], "size": [5, 14, 14], "pivot": [16.2, 90.25, -9], "rotation": [0, 45, 0], "uv": [0, 0], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -88,51 +85,51 @@
|
||||
{
|
||||
"name": "rightArm",
|
||||
"parent": "body",
|
||||
"pivot": [-12, 93, -22],
|
||||
"pivot": [-12, 93, -17],
|
||||
"cubes": [
|
||||
{"origin": [-14, 91, -40], "size": [4, 4, 20], "uv": [64, 232]}
|
||||
{"origin": [-14, 91, -35], "size": [4, 4, 20], "uv": [64, 232]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rightElbow",
|
||||
"parent": "rightArm",
|
||||
"pivot": [-12, 95, -34],
|
||||
"pivot": [-12, 95, -29],
|
||||
"cubes": [
|
||||
{"origin": [-15, 91, -40], "size": [6, 32, 6], "uv": [204, 268]}
|
||||
{"origin": [-15, 91, -35], "size": [6, 32, 6], "uv": [204, 268]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rightClaw",
|
||||
"parent": "rightElbow",
|
||||
"pivot": [-12, 123, -40],
|
||||
"pivot": [-12, 123, -35],
|
||||
"cubes": [
|
||||
{"origin": [-14, 115, -56], "size": [4, 8, 16], "uv": [164, 268]},
|
||||
{"origin": [-12, 115, -88], "size": [0, 8, 32], "uv": [0, 232]}
|
||||
{"origin": [-14, 115, -51], "size": [4, 8, 16], "uv": [164, 268]},
|
||||
{"origin": [-12, 115, -83], "size": [0, 8, 32], "uv": [0, 232]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leftArm",
|
||||
"parent": "body",
|
||||
"pivot": [12, 93, -22],
|
||||
"pivot": [12, 93, -17],
|
||||
"cubes": [
|
||||
{"origin": [10, 91, -40], "size": [4, 4, 20], "uv": [64, 232], "mirror": true}
|
||||
{"origin": [10, 91, -35], "size": [4, 4, 20], "uv": [64, 232], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leftElbow",
|
||||
"parent": "leftArm",
|
||||
"pivot": [12, 95, -34],
|
||||
"pivot": [12, 95, -29],
|
||||
"cubes": [
|
||||
{"origin": [9, 91, -40], "size": [6, 32, 6], "uv": [204, 268], "mirror": true}
|
||||
{"origin": [9, 91, -35], "size": [6, 32, 6], "uv": [204, 268], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leftClaw",
|
||||
"parent": "leftElbow",
|
||||
"pivot": [12, 123, -40],
|
||||
"pivot": [12, 123, -35],
|
||||
"cubes": [
|
||||
{"origin": [10, 115, -56], "size": [4, 8, 16], "uv": [164, 268], "mirror": true},
|
||||
{"origin": [12, 115, -88], "size": [0, 8, 32], "uv": [0, 232], "mirror": true}
|
||||
{"origin": [10, 115, -51], "size": [4, 8, 16], "uv": [164, 268], "mirror": true},
|
||||
{"origin": [12, 115, -83], "size": [0, 8, 32], "uv": [0, 232], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -221,7 +218,7 @@
|
||||
"pivot": [28, 65, -14],
|
||||
"rotation": [0, 0, 90],
|
||||
"cubes": [
|
||||
{"origin": [28, 55, -19], "size": [32, 11, 10], "inflate": 0.025, "uv": [208, 56], "mirror": true}
|
||||
{"origin": [28, 56, -19], "size": [32, 11, 10], "inflate": 0.025, "uv": [208, 56], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"format_version": "1.12.0",
|
||||
"minecraft:geometry": [
|
||||
{
|
||||
"description": {
|
||||
"identifier": "geometry.unknown",
|
||||
"texture_width": 64,
|
||||
"texture_height": 128,
|
||||
"visible_bounds_width": 3,
|
||||
"visible_bounds_height": 3.5,
|
||||
"visible_bounds_offset": [0, 1.25, 0]
|
||||
},
|
||||
"bones": [
|
||||
{
|
||||
"name": "pill_bug",
|
||||
"pivot": [0, 11.875, 0.01563]
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"parent": "pill_bug",
|
||||
"pivot": [0, 2.25, -0.46875]
|
||||
},
|
||||
{
|
||||
"name": "right_leg",
|
||||
"parent": "body",
|
||||
"pivot": [-6, 2, -4.5],
|
||||
"cubes": [
|
||||
{"origin": [-9, 0, -6], "size": [3, 2, 3], "uv": [0, 7]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "left_leg",
|
||||
"parent": "body",
|
||||
"pivot": [6, 2, -4.5],
|
||||
"cubes": [
|
||||
{"origin": [6, 0, -6], "size": [3, 2, 3], "uv": [0, 7], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "right_leg2",
|
||||
"parent": "body",
|
||||
"pivot": [-6, 2, 1.5],
|
||||
"cubes": [
|
||||
{"origin": [-9, 0, 0], "size": [3, 2, 3], "uv": [0, 7]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "left_leg2",
|
||||
"parent": "body",
|
||||
"pivot": [6, 2, 1.5],
|
||||
"cubes": [
|
||||
{"origin": [6, 0, 0], "size": [3, 2, 3], "uv": [0, 7], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "right_leg3",
|
||||
"parent": "body",
|
||||
"pivot": [-6, 2, 6.5],
|
||||
"cubes": [
|
||||
{"origin": [-9, 0, 5], "size": [3, 2, 3], "uv": [0, 7]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "left_leg3",
|
||||
"parent": "body",
|
||||
"pivot": [6, 2, 6.5],
|
||||
"cubes": [
|
||||
{"origin": [6, 0, 5], "size": [3, 2, 3], "uv": [0, 7], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "torso",
|
||||
"parent": "body",
|
||||
"pivot": [0, 2, -1.75],
|
||||
"cubes": [
|
||||
{"origin": [-6, 2, -9], "size": [12, 6, 19], "uv": [0, 0]},
|
||||
{"origin": [-6, 2, -9], "size": [12, 6, 19], "inflate": 0.1, "uv": [0, 55]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "head",
|
||||
"parent": "torso",
|
||||
"pivot": [0, 4, -9],
|
||||
"cubes": [
|
||||
{"origin": [-3, 2, -11], "size": [6, 4, 2], "uv": [0, 0]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "right_antenna",
|
||||
"parent": "head",
|
||||
"pivot": [-1.5, 4, -10],
|
||||
"cubes": [
|
||||
{"origin": [-7, 4, -23], "size": [6, 0, 13], "uv": [-13, 25]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "left_antenna",
|
||||
"parent": "head",
|
||||
"pivot": [1.5, 4, -10],
|
||||
"cubes": [
|
||||
{"origin": [1, 4, -23], "size": [6, 0, 13], "uv": [-13, 25], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "wheel",
|
||||
"parent": "pill_bug",
|
||||
"pivot": [0, 21.5, 0.5],
|
||||
"cubes": [
|
||||
{"origin": [-6, 14, -7], "size": [12, 15, 15], "inflate": 0.1, "uv": [4, 80]},
|
||||
{"origin": [-6, 14, -7], "size": [12, 15, 15], "uv": [10, 25]}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -74,7 +74,7 @@
|
||||
"parent": "scorpion",
|
||||
"pivot": [0, 0, 4.5],
|
||||
"cubes": [
|
||||
{"origin": [-7, 0, -2], "size": [14, 6, 13], "uv": [0, 0]}
|
||||
{"origin": [-7, 0, -2], "size": [14, 6, 13], "inflate": 0.05, "uv": [0, 0]}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -107,7 +107,9 @@
|
||||
"parent": "torso",
|
||||
"pivot": [0, 3, -1],
|
||||
"cubes": [
|
||||
{"origin": [-7, 0, -11], "size": [14, 6, 10], "inflate": 0.1, "uv": [0, 19]}
|
||||
{"origin": [-7, 0, -11], "size": [14, 6, 10], "inflate": 0.1, "uv": [0, 19]},
|
||||
{"origin": [-3, -3, -14], "size": [0, 8, 4], "uv": [0, 17]},
|
||||
{"origin": [3, -3, -14], "size": [0, 8, 4], "uv": [0, 17], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -115,7 +117,16 @@
|
||||
"parent": "head",
|
||||
"pivot": [-7, 5, -4.75],
|
||||
"cubes": [
|
||||
{"origin": [-16, 3, -20], "size": [9, 4, 17], "inflate": 0.1, "uv": [54, 0]}
|
||||
{"origin": [-11, 3, -11], "size": [4, 4, 8], "uv": [56, 31]},
|
||||
{"origin": [-16, 3, -20], "size": [5, 4, 17], "uv": [54, 0]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "r_claw_open",
|
||||
"parent": "r_claw",
|
||||
"pivot": [-11, 5, -11],
|
||||
"cubes": [
|
||||
{"origin": [-11, 3, -20], "size": [4, 4, 9], "inflate": -0.01, "uv": [41, 0]}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -123,7 +134,16 @@
|
||||
"parent": "head",
|
||||
"pivot": [7, 5, -4.75],
|
||||
"cubes": [
|
||||
{"origin": [7, 3, -20], "size": [9, 4, 17], "inflate": 0.1, "uv": [54, 0], "mirror": true}
|
||||
{"origin": [7, 3, -11], "size": [4, 4, 8], "uv": [56, 31], "mirror": true},
|
||||
{"origin": [11, 3, -20], "size": [5, 4, 17], "uv": [54, 0], "mirror": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "l_claw_open",
|
||||
"parent": "l_claw",
|
||||
"pivot": [11, 5, -11],
|
||||
"cubes": [
|
||||
{"origin": [7, 3, -20], "size": [4, 4, 9], "inflate": -0.01, "uv": [41, 0], "mirror": true}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -334,6 +334,7 @@ public final class AntarchyFabricClientBootstrap {
|
||||
HerculesBeetleClientHandler.tick();
|
||||
});
|
||||
|
||||
BigBerthaClientHandler.register();
|
||||
GravityGunClientHandler.register();
|
||||
|
||||
ElythiaFireflyManager.register();
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.craisinlord.antarchy.fabric.client;
|
||||
|
||||
import com.craisinlord.antarchy.content.item.BigBerthaItem;
|
||||
import com.craisinlord.antarchy.content.network.BigBerthaModeCyclePayload;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public final class BigBerthaClientHandler {
|
||||
private static boolean lastUseDown;
|
||||
|
||||
private BigBerthaClientHandler() {
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
ClientTickEvents.END_CLIENT_TICK.register(BigBerthaClientHandler::tick);
|
||||
}
|
||||
|
||||
private static void tick(Minecraft mc) {
|
||||
if (mc.player == null || mc.level == null || mc.screen != null) {
|
||||
lastUseDown = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(mc.player.getMainHandItem().getItem() instanceof BigBerthaItem)) {
|
||||
lastUseDown = false;
|
||||
return;
|
||||
}
|
||||
|
||||
boolean useDown = mc.options.keyUse.isDown();
|
||||
if (useDown
|
||||
&& !lastUseDown
|
||||
&& mc.player.isShiftKeyDown()
|
||||
&& mc.player.getCooldowns().isOnCooldown(mc.player.getMainHandItem().getItem())) {
|
||||
ClientPlayNetworking.send(new BigBerthaModeCyclePayload());
|
||||
}
|
||||
lastUseDown = useDown;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.util.Mth;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
public final class GravityGunClientHandler {
|
||||
private static final double SCROLL_STEP_DISTANCE = 0.75D;
|
||||
@@ -34,8 +33,7 @@ public final class GravityGunClientHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
long window = mc.getWindow().getWindow();
|
||||
boolean attackDown = org.lwjgl.glfw.GLFW.glfwGetMouseButton(window, GLFW.GLFW_MOUSE_BUTTON_LEFT) == GLFW.GLFW_PRESS;
|
||||
boolean attackDown = mc.options.keyAttack.isDown();
|
||||
if (attackDown && !lastAttackDown) {
|
||||
ClientPlayNetworking.send(new GravityGunPrimaryPayload());
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ public final class AntarchyFabricNetworking {
|
||||
|
||||
PayloadTypeRegistry.playC2S().register(GravityGunPrimaryPayload.TYPE, GravityGunPrimaryPayload.STREAM_CODEC);
|
||||
PayloadTypeRegistry.playC2S().register(GravityGunScrollPayload.TYPE, GravityGunScrollPayload.STREAM_CODEC);
|
||||
PayloadTypeRegistry.playC2S().register(BigBerthaModeCyclePayload.TYPE, BigBerthaModeCyclePayload.STREAM_CODEC);
|
||||
PayloadTypeRegistry.playC2S().register(DiamondMinecartInputPayload.TYPE, DiamondMinecartInputPayload.STREAM_CODEC);
|
||||
PayloadTypeRegistry.playC2S().register(BrutalflyElytraFlapPayload.TYPE, BrutalflyElytraFlapPayload.STREAM_CODEC);
|
||||
PayloadTypeRegistry.playC2S().register(JumpyBootsLaunchPayload.TYPE, JumpyBootsLaunchPayload.STREAM_CODEC);
|
||||
@@ -71,6 +72,8 @@ public final class AntarchyFabricNetworking {
|
||||
context.server().execute(() -> handleGravityGunPrimary(context.player(), payload)));
|
||||
ServerPlayNetworking.registerGlobalReceiver(GravityGunScrollPayload.TYPE, (payload, context) ->
|
||||
context.server().execute(() -> handleGravityGunScroll(context.player(), payload)));
|
||||
ServerPlayNetworking.registerGlobalReceiver(BigBerthaModeCyclePayload.TYPE, (payload, context) ->
|
||||
context.server().execute(() -> handleBigBerthaModeCycle(context.player(), payload)));
|
||||
ServerPlayNetworking.registerGlobalReceiver(DiamondMinecartInputPayload.TYPE, (payload, context) ->
|
||||
context.server().execute(() -> handleDiamondMinecartInput(context.player(), payload)));
|
||||
ServerPlayNetworking.registerGlobalReceiver(BrutalflyElytraFlapPayload.TYPE, (payload, context) ->
|
||||
@@ -190,6 +193,13 @@ public final class AntarchyFabricNetworking {
|
||||
GravityGunItem.adjustHeldDistance(player.getMainHandItem(), payload.distanceDelta());
|
||||
}
|
||||
|
||||
private static void handleBigBerthaModeCycle(ServerPlayer player, BigBerthaModeCyclePayload payload) {
|
||||
if (!(player.getMainHandItem().getItem() instanceof BigBerthaItem bigBerthaItem)) {
|
||||
return;
|
||||
}
|
||||
bigBerthaItem.tryCycleModeWhileCoolingDown(player.serverLevel(), player, player.getMainHandItem());
|
||||
}
|
||||
|
||||
private static void handleDiamondMinecartInput(ServerPlayer player, DiamondMinecartInputPayload payload) {
|
||||
if (player.getVehicle() instanceof DiamondMinecartEntity cart) {
|
||||
cart.onInputReceived(payload.inputFlags());
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.craisinlord.antarchy.neoforge.client;
|
||||
|
||||
import com.craisinlord.antarchy.Antarchy;
|
||||
import com.craisinlord.antarchy.content.item.BigBerthaItem;
|
||||
import com.craisinlord.antarchy.content.network.BigBerthaModeCyclePayload;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
import net.neoforged.neoforge.client.event.ClientTickEvent;
|
||||
import net.neoforged.neoforge.network.PacketDistributor;
|
||||
|
||||
@EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
|
||||
public final class BigBerthaClientHandler {
|
||||
private static boolean lastUseDown;
|
||||
|
||||
private BigBerthaClientHandler() {
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onClientTick(ClientTickEvent.Post event) {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
if (mc.player == null || mc.level == null || mc.screen != null) {
|
||||
lastUseDown = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(mc.player.getMainHandItem().getItem() instanceof BigBerthaItem)) {
|
||||
lastUseDown = false;
|
||||
return;
|
||||
}
|
||||
|
||||
boolean useDown = mc.options.keyUse.isDown();
|
||||
if (useDown
|
||||
&& !lastUseDown
|
||||
&& mc.player.isShiftKeyDown()
|
||||
&& mc.player.getCooldowns().isOnCooldown(mc.player.getMainHandItem().getItem())) {
|
||||
PacketDistributor.sendToServer(new BigBerthaModeCyclePayload());
|
||||
}
|
||||
lastUseDown = useDown;
|
||||
}
|
||||
}
|
||||
@@ -8,37 +8,39 @@ import com.craisinlord.antarchy.content.network.GravityGunScrollPayload;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.util.Mth;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
import net.neoforged.neoforge.client.event.ClientTickEvent;
|
||||
import net.neoforged.neoforge.client.event.InputEvent;
|
||||
import net.neoforged.neoforge.network.PacketDistributor;
|
||||
|
||||
@EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
|
||||
public final class GravityGunClientHandler {
|
||||
private static final double SCROLL_STEP_DISTANCE = 0.75D;
|
||||
private static boolean lastAttackDown;
|
||||
|
||||
private GravityGunClientHandler() {
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onMouseButton(InputEvent.MouseButton.Pre event) {
|
||||
public static void onClientTick(ClientTickEvent.Post event) {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
if (mc.player == null || mc.level == null || mc.screen != null || !AntarchySettings.gravityGunEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getButton() != GLFW.GLFW_MOUSE_BUTTON_LEFT || event.getAction() != GLFW.GLFW_PRESS) {
|
||||
lastAttackDown = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(mc.player.getMainHandItem().getItem() instanceof GravityGunItem)) {
|
||||
lastAttackDown = false;
|
||||
return;
|
||||
}
|
||||
|
||||
PacketDistributor.sendToServer(new GravityGunPrimaryPayload());
|
||||
event.setCanceled(true);
|
||||
boolean attackDown = mc.options.keyAttack.isDown();
|
||||
if (attackDown && !lastAttackDown) {
|
||||
PacketDistributor.sendToServer(new GravityGunPrimaryPayload());
|
||||
}
|
||||
lastAttackDown = attackDown;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -2,7 +2,9 @@ package com.craisinlord.antarchy.neoforge.network;
|
||||
|
||||
import com.craisinlord.antarchy.content.entity.DiamondMinecartEntity;
|
||||
import com.craisinlord.antarchy.content.gravity.AntarchyGravityApi;
|
||||
import com.craisinlord.antarchy.content.item.BigBerthaItem;
|
||||
import com.craisinlord.antarchy.content.item.GravityGunItem;
|
||||
import com.craisinlord.antarchy.content.network.BigBerthaModeCyclePayload;
|
||||
import com.craisinlord.antarchy.content.network.GravityGunPrimaryPayload;
|
||||
import com.craisinlord.antarchy.content.network.GravityGunScrollPayload;
|
||||
import com.craisinlord.antarchy.content.network.GravityStatePayload;
|
||||
@@ -29,6 +31,10 @@ public final class AntarchyGravityNetworking {
|
||||
GravityGunScrollPayload.TYPE,
|
||||
GravityGunScrollPayload.STREAM_CODEC,
|
||||
AntarchyGravityNetworking::handleGravityGunScroll
|
||||
).playToServer(
|
||||
BigBerthaModeCyclePayload.TYPE,
|
||||
BigBerthaModeCyclePayload.STREAM_CODEC,
|
||||
AntarchyGravityNetworking::handleBigBerthaModeCycle
|
||||
).playToServer(
|
||||
com.craisinlord.antarchy.content.network.DiamondMinecartInputPayload.TYPE,
|
||||
com.craisinlord.antarchy.content.network.DiamondMinecartInputPayload.STREAM_CODEC,
|
||||
@@ -105,6 +111,20 @@ public final class AntarchyGravityNetworking {
|
||||
});
|
||||
}
|
||||
|
||||
private static void handleBigBerthaModeCycle(BigBerthaModeCyclePayload payload, IPayloadContext context) {
|
||||
context.enqueueWork(() -> {
|
||||
if (!(context.player() instanceof ServerPlayer serverPlayer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(serverPlayer.getMainHandItem().getItem() instanceof BigBerthaItem bigBerthaItem)) {
|
||||
return;
|
||||
}
|
||||
|
||||
bigBerthaItem.tryCycleModeWhileCoolingDown(serverPlayer.serverLevel(), serverPlayer, serverPlayer.getMainHandItem());
|
||||
});
|
||||
}
|
||||
|
||||
private static void handleGravityGunPrimary(GravityGunPrimaryPayload payload, IPayloadContext context) {
|
||||
context.enqueueWork(() -> {
|
||||
if (!(context.player() instanceof ServerPlayer serverPlayer)) {
|
||||
|
||||