added back rolly polly, fixed various issues, antiwater sponge behavior, expiremental settings disabled natively, farbic keybind conflict fix natively
This commit is contained in:
1 parent
cc5ab10de7
commit
e4b7b76cff
79 files changed
+952
-328
No files matched your search
@@ -18,6 +18,8 @@ public final class AntarchySettings {
|
|||||||
private static boolean glowingTorchflowers = true;
|
private static boolean glowingTorchflowers = true;
|
||||||
private static boolean glowVinesUnderLeaves = true;
|
private static boolean glowVinesUnderLeaves = true;
|
||||||
private static boolean swingThroughGrassEnabled = true;
|
private static boolean swingThroughGrassEnabled = true;
|
||||||
|
private static boolean fabricKeybindingConflictFixEnabled = true;
|
||||||
|
private static boolean experimentalSettingsPopupDisabled = true;
|
||||||
private static boolean sizeChangingRaysEnabled = true;
|
private static boolean sizeChangingRaysEnabled = true;
|
||||||
private static double sizeRayMinScale = 0.1D;
|
private static double sizeRayMinScale = 0.1D;
|
||||||
private static double sizeRayMaxScale = 10.0D;
|
private static double sizeRayMaxScale = 10.0D;
|
||||||
@@ -49,11 +51,11 @@ public final class AntarchySettings {
|
|||||||
private static double ultimateCrossbowAttackDamage = 8.0D;
|
private static double ultimateCrossbowAttackDamage = 8.0D;
|
||||||
private static double ultimateCrossbowChargeSpeedMultiplier = 0.25D;
|
private static double ultimateCrossbowChargeSpeedMultiplier = 0.25D;
|
||||||
private static double ultimateMaceDamageMultiplier = 1.5D;
|
private static double ultimateMaceDamageMultiplier = 1.5D;
|
||||||
private static double battleAxeAttackDamage = 44.0D;
|
private static double battleAxeAttackDamage = 46.0D;
|
||||||
private static double bigBerthaAttackDamage = 55.0D;
|
private static double bigBerthaAttackDamage = 55.0D;
|
||||||
private static double bigBerthaReachBonus = 3.0D;
|
private static double bigBerthaReachBonus = 3.0D;
|
||||||
private static double bigBerthaAttackSpeed = -3.0D;
|
private static double bigBerthaAttackSpeed = -3.0D;
|
||||||
private static double attitudeAdjusterBaseDamage = 40.0D;
|
private static double attitudeAdjusterBaseDamage = 47.0D;
|
||||||
private static boolean attitudeAdjusterBreaksBlocks = true;
|
private static boolean attitudeAdjusterBreaksBlocks = true;
|
||||||
private static double krakensGraspAttackDamage = 16.0D;
|
private static double krakensGraspAttackDamage = 16.0D;
|
||||||
private static double krakensGraspAttackSpeed = -2.9D;
|
private static double krakensGraspAttackSpeed = -2.9D;
|
||||||
@@ -119,11 +121,15 @@ public final class AntarchySettings {
|
|||||||
private static double alphaMantisFlyingSpeed = 0.77D;
|
private static double alphaMantisFlyingSpeed = 0.77D;
|
||||||
private static int alphaMantisSummonIntervalTicks = 300;
|
private static int alphaMantisSummonIntervalTicks = 300;
|
||||||
private static int alphaMantisMaxMinions = 4;
|
private static int alphaMantisMaxMinions = 4;
|
||||||
private static double rollyPollyHealth = 12.0D;
|
private static double rollyPollyHealth = 25.0D;
|
||||||
private static double rollyPollyMovementSpeed = 0.3D;
|
private static double rollyPollyMovementSpeed = 0.3D;
|
||||||
private static double rollyPollyRollSpeedMultiplier = 2.2D;
|
private static double rollyPollyRollSpeedMultiplier = 2.2D;
|
||||||
private static double rollyPollyTumbleDamage = 1.0D;
|
private static double rollyPollyTumbleDamage = 1.0D;
|
||||||
private static int rollyPollyTameChance = 3;
|
private static int rollyPollyTameChance = 3;
|
||||||
|
private static double rollyPollyBowlingDamage = 3.0D;
|
||||||
|
private static double rollyPollyBowlingKnockback = 0.8D;
|
||||||
|
private static double rollyPollyArmor = 2.0D;
|
||||||
|
private static double rollyPollyRolledArmorBonus = 16.0D;
|
||||||
private static double krakenProjectileDamageTakenMultiplier = 0.5D;
|
private static double krakenProjectileDamageTakenMultiplier = 0.5D;
|
||||||
private static boolean krakenSquidSpawnEnabled = true;
|
private static boolean krakenSquidSpawnEnabled = true;
|
||||||
private static boolean krakenMassSpawnEnabled = true;
|
private static boolean krakenMassSpawnEnabled = true;
|
||||||
@@ -168,6 +174,7 @@ public final class AntarchySettings {
|
|||||||
private static double dreamSandGravityMultiplier = 0.45D;
|
private static double dreamSandGravityMultiplier = 0.45D;
|
||||||
private static double dreamSandFallDamageMultiplier = 0.35D;
|
private static double dreamSandFallDamageMultiplier = 0.35D;
|
||||||
private static double dreamSandEffectDurationSeconds = 7.0D;
|
private static double dreamSandEffectDurationSeconds = 7.0D;
|
||||||
|
private static double dreamSandFallingBlockGravityMultiplier = 0.4D;
|
||||||
private static boolean ichorWitherEnabled = true;
|
private static boolean ichorWitherEnabled = true;
|
||||||
private static int nightmareHelmetArmorValue = 3;
|
private static int nightmareHelmetArmorValue = 3;
|
||||||
private static int nightmareChestplateArmorValue = 8;
|
private static int nightmareChestplateArmorValue = 8;
|
||||||
@@ -273,7 +280,7 @@ public final class AntarchySettings {
|
|||||||
private static double emperorScorpionMovementSpeed = 0.384D;
|
private static double emperorScorpionMovementSpeed = 0.384D;
|
||||||
private static double emperorScorpionArmor = 22.0D;
|
private static double emperorScorpionArmor = 22.0D;
|
||||||
private static double emperorScorpionKnockbackResistance = 0.8D;
|
private static double emperorScorpionKnockbackResistance = 0.8D;
|
||||||
private static double emperorScorpionFollowRange = 40.0D;
|
private static double emperorScorpionFollowRange = 80.0D;
|
||||||
private static int emperorScorpionXpReward = 25;
|
private static int emperorScorpionXpReward = 25;
|
||||||
private static int emperorScorpionClawAnimTicks = 23;
|
private static int emperorScorpionClawAnimTicks = 23;
|
||||||
private static int emperorScorpionClawHitTick = 12;
|
private static int emperorScorpionClawHitTick = 12;
|
||||||
@@ -284,7 +291,9 @@ public final class AntarchySettings {
|
|||||||
private static int emperorScorpionPoisonTicks = 300;
|
private static int emperorScorpionPoisonTicks = 300;
|
||||||
private static int emperorScorpionWeaknessTicks = 120;
|
private static int emperorScorpionWeaknessTicks = 120;
|
||||||
private static int emperorScorpionSummonIntervalTicks = 140;
|
private static int emperorScorpionSummonIntervalTicks = 140;
|
||||||
private static int emperorScorpionMaxSummonedScorpions = 8;
|
private static int emperorScorpionMaxSummonedScorpions = 4;
|
||||||
|
private static int emperorScorpionMaxNearbyScorpions = 3;
|
||||||
|
private static int emperorScorpionHardenCooldownTicks = 2400;
|
||||||
private static double scorpionHealth = 30.0D;
|
private static double scorpionHealth = 30.0D;
|
||||||
private static double scorpionAttackDamage = 5.0D;
|
private static double scorpionAttackDamage = 5.0D;
|
||||||
private static double scorpionMovementSpeed = 0.29D;
|
private static double scorpionMovementSpeed = 0.29D;
|
||||||
@@ -581,6 +590,14 @@ public final class AntarchySettings {
|
|||||||
return swingThroughGrassEnabled;
|
return swingThroughGrassEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean fabricKeybindingConflictFixEnabled() {
|
||||||
|
return fabricKeybindingConflictFixEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean experimentalSettingsPopupDisabled() {
|
||||||
|
return experimentalSettingsPopupDisabled;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean sizeChangingRaysEnabled() {
|
public static boolean sizeChangingRaysEnabled() {
|
||||||
return sizeChangingRaysEnabled;
|
return sizeChangingRaysEnabled;
|
||||||
}
|
}
|
||||||
@@ -904,6 +921,22 @@ public final class AntarchySettings {
|
|||||||
return rollyPollyTameChance;
|
return rollyPollyTameChance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static double rollyPollyBowlingDamage() {
|
||||||
|
return rollyPollyBowlingDamage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double rollyPollyBowlingKnockback() {
|
||||||
|
return rollyPollyBowlingKnockback;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double rollyPollyArmor() {
|
||||||
|
return rollyPollyArmor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double rollyPollyRolledArmorBonus() {
|
||||||
|
return rollyPollyRolledArmorBonus;
|
||||||
|
}
|
||||||
|
|
||||||
public static double waspHealth() {
|
public static double waspHealth() {
|
||||||
return waspHealth;
|
return waspHealth;
|
||||||
}
|
}
|
||||||
@@ -1111,6 +1144,14 @@ public final class AntarchySettings {
|
|||||||
swingThroughGrassEnabled = value;
|
swingThroughGrassEnabled = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setFabricKeybindingConflictFixEnabled(boolean value) {
|
||||||
|
fabricKeybindingConflictFixEnabled = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setExperimentalSettingsPopupDisabled(boolean value) {
|
||||||
|
experimentalSettingsPopupDisabled = value;
|
||||||
|
}
|
||||||
|
|
||||||
public static void setSizeChangingRaysEnabled(boolean value) {
|
public static void setSizeChangingRaysEnabled(boolean value) {
|
||||||
sizeChangingRaysEnabled = value;
|
sizeChangingRaysEnabled = value;
|
||||||
}
|
}
|
||||||
@@ -1438,6 +1479,22 @@ public final class AntarchySettings {
|
|||||||
rollyPollyTameChance = value;
|
rollyPollyTameChance = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setRollyPollyBowlingDamage(double value) {
|
||||||
|
rollyPollyBowlingDamage = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setRollyPollyBowlingKnockback(double value) {
|
||||||
|
rollyPollyBowlingKnockback = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setRollyPollyArmor(double value) {
|
||||||
|
rollyPollyArmor = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setRollyPollyRolledArmorBonus(double value) {
|
||||||
|
rollyPollyRolledArmorBonus = value;
|
||||||
|
}
|
||||||
|
|
||||||
public static void setKrakenProjectileDamageTakenMultiplier(double value) {
|
public static void setKrakenProjectileDamageTakenMultiplier(double value) {
|
||||||
krakenProjectileDamageTakenMultiplier = value;
|
krakenProjectileDamageTakenMultiplier = value;
|
||||||
}
|
}
|
||||||
@@ -1671,6 +1728,14 @@ public final class AntarchySettings {
|
|||||||
dreamSandEffectDurationSeconds = value;
|
dreamSandEffectDurationSeconds = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static double dreamSandFallingBlockGravityMultiplier() {
|
||||||
|
return dreamSandFallingBlockGravityMultiplier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setDreamSandFallingBlockGravityMultiplier(double value) {
|
||||||
|
dreamSandFallingBlockGravityMultiplier = value;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean ichorWitherEnabled() {
|
public static boolean ichorWitherEnabled() {
|
||||||
return ichorWitherEnabled;
|
return ichorWitherEnabled;
|
||||||
}
|
}
|
||||||
@@ -2075,6 +2140,12 @@ public final class AntarchySettings {
|
|||||||
public static int emperorScorpionMaxSummonedScorpions() { return emperorScorpionMaxSummonedScorpions; }
|
public static int emperorScorpionMaxSummonedScorpions() { return emperorScorpionMaxSummonedScorpions; }
|
||||||
public static void setEmperorScorpionMaxSummonedScorpions(int value) { emperorScorpionMaxSummonedScorpions = value; }
|
public static void setEmperorScorpionMaxSummonedScorpions(int value) { emperorScorpionMaxSummonedScorpions = value; }
|
||||||
|
|
||||||
|
public static int emperorScorpionMaxNearbyScorpions() { return emperorScorpionMaxNearbyScorpions; }
|
||||||
|
public static void setEmperorScorpionMaxNearbyScorpions(int value) { emperorScorpionMaxNearbyScorpions = value; }
|
||||||
|
|
||||||
|
public static int emperorScorpionHardenCooldownTicks() { return emperorScorpionHardenCooldownTicks; }
|
||||||
|
public static void setEmperorScorpionHardenCooldownTicks(int value) { emperorScorpionHardenCooldownTicks = value; }
|
||||||
|
|
||||||
public static double scorpionHealth() { return scorpionHealth; }
|
public static double scorpionHealth() { return scorpionHealth; }
|
||||||
public static void setScorpionHealth(double value) { scorpionHealth = value; }
|
public static void setScorpionHealth(double value) { scorpionHealth = value; }
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
public final class ConfigResetGuard {
|
public final class ConfigResetGuard {
|
||||||
public static final int RESET_GENERATION = 2;
|
public static final int RESET_GENERATION = 3;
|
||||||
private static final String MARKER_FILE_NAME = ".config_generation";
|
private static final String MARKER_FILE_NAME = ".config_generation";
|
||||||
|
|
||||||
private ConfigResetGuard() {
|
private ConfigResetGuard() {
|
||||||
|
|||||||
@@ -156,6 +156,9 @@ public final class AntarchySoundEvents {
|
|||||||
public static Supplier<SoundEvent> SPIT_BUG_HURT = (Supplier<SoundEvent>) UNBOUND;
|
public static Supplier<SoundEvent> SPIT_BUG_HURT = (Supplier<SoundEvent>) UNBOUND;
|
||||||
public static Supplier<SoundEvent> SPIT_BUG_SPIT = (Supplier<SoundEvent>) UNBOUND;
|
public static Supplier<SoundEvent> SPIT_BUG_SPIT = (Supplier<SoundEvent>) UNBOUND;
|
||||||
public static Supplier<SoundEvent> BRUTALFLY_SPIT = (Supplier<SoundEvent>) UNBOUND;
|
public static Supplier<SoundEvent> BRUTALFLY_SPIT = (Supplier<SoundEvent>) UNBOUND;
|
||||||
|
public static Supplier<SoundEvent> ROLLY_POLLY_WHEEL_MODE = (Supplier<SoundEvent>) UNBOUND;
|
||||||
|
public static Supplier<SoundEvent> ROLLY_POLLY_NORMAL_MODE = (Supplier<SoundEvent>) UNBOUND;
|
||||||
|
public static Supplier<SoundEvent> ROLLY_POLLY_ROLL = (Supplier<SoundEvent>) UNBOUND;
|
||||||
|
|
||||||
private AntarchySoundEvents() {
|
private AntarchySoundEvents() {
|
||||||
}
|
}
|
||||||
@@ -307,7 +310,10 @@ public final class AntarchySoundEvents {
|
|||||||
Supplier<SoundEvent> jumpyBugJump,
|
Supplier<SoundEvent> jumpyBugJump,
|
||||||
Supplier<SoundEvent> spitBugHurt,
|
Supplier<SoundEvent> spitBugHurt,
|
||||||
Supplier<SoundEvent> spitBugSpit,
|
Supplier<SoundEvent> spitBugSpit,
|
||||||
Supplier<SoundEvent> brutalflySpit
|
Supplier<SoundEvent> brutalflySpit,
|
||||||
|
Supplier<SoundEvent> rollyPollyWheelMode,
|
||||||
|
Supplier<SoundEvent> rollyPollyNormalMode,
|
||||||
|
Supplier<SoundEvent> rollyPollyRoll
|
||||||
) {
|
) {
|
||||||
SQUIDZOOKA_FIRE = squidzookaFire;
|
SQUIDZOOKA_FIRE = squidzookaFire;
|
||||||
SHRINK_RAY_SOUND = shrinkRaySound;
|
SHRINK_RAY_SOUND = shrinkRaySound;
|
||||||
@@ -456,5 +462,8 @@ public final class AntarchySoundEvents {
|
|||||||
SPIT_BUG_HURT = spitBugHurt;
|
SPIT_BUG_HURT = spitBugHurt;
|
||||||
SPIT_BUG_SPIT = spitBugSpit;
|
SPIT_BUG_SPIT = spitBugSpit;
|
||||||
BRUTALFLY_SPIT = brutalflySpit;
|
BRUTALFLY_SPIT = brutalflySpit;
|
||||||
|
ROLLY_POLLY_WHEEL_MODE = rollyPollyWheelMode;
|
||||||
|
ROLLY_POLLY_NORMAL_MODE = rollyPollyNormalMode;
|
||||||
|
ROLLY_POLLY_ROLL = rollyPollyRoll;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -114,6 +114,7 @@ public final class AntarchyTags {
|
|||||||
public static final class Fluids {
|
public static final class Fluids {
|
||||||
public static final TagKey<Fluid> LUMEN = TagKey.create(Registries.FLUID, id("lumen"));
|
public static final TagKey<Fluid> LUMEN = TagKey.create(Registries.FLUID, id("lumen"));
|
||||||
public static final TagKey<Fluid> GIANT_LILY_PAD_SUPPORTING_FLUIDS = TagKey.create(Registries.FLUID, id("giant_lily_pad_supporting_fluids"));
|
public static final TagKey<Fluid> GIANT_LILY_PAD_SUPPORTING_FLUIDS = TagKey.create(Registries.FLUID, id("giant_lily_pad_supporting_fluids"));
|
||||||
|
public static final TagKey<Fluid> ANTIWATER = TagKey.create(Registries.FLUID, id("antiwater"));
|
||||||
|
|
||||||
private Fluids() {
|
private Fluids() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ public class BedBugEntity extends Animal implements GeoEntity {
|
|||||||
return state.setAndContinue(BITE_ANIM);
|
return state.setAndContinue(BITE_ANIM);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.getDeltaMovement().horizontalDistanceSqr() > 0.003D) {
|
if (state.isMoving()) {
|
||||||
state.getController().setAnimationSpeed(1.15D);
|
state.getController().setAnimationSpeed(1.15D);
|
||||||
return state.setAndContinue(WALK_ANIM);
|
return state.setAndContinue(WALK_ANIM);
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-2
@@ -106,7 +106,7 @@ public class EmperorScorpionEntity extends Monster implements GeoEntity {
|
|||||||
private int attackAnimTicks;
|
private int attackAnimTicks;
|
||||||
private int clawCooldownTicks;
|
private int clawCooldownTicks;
|
||||||
private int stingCooldownTicks;
|
private int stingCooldownTicks;
|
||||||
private int hardenCooldownTicks = AntarchySettings.emperorScorpionSummonIntervalTicks();
|
private int hardenCooldownTicks = AntarchySettings.emperorScorpionHardenCooldownTicks();
|
||||||
private int hardenCastTicks;
|
private int hardenCastTicks;
|
||||||
private int hardenCastSpawnTicks;
|
private int hardenCastSpawnTicks;
|
||||||
private int hardenStateTicks;
|
private int hardenStateTicks;
|
||||||
@@ -331,7 +331,8 @@ public class EmperorScorpionEntity extends Monster implements GeoEntity {
|
|||||||
switch (this.getHardenPhase()) {
|
switch (this.getHardenPhase()) {
|
||||||
case CASTING -> {
|
case CASTING -> {
|
||||||
if (this.hardenCastTicks % this.hardenCastSpawnTicks == 0
|
if (this.hardenCastTicks % this.hardenCastSpawnTicks == 0
|
||||||
&& this.hardenSummonedScorpions < AntarchySettings.emperorScorpionMaxSummonedScorpions()) {
|
&& this.hardenSummonedScorpions < AntarchySettings.emperorScorpionMaxSummonedScorpions()
|
||||||
|
&& this.countNearbyScorpionMinions() < AntarchySettings.emperorScorpionMaxNearbyScorpions()) {
|
||||||
this.summonScorpionMinion();
|
this.summonScorpionMinion();
|
||||||
this.hardenSummonedScorpions++;
|
this.hardenSummonedScorpions++;
|
||||||
if (this.hardenSummonedScorpions >= AntarchySettings.emperorScorpionMaxSummonedScorpions()) {
|
if (this.hardenSummonedScorpions >= AntarchySettings.emperorScorpionMaxSummonedScorpions()) {
|
||||||
@@ -407,6 +408,16 @@ public class EmperorScorpionEntity extends Monster implements GeoEntity {
|
|||||||
this.setAggressive(false);
|
this.setAggressive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final double NEARBY_SCORPION_CHECK_RADIUS = 24.0D;
|
||||||
|
|
||||||
|
private int countNearbyScorpionMinions() {
|
||||||
|
return this.level().getEntitiesOfClass(
|
||||||
|
ScorpionEntity.class,
|
||||||
|
this.getBoundingBox().inflate(NEARBY_SCORPION_CHECK_RADIUS),
|
||||||
|
Entity::isAlive
|
||||||
|
).size();
|
||||||
|
}
|
||||||
|
|
||||||
private void summonScorpionMinion() {
|
private void summonScorpionMinion() {
|
||||||
if (!(this.level() instanceof ServerLevel serverLevel)) {
|
if (!(this.level() instanceof ServerLevel serverLevel)) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
+1
-1
@@ -318,7 +318,7 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
|
|||||||
this.flightCooldown--;
|
this.flightCooldown--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isFlying() && this.tickCount % 16 == 0) {
|
if (this.isFlying() && this.tickCount % 32 == 0) {
|
||||||
this.playSound(AntarchySoundEvents.MANTIS_FLY_LOOP.get(), 0.5F, 0.85F + this.random.nextFloat() * 0.1F);
|
this.playSound(AntarchySoundEvents.MANTIS_FLY_LOOP.get(), 0.5F, 0.85F + this.random.nextFloat() * 0.1F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+34
-2
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.content.entity;
|
|||||||
|
|
||||||
import com.craisinlord.antarchy.config.AntarchySettings;
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
import com.craisinlord.antarchy.content.AntarchyObjects;
|
import com.craisinlord.antarchy.content.AntarchyObjects;
|
||||||
|
import com.craisinlord.antarchy.content.AntarchyTags;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import net.minecraft.core.particles.DustParticleOptions;
|
import net.minecraft.core.particles.DustParticleOptions;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
@@ -9,6 +10,7 @@ import net.minecraft.server.level.ServerLevel;
|
|||||||
import net.minecraft.world.effect.MobEffectInstance;
|
import net.minecraft.world.effect.MobEffectInstance;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.entity.projectile.ThrowableItemProjectile;
|
import net.minecraft.world.entity.projectile.ThrowableItemProjectile;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.item.Items;
|
import net.minecraft.world.item.Items;
|
||||||
@@ -20,10 +22,13 @@ import net.minecraft.world.phys.Vec3;
|
|||||||
public class HushProjectileEntity extends ThrowableItemProjectile {
|
public class HushProjectileEntity extends ThrowableItemProjectile {
|
||||||
private static final int DREAD_DURATION_TICKS = 300;
|
private static final int DREAD_DURATION_TICKS = 300;
|
||||||
private static final double TRAVEL_SPEED = 0.27D;
|
private static final double TRAVEL_SPEED = 0.27D;
|
||||||
|
private static final int RETARGET_GRACE_TICKS = 60;
|
||||||
|
private static final double RETARGET_SEARCH_RADIUS = 16.0D;
|
||||||
private static final DustParticleOptions HUSH_PARTICLES = new DustParticleOptions(new org.joml.Vector3f(1.0F, 0.05F, 0.05F), 1.0F);
|
private static final DustParticleOptions HUSH_PARTICLES = new DustParticleOptions(new org.joml.Vector3f(1.0F, 0.05F, 0.05F), 1.0F);
|
||||||
private static final String TARGET_UUID_KEY = "HushTarget";
|
private static final String TARGET_UUID_KEY = "HushTarget";
|
||||||
|
|
||||||
private UUID targetUuid;
|
private UUID targetUuid;
|
||||||
|
private int retargetGraceTicksRemaining;
|
||||||
|
|
||||||
public HushProjectileEntity(EntityType<? extends HushProjectileEntity> entityType, Level level) {
|
public HushProjectileEntity(EntityType<? extends HushProjectileEntity> entityType, Level level) {
|
||||||
super(entityType, level);
|
super(entityType, level);
|
||||||
@@ -85,9 +90,23 @@ public class HushProjectileEntity extends ThrowableItemProjectile {
|
|||||||
this.getBoundingBox().inflate(48.0D),
|
this.getBoundingBox().inflate(48.0D),
|
||||||
entity -> entity.isAlive() && entity.getUUID().equals(this.targetUuid)
|
entity -> entity.isAlive() && entity.getUUID().equals(this.targetUuid)
|
||||||
).stream().findFirst().orElse(null);
|
).stream().findFirst().orElse(null);
|
||||||
|
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
this.discard();
|
target = this.findReplacementTarget();
|
||||||
return;
|
if (target != null) {
|
||||||
|
this.targetUuid = target.getUUID();
|
||||||
|
this.retargetGraceTicksRemaining = 0;
|
||||||
|
} else {
|
||||||
|
if (this.retargetGraceTicksRemaining <= 0) {
|
||||||
|
this.retargetGraceTicksRemaining = RETARGET_GRACE_TICKS;
|
||||||
|
}
|
||||||
|
if (--this.retargetGraceTicksRemaining <= 0) {
|
||||||
|
this.discard();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.retargetGraceTicksRemaining = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vec3 toTarget = target.getEyePosition().subtract(this.position());
|
Vec3 toTarget = target.getEyePosition().subtract(this.position());
|
||||||
@@ -101,6 +120,19 @@ public class HushProjectileEntity extends ThrowableItemProjectile {
|
|||||||
this.setDeltaMovement(this.getDeltaMovement().lerp(desired, 0.1D));
|
this.setDeltaMovement(this.getDeltaMovement().lerp(desired, 0.1D));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private LivingEntity findReplacementTarget() {
|
||||||
|
return this.level().getEntitiesOfClass(
|
||||||
|
LivingEntity.class,
|
||||||
|
this.getBoundingBox().inflate(RETARGET_SEARCH_RADIUS),
|
||||||
|
entity -> entity.isAlive()
|
||||||
|
&& !entity.getUUID().equals(this.targetUuid)
|
||||||
|
&& entity.getType().is(AntarchyTags.Entities.HUSHWEED_TARGETS)
|
||||||
|
&& (!(entity instanceof Player player) || (!player.isCreative() && !player.isSpectator())))
|
||||||
|
.stream()
|
||||||
|
.min(java.util.Comparator.comparingDouble(this::distanceToSqr))
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onHitEntity(EntityHitResult result) {
|
protected void onHitEntity(EntityHitResult result) {
|
||||||
super.onHitEntity(result);
|
super.onHitEntity(result);
|
||||||
|
|||||||
+1
-1
@@ -165,7 +165,7 @@ public class LurkingTerrorEntity extends Monster implements GeoEntity {
|
|||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
super.tick();
|
super.tick();
|
||||||
if (!this.level().isClientSide() && !this.onGround() && this.tickCount % 40 == 0) {
|
if (!this.level().isClientSide() && !this.onGround() && this.tickCount % 80 == 0) {
|
||||||
this.playSound(AntarchySoundEvents.LURKING_TERROR_FLY_LOOP.get(), 0.45F, 0.95F + this.random.nextFloat() * 0.1F);
|
this.playSound(AntarchySoundEvents.LURKING_TERROR_FLY_LOOP.get(), 0.45F, 0.95F + this.random.nextFloat() * 0.1F);
|
||||||
}
|
}
|
||||||
if (!this.level().isClientSide() && attackAnimTicks > 0) attackAnimTicks--;
|
if (!this.level().isClientSide() && attackAnimTicks > 0) attackAnimTicks--;
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ public class MantisEntity extends Monster implements GeoEntity {
|
|||||||
|
|
||||||
if (this.flyBurstTicks > 0) {
|
if (this.flyBurstTicks > 0) {
|
||||||
this.flyBurstTicks--;
|
this.flyBurstTicks--;
|
||||||
if (this.flyBurstTicks % 8 == 0) {
|
if (this.flyBurstTicks % 16 == 0) {
|
||||||
this.playSound(AntarchySoundEvents.MANTIS_FLY_LOOP.get(), 0.45F, 0.95F + this.random.nextFloat() * 0.1F);
|
this.playSound(AntarchySoundEvents.MANTIS_FLY_LOOP.get(), 0.45F, 0.95F + this.random.nextFloat() * 0.1F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+139
-117
@@ -1,5 +1,6 @@
|
|||||||
package com.craisinlord.antarchy.content.entity;
|
package com.craisinlord.antarchy.content.entity;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.Antarchy;
|
||||||
import com.craisinlord.antarchy.config.AntarchySettings;
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
import com.craisinlord.antarchy.content.AntarchyTags;
|
import com.craisinlord.antarchy.content.AntarchyTags;
|
||||||
import com.craisinlord.antarchy.content.AntarchySoundEvents;
|
import com.craisinlord.antarchy.content.AntarchySoundEvents;
|
||||||
@@ -12,25 +13,27 @@ import net.minecraft.nbt.CompoundTag;
|
|||||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||||
import net.minecraft.network.syncher.EntityDataSerializers;
|
import net.minecraft.network.syncher.EntityDataSerializers;
|
||||||
import net.minecraft.network.syncher.SynchedEntityData;
|
import net.minecraft.network.syncher.SynchedEntityData;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.tags.BlockTags;
|
import net.minecraft.tags.BlockTags;
|
||||||
|
import net.minecraft.tags.DamageTypeTags;
|
||||||
import net.minecraft.advancements.CriteriaTriggers;
|
import net.minecraft.advancements.CriteriaTriggers;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.sounds.SoundEvents;
|
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.InteractionResult;
|
import net.minecraft.world.InteractionResult;
|
||||||
import net.minecraft.world.damagesource.DamageSource;
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
import net.minecraft.world.entity.AgeableMob;
|
import net.minecraft.world.entity.AgeableMob;
|
||||||
import net.minecraft.world.entity.Entity;
|
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
import net.minecraft.world.entity.Mob;
|
import net.minecraft.world.entity.Mob;
|
||||||
import net.minecraft.world.entity.PathfinderMob;
|
import net.minecraft.world.entity.PathfinderMob;
|
||||||
import net.minecraft.world.entity.TamableAnimal;
|
import net.minecraft.world.entity.TamableAnimal;
|
||||||
|
import net.minecraft.world.entity.ai.attributes.AttributeInstance;
|
||||||
|
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
|
||||||
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
|
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
|
||||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||||
import net.minecraft.world.entity.ai.goal.FloatGoal;
|
import net.minecraft.world.entity.ai.goal.FloatGoal;
|
||||||
|
import net.minecraft.world.entity.ai.goal.FollowOwnerGoal;
|
||||||
import net.minecraft.world.entity.ai.goal.Goal;
|
import net.minecraft.world.entity.ai.goal.Goal;
|
||||||
import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal;
|
import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal;
|
||||||
import net.minecraft.world.entity.ai.goal.MoveToBlockGoal;
|
import net.minecraft.world.entity.ai.goal.MoveToBlockGoal;
|
||||||
@@ -38,6 +41,8 @@ import net.minecraft.world.entity.ai.goal.PanicGoal;
|
|||||||
import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal;
|
import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal;
|
||||||
import net.minecraft.world.entity.ai.goal.TemptGoal;
|
import net.minecraft.world.entity.ai.goal.TemptGoal;
|
||||||
import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal;
|
import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal;
|
||||||
|
import net.minecraft.world.entity.ai.goal.target.OwnerHurtByTargetGoal;
|
||||||
|
import net.minecraft.world.entity.ai.goal.target.OwnerHurtTargetGoal;
|
||||||
import net.minecraft.world.entity.ai.util.DefaultRandomPos;
|
import net.minecraft.world.entity.ai.util.DefaultRandomPos;
|
||||||
import net.minecraft.world.entity.item.ItemEntity;
|
import net.minecraft.world.entity.item.ItemEntity;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
@@ -77,7 +82,9 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
private static final int ROLL_UP_TICKS = 15;
|
private static final int ROLL_UP_TICKS = 15;
|
||||||
private static final int UNROLL_TICKS = 9;
|
private static final int UNROLL_TICKS = 9;
|
||||||
private static final int DEFENSIVE_CURL_TICKS = 100;
|
private static final int DEFENSIVE_CURL_TICKS = 100;
|
||||||
private static final int TUMBLE_DAMAGE_INTERVAL_TICKS = 30;
|
private static final int ROLL_SOUND_INTERVAL_TICKS = 25;
|
||||||
|
private static final ResourceLocation ROLLED_ARMOR_MODIFIER_ID =
|
||||||
|
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "rolly_polly_rolled_armor");
|
||||||
|
|
||||||
private static final EntityDataAccessor<Integer> ANIMATION_STATE =
|
private static final EntityDataAccessor<Integer> ANIMATION_STATE =
|
||||||
SynchedEntityData.defineId(RollyPollyEntity.class, EntityDataSerializers.INT);
|
SynchedEntityData.defineId(RollyPollyEntity.class, EntityDataSerializers.INT);
|
||||||
@@ -89,8 +96,8 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
private int rollTransitionTicks;
|
private int rollTransitionTicks;
|
||||||
private boolean unrolling;
|
private boolean unrolling;
|
||||||
private int defensiveCurlTicks;
|
private int defensiveCurlTicks;
|
||||||
private int tumbleTicks;
|
|
||||||
private boolean hasCompost;
|
private boolean hasCompost;
|
||||||
|
private int rollSoundCooldown;
|
||||||
|
|
||||||
public RollyPollyEntity(EntityType<? extends RollyPollyEntity> entityType, Level level) {
|
public RollyPollyEntity(EntityType<? extends RollyPollyEntity> entityType, Level level) {
|
||||||
super(entityType, level);
|
super(entityType, level);
|
||||||
@@ -108,6 +115,8 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
return Mob.createMobAttributes()
|
return Mob.createMobAttributes()
|
||||||
.add(Attributes.MAX_HEALTH, AntarchySettings.rollyPollyHealth())
|
.add(Attributes.MAX_HEALTH, AntarchySettings.rollyPollyHealth())
|
||||||
.add(Attributes.MOVEMENT_SPEED, AntarchySettings.rollyPollyMovementSpeed())
|
.add(Attributes.MOVEMENT_SPEED, AntarchySettings.rollyPollyMovementSpeed())
|
||||||
|
.add(Attributes.ATTACK_DAMAGE, AntarchySettings.rollyPollyBowlingDamage())
|
||||||
|
.add(Attributes.ARMOR, AntarchySettings.rollyPollyArmor())
|
||||||
.add(Attributes.FOLLOW_RANGE, 16.0D);
|
.add(Attributes.FOLLOW_RANGE, 16.0D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,24 +137,28 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
return !RollyPollyEntity.this.isRolled() && !RollyPollyEntity.this.isTame() && super.canUse();
|
return !RollyPollyEntity.this.isRolled() && !RollyPollyEntity.this.isTame() && super.canUse();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.goalSelector.addGoal(2, new FertilizeCropGoal());
|
this.goalSelector.addGoal(2, new BowlingAttackGoal());
|
||||||
this.goalSelector.addGoal(3, new EatCompostItemGoal());
|
this.goalSelector.addGoal(3, new FertilizeCropGoal());
|
||||||
this.goalSelector.addGoal(4, new SnuggleOnBedGoal());
|
this.goalSelector.addGoal(4, new EatCompostItemGoal());
|
||||||
this.goalSelector.addGoal(5, new TemptGoal(this, 1.1D, Ingredient.of(AntarchyTags.Items.ROLLY_POLLY_FOOD), false) {
|
this.goalSelector.addGoal(5, new SnuggleOnBedGoal());
|
||||||
|
this.goalSelector.addGoal(6, new TemptGoal(this, 1.1D, Ingredient.of(AntarchyTags.Items.ROLLY_POLLY_FOOD), false) {
|
||||||
@Override
|
@Override
|
||||||
public boolean canUse() {
|
public boolean canUse() {
|
||||||
return !RollyPollyEntity.this.isRolled() && super.canUse();
|
return !RollyPollyEntity.this.isRolled() && super.canUse();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.goalSelector.addGoal(6, new RollingStrollGoal());
|
this.goalSelector.addGoal(7, new FollowOwnerGoal(this, 1.1D, 10.0F, 2.0F));
|
||||||
this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D) {
|
this.goalSelector.addGoal(8, new RollingStrollGoal());
|
||||||
|
this.goalSelector.addGoal(9, new WaterAvoidingRandomStrollGoal(this, 1.0D) {
|
||||||
@Override
|
@Override
|
||||||
public boolean canUse() {
|
public boolean canUse() {
|
||||||
return !RollyPollyEntity.this.isRolled() && !RollyPollyEntity.this.isVehicle() && super.canUse();
|
return !RollyPollyEntity.this.isRolled() && super.canUse();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 8.0F));
|
this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Player.class, 8.0F));
|
||||||
this.goalSelector.addGoal(9, new RandomLookAroundGoal(this));
|
this.goalSelector.addGoal(11, new RandomLookAroundGoal(this));
|
||||||
|
this.targetSelector.addGoal(1, new OwnerHurtByTargetGoal(this));
|
||||||
|
this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -198,13 +211,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
return InteractionResult.sidedSuccess(this.level().isClientSide);
|
return InteractionResult.sidedSuccess(this.level().isClientSide);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isTame() && stack.isEmpty() && !player.isShiftKeyDown() && !player.isPassengerOfSameVehicle(this)) {
|
|
||||||
if (!this.level().isClientSide) {
|
|
||||||
player.startRiding(this);
|
|
||||||
}
|
|
||||||
return InteractionResult.sidedSuccess(this.level().isClientSide);
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.mobInteract(player, hand);
|
return super.mobInteract(player, hand);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,34 +241,36 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
this.entityData.set(ROLLED, rolled);
|
this.entityData.set(ROLLED, rolled);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggles wheel mode; called from the ridden-roll keybind payload. */
|
|
||||||
public void handleRollToggle(ServerPlayer player) {
|
|
||||||
if (!this.isTame() || this.getControllingPassenger() != player) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.rollTransitionTicks > 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.isRolled()) {
|
|
||||||
this.startUnroll();
|
|
||||||
} else {
|
|
||||||
this.startRollUp();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void startRollUp() {
|
private void startRollUp() {
|
||||||
this.setRolled(true);
|
this.setRolled(true);
|
||||||
this.unrolling = false;
|
this.unrolling = false;
|
||||||
this.rollTransitionTicks = ROLL_UP_TICKS;
|
this.rollTransitionTicks = ROLL_UP_TICKS;
|
||||||
this.setAnimationState(ANIM_ROLL_UP);
|
this.setAnimationState(ANIM_ROLL_UP);
|
||||||
this.playSound(SoundEvents.ARMADILLO_ROLL, 0.8F, 1.0F);
|
this.playSound(AntarchySoundEvents.ROLLY_POLLY_WHEEL_MODE.get(), 0.8F, 1.0F);
|
||||||
|
this.applyRolledArmorBonus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startUnroll() {
|
private void startUnroll() {
|
||||||
this.unrolling = true;
|
this.unrolling = true;
|
||||||
this.rollTransitionTicks = UNROLL_TICKS;
|
this.rollTransitionTicks = UNROLL_TICKS;
|
||||||
this.setAnimationState(ANIM_UNROLL);
|
this.setAnimationState(ANIM_UNROLL);
|
||||||
this.playSound(SoundEvents.ARMADILLO_UNROLL_START, 0.8F, 1.0F);
|
this.playSound(AntarchySoundEvents.ROLLY_POLLY_NORMAL_MODE.get(), 0.8F, 1.0F);
|
||||||
|
this.removeRolledArmorBonus();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void applyRolledArmorBonus() {
|
||||||
|
AttributeInstance armor = this.getAttribute(Attributes.ARMOR);
|
||||||
|
if (armor != null && armor.getModifier(ROLLED_ARMOR_MODIFIER_ID) == null) {
|
||||||
|
armor.addTransientModifier(new AttributeModifier(
|
||||||
|
ROLLED_ARMOR_MODIFIER_ID, AntarchySettings.rollyPollyRolledArmorBonus(), AttributeModifier.Operation.ADD_VALUE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void removeRolledArmorBonus() {
|
||||||
|
AttributeInstance armor = this.getAttribute(Attributes.ARMOR);
|
||||||
|
if (armor != null) {
|
||||||
|
armor.removeModifier(ROLLED_ARMOR_MODIFIER_ID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -272,14 +280,14 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
|
|
||||||
private void stopDefensiveCurl() {
|
private void stopDefensiveCurl() {
|
||||||
this.defensiveCurlTicks = 0;
|
this.defensiveCurlTicks = 0;
|
||||||
if (this.isRolled() && !this.isVehicle()) {
|
if (this.isRolled()) {
|
||||||
this.startUnroll();
|
this.startUnroll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hurt(DamageSource source, float amount) {
|
public boolean hurt(DamageSource source, float amount) {
|
||||||
if (this.isRolled()) {
|
if (this.isRolled() && source.is(DamageTypeTags.IS_PROJECTILE)) {
|
||||||
amount *= 0.25F;
|
amount *= 0.25F;
|
||||||
}
|
}
|
||||||
boolean hurt = super.hurt(source, amount);
|
boolean hurt = super.hurt(source, amount);
|
||||||
@@ -313,29 +321,27 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
if (this.defensiveCurlTicks > 0) {
|
if (this.defensiveCurlTicks > 0) {
|
||||||
this.defensiveCurlTicks--;
|
this.defensiveCurlTicks--;
|
||||||
this.getNavigation().stop();
|
this.getNavigation().stop();
|
||||||
if (this.defensiveCurlTicks <= 0 && this.isRolled() && !this.isVehicle()) {
|
if (this.defensiveCurlTicks <= 0 && this.isRolled()) {
|
||||||
this.startUnroll();
|
this.startUnroll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tickTumbleDamage();
|
this.tickRollSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tickTumbleDamage() {
|
private void tickRollSound() {
|
||||||
if (!this.isRolled() || this.rollTransitionTicks > 0
|
if (!this.isRolled() || this.rollTransitionTicks > 0 || this.getDeltaMovement().horizontalDistanceSqr() <= 0.003D) {
|
||||||
|| !(this.getControllingPassenger() instanceof Player rider)) {
|
this.rollSoundCooldown = 0;
|
||||||
this.tumbleTicks = 0;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
boolean moving = this.getDeltaMovement().horizontalDistanceSqr() > 0.003D;
|
|
||||||
boolean helmeted = !rider.getItemBySlot(EquipmentSlot.HEAD).isEmpty();
|
if (this.rollSoundCooldown > 0) {
|
||||||
if (!moving || helmeted) {
|
this.rollSoundCooldown--;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (++this.tumbleTicks >= TUMBLE_DAMAGE_INTERVAL_TICKS) {
|
|
||||||
this.tumbleTicks = 0;
|
this.rollSoundCooldown = ROLL_SOUND_INTERVAL_TICKS;
|
||||||
rider.hurt(this.damageSources().generic(), (float) AntarchySettings.rollyPollyTumbleDamage());
|
this.playSound(AntarchySoundEvents.ROLLY_POLLY_ROLL.get(), 0.7F, 0.9F + this.random.nextFloat() * 0.2F);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getAnimationState() {
|
private int getAnimationState() {
|
||||||
@@ -346,70 +352,15 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
this.entityData.set(ANIMATION_STATE, state);
|
this.entityData.set(ANIMATION_STATE, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Nullable
|
|
||||||
public LivingEntity getControllingPassenger() {
|
|
||||||
if (!this.isTame()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Entity passenger = this.getFirstPassenger();
|
|
||||||
return passenger instanceof LivingEntity living ? living : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canAddPassenger(Entity passenger) {
|
|
||||||
return this.getPassengers().isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void positionRider(Entity passenger, MoveFunction moveFunction) {
|
|
||||||
if (this.hasPassenger(passenger)) {
|
|
||||||
// When rolled the rider tucks into the center of the ball; otherwise sits on the shell
|
|
||||||
double yOffset = this.isRolled() ? -0.25D : 0.45D;
|
|
||||||
moveFunction.accept(passenger, this.getX(), this.getY() + yOffset, this.getZ());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void travel(Vec3 travelVector) {
|
public void travel(Vec3 travelVector) {
|
||||||
if (this.defensiveCurlTicks > 0 && !this.isVehicle()) {
|
if (this.defensiveCurlTicks > 0) {
|
||||||
super.travel(Vec3.ZERO);
|
super.travel(Vec3.ZERO);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
super.travel(travelVector);
|
super.travel(travelVector);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void tickRidden(Player player, Vec3 travelVector) {
|
|
||||||
super.tickRidden(player, travelVector);
|
|
||||||
this.setRot(player.getYHeadRot(), player.getXRot() * 0.5F);
|
|
||||||
this.yRotO = this.yBodyRot = this.yHeadRot = this.getYRot();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Vec3 getRiddenInput(Player player, Vec3 travelVector) {
|
|
||||||
if (this.rollTransitionTicks > 0) {
|
|
||||||
// Hold still while rolling up / unrolling
|
|
||||||
return Vec3.ZERO;
|
|
||||||
}
|
|
||||||
float forward = player.zza;
|
|
||||||
float strafe = player.xxa * 0.5F;
|
|
||||||
if (forward < 0.0F) {
|
|
||||||
forward *= 0.4F;
|
|
||||||
}
|
|
||||||
if (this.isRolled()) {
|
|
||||||
// Rolling is fast but drifty
|
|
||||||
strafe *= 0.35F;
|
|
||||||
}
|
|
||||||
return new Vec3(strafe, 0.0D, forward);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected float getRiddenSpeed(Player player) {
|
|
||||||
return (float) (this.getAttributeValue(Attributes.MOVEMENT_SPEED)
|
|
||||||
* (this.isRolled() ? AntarchySettings.rollyPollyRollSpeedMultiplier() : 1.0D));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean causeFallDamage(float fallDistance, float multiplier, DamageSource damageSource) {
|
public boolean causeFallDamage(float fallDistance, float multiplier, DamageSource damageSource) {
|
||||||
if (this.isRolled()) {
|
if (this.isRolled()) {
|
||||||
@@ -483,7 +434,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
public boolean canUse() {
|
public boolean canUse() {
|
||||||
if (RollyPollyEntity.this.hasCompost
|
if (RollyPollyEntity.this.hasCompost
|
||||||
|| RollyPollyEntity.this.isRolled()
|
|| RollyPollyEntity.this.isRolled()
|
||||||
|| RollyPollyEntity.this.isVehicle()
|
|
||||||
|| RollyPollyEntity.this.defensiveCurlTicks > 0) {
|
|| RollyPollyEntity.this.defensiveCurlTicks > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -500,7 +450,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
public boolean canContinueToUse() {
|
public boolean canContinueToUse() {
|
||||||
return !RollyPollyEntity.this.hasCompost
|
return !RollyPollyEntity.this.hasCompost
|
||||||
&& !RollyPollyEntity.this.isRolled()
|
&& !RollyPollyEntity.this.isRolled()
|
||||||
&& !RollyPollyEntity.this.isVehicle()
|
|
||||||
&& this.targetItem != null
|
&& this.targetItem != null
|
||||||
&& this.targetItem.isAlive()
|
&& this.targetItem.isAlive()
|
||||||
&& isCompostable(this.targetItem.getItem());
|
&& isCompostable(this.targetItem.getItem());
|
||||||
@@ -571,7 +520,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
public boolean canUse() {
|
public boolean canUse() {
|
||||||
return RollyPollyEntity.this.hasCompost
|
return RollyPollyEntity.this.hasCompost
|
||||||
&& !RollyPollyEntity.this.isRolled()
|
&& !RollyPollyEntity.this.isRolled()
|
||||||
&& !RollyPollyEntity.this.isVehicle()
|
|
||||||
&& RollyPollyEntity.this.defensiveCurlTicks <= 0
|
&& RollyPollyEntity.this.defensiveCurlTicks <= 0
|
||||||
&& super.canUse();
|
&& super.canUse();
|
||||||
}
|
}
|
||||||
@@ -579,7 +527,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
@Override
|
@Override
|
||||||
public boolean canContinueToUse() {
|
public boolean canContinueToUse() {
|
||||||
return RollyPollyEntity.this.hasCompost
|
return RollyPollyEntity.this.hasCompost
|
||||||
&& !RollyPollyEntity.this.isVehicle()
|
|
||||||
&& super.canContinueToUse();
|
&& super.canContinueToUse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -653,6 +600,84 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class BowlingAttackGoal extends Goal {
|
||||||
|
private static final double CHARGE_SPEED = 1.3D;
|
||||||
|
private static final double HIT_RANGE_SQR = 1.75D * 1.75D;
|
||||||
|
private static final int ATTACK_COOLDOWN_TICKS = 20;
|
||||||
|
|
||||||
|
private int attackCooldown;
|
||||||
|
|
||||||
|
BowlingAttackGoal() {
|
||||||
|
this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canUse() {
|
||||||
|
LivingEntity target = RollyPollyEntity.this.getTarget();
|
||||||
|
return RollyPollyEntity.this.isTame()
|
||||||
|
&& target != null
|
||||||
|
&& target.isAlive();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canContinueToUse() {
|
||||||
|
return this.canUse();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void start() {
|
||||||
|
this.attackCooldown = 0;
|
||||||
|
if (!RollyPollyEntity.this.isRolled() && RollyPollyEntity.this.rollTransitionTicks <= 0) {
|
||||||
|
RollyPollyEntity.this.startRollUp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void stop() {
|
||||||
|
RollyPollyEntity.this.getNavigation().stop();
|
||||||
|
if (RollyPollyEntity.this.isRolled() && RollyPollyEntity.this.rollTransitionTicks <= 0) {
|
||||||
|
RollyPollyEntity.this.startUnroll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick() {
|
||||||
|
LivingEntity target = RollyPollyEntity.this.getTarget();
|
||||||
|
if (target == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
RollyPollyEntity.this.getLookControl().setLookAt(target, 30.0F, 30.0F);
|
||||||
|
|
||||||
|
if (this.attackCooldown > 0) {
|
||||||
|
this.attackCooldown--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!RollyPollyEntity.this.isRolled() || RollyPollyEntity.this.rollTransitionTicks > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
RollyPollyEntity.this.getNavigation().moveTo(target, CHARGE_SPEED);
|
||||||
|
|
||||||
|
if (this.attackCooldown <= 0 && RollyPollyEntity.this.distanceToSqr(target) <= HIT_RANGE_SQR) {
|
||||||
|
this.attackCooldown = ATTACK_COOLDOWN_TICKS;
|
||||||
|
this.performBowlingHit(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void performBowlingHit(LivingEntity target) {
|
||||||
|
boolean hurt = target.hurt(RollyPollyEntity.this.damageSources().mobAttack(RollyPollyEntity.this), (float) RollyPollyEntity.this.getAttributeValue(Attributes.ATTACK_DAMAGE));
|
||||||
|
if (!hurt) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
double dx = RollyPollyEntity.this.getX() - target.getX();
|
||||||
|
double dz = RollyPollyEntity.this.getZ() - target.getZ();
|
||||||
|
target.knockback(AntarchySettings.rollyPollyBowlingKnockback(), dx, dz);
|
||||||
|
RollyPollyEntity.this.playSound(AntarchySoundEvents.ROLLY_POLLY_ROLL.get(), 1.0F, 0.8F + RollyPollyEntity.this.random.nextFloat() * 0.2F);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class RollingStrollGoal extends Goal {
|
private class RollingStrollGoal extends Goal {
|
||||||
@Nullable
|
@Nullable
|
||||||
private Vec3 targetPos;
|
private Vec3 targetPos;
|
||||||
@@ -668,7 +693,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
@Override
|
@Override
|
||||||
public boolean canUse() {
|
public boolean canUse() {
|
||||||
if (RollyPollyEntity.this.isRolled()
|
if (RollyPollyEntity.this.isRolled()
|
||||||
|| RollyPollyEntity.this.isVehicle()
|
|
||||||
|| RollyPollyEntity.this.defensiveCurlTicks > 0
|
|| RollyPollyEntity.this.defensiveCurlTicks > 0
|
||||||
|| RollyPollyEntity.this.hasCompost
|
|| RollyPollyEntity.this.hasCompost
|
||||||
|| RollyPollyEntity.this.rollTransitionTicks > 0) {
|
|| RollyPollyEntity.this.rollTransitionTicks > 0) {
|
||||||
@@ -685,7 +709,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
public boolean canContinueToUse() {
|
public boolean canContinueToUse() {
|
||||||
return !this.finished
|
return !this.finished
|
||||||
&& this.rollingTicks < this.maxRollingTicks
|
&& this.rollingTicks < this.maxRollingTicks
|
||||||
&& !RollyPollyEntity.this.isVehicle()
|
|
||||||
&& !RollyPollyEntity.this.hasCompost;
|
&& !RollyPollyEntity.this.hasCompost;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -739,7 +762,7 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canUse() {
|
public boolean canUse() {
|
||||||
if (!RollyPollyEntity.this.isTame() || RollyPollyEntity.this.isVehicle()) {
|
if (!RollyPollyEntity.this.isTame()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!(RollyPollyEntity.this.getOwner() instanceof Player player) || !player.isSleeping()) {
|
if (!(RollyPollyEntity.this.getOwner() instanceof Player player) || !player.isSleeping()) {
|
||||||
@@ -763,7 +786,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
|
|||||||
@Override
|
@Override
|
||||||
public boolean canContinueToUse() {
|
public boolean canContinueToUse() {
|
||||||
return RollyPollyEntity.this.isTame()
|
return RollyPollyEntity.this.isTame()
|
||||||
&& !RollyPollyEntity.this.isVehicle()
|
|
||||||
&& this.ownerPlayer != null
|
&& this.ownerPlayer != null
|
||||||
&& this.ownerPlayer.isSleeping()
|
&& this.ownerPlayer.isSleeping()
|
||||||
&& this.bedPos != null;
|
&& this.bedPos != null;
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public class StinkBugEntity extends Animal implements GeoEntity {
|
|||||||
if (this.fartAnimationTicks > 0) {
|
if (this.fartAnimationTicks > 0) {
|
||||||
this.fartAnimationTicks--;
|
this.fartAnimationTicks--;
|
||||||
if (this.fartAnimationTicks == FART_RELEASE_TICKS && this.pendingFartBurst && !this.level().isClientSide()) {
|
if (this.fartAnimationTicks == FART_RELEASE_TICKS && this.pendingFartBurst && !this.level().isClientSide()) {
|
||||||
this.playSound(AntarchySoundEvents.STINK_BUG_FART.get(), 0.85F, 0.9F + this.random.nextFloat() * 0.1F);
|
this.playSound(AntarchySoundEvents.STINK_BUG_FART.get(), 1.7F, 0.9F + this.random.nextFloat() * 0.1F);
|
||||||
StinkyBehavior.emitBurst(this, STINK_BURST_PARTICLES);
|
StinkyBehavior.emitBurst(this, STINK_BURST_PARTICLES);
|
||||||
StinkyBehavior.applyBurstStinkyEffect(this, STINK_BURST_RADIUS, STINK_BURST_DURATION_TICKS);
|
StinkyBehavior.applyBurstStinkyEffect(this, STINK_BURST_RADIUS, STINK_BURST_DURATION_TICKS);
|
||||||
this.pendingFartBurst = false;
|
this.pendingFartBurst = false;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import net.minecraft.core.Direction;
|
|||||||
import net.minecraft.core.registries.BuiltInRegistries;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.sounds.SoundSource;
|
||||||
import net.minecraft.stats.Stats;
|
import net.minecraft.stats.Stats;
|
||||||
import net.minecraft.world.InteractionResult;
|
import net.minecraft.world.InteractionResult;
|
||||||
import net.minecraft.world.effect.MobEffectInstance;
|
import net.minecraft.world.effect.MobEffectInstance;
|
||||||
@@ -58,6 +59,7 @@ public final class CorneaEarItem extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
level.setBlock(plantPos, stalkState, Block.UPDATE_ALL);
|
level.setBlock(plantPos, stalkState, Block.UPDATE_ALL);
|
||||||
|
level.playSound(null, plantPos, stalkState.getSoundType().getPlaceSound(), SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||||
ItemStack stack = context.getItemInHand();
|
ItemStack stack = context.getItemInHand();
|
||||||
Player player = context.getPlayer();
|
Player player = context.getPlayer();
|
||||||
if (player == null || !player.getAbilities().instabuild) {
|
if (player == null || !player.getAbilities().instabuild) {
|
||||||
|
|||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
/** C2S: the rider pressed the roll keybind — toggle the rolly polly's wheel mode. */
|
|
||||||
public record RollyPollyRollPayload() implements CustomPacketPayload {
|
|
||||||
public static final Type<RollyPollyRollPayload> TYPE =
|
|
||||||
new Type<>(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "rolly_polly_roll"));
|
|
||||||
public static final StreamCodec<ByteBuf, RollyPollyRollPayload> STREAM_CODEC =
|
|
||||||
StreamCodec.unit(new RollyPollyRollPayload());
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Type<RollyPollyRollPayload> type() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+46
@@ -1,10 +1,56 @@
|
|||||||
package com.craisinlord.antarchy.content.worldgen.ants;
|
package com.craisinlord.antarchy.content.worldgen.ants;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.Antarchy;
|
||||||
import com.mojang.serialization.Codec;
|
import com.mojang.serialization.Codec;
|
||||||
|
import java.util.Optional;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.util.RandomSource;
|
||||||
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
|
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.levelgen.feature.configurations.SimpleBlockConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.SimpleBlockConfiguration;
|
||||||
|
|
||||||
public class TermiteNestFeature extends SurfaceAntNestFeature {
|
public class TermiteNestFeature extends SurfaceAntNestFeature {
|
||||||
|
private static final ResourceLocation MYRMITE_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "myrmite");
|
||||||
|
private static final ResourceLocation BROODSTONE_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "broodstone");
|
||||||
|
|
||||||
public TermiteNestFeature(Codec<SimpleBlockConfiguration> codec) {
|
public TermiteNestFeature(Codec<SimpleBlockConfiguration> codec) {
|
||||||
super(codec);
|
super(codec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean isValidNestGround(BlockState nestGroundState) {
|
||||||
|
return super.isValidNestGround(nestGroundState)
|
||||||
|
|| nestGroundState.is(getBlock(MYRMITE_ID))
|
||||||
|
|| nestGroundState.is(getBlock(BROODSTONE_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void decorateAroundNest(WorldGenLevel level, BlockPos center, RandomSource random) {
|
||||||
|
for (int xOffset = -1; xOffset <= 1; xOffset++) {
|
||||||
|
for (int zOffset = -1; zOffset <= 1; zOffset++) {
|
||||||
|
if (xOffset == 0 && zOffset == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Math.abs(xOffset) == 1 && Math.abs(zOffset) == 1 && random.nextBoolean()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
BlockPos targetPos = center.offset(xOffset, 0, zOffset);
|
||||||
|
BlockState targetState = level.getBlockState(targetPos);
|
||||||
|
if (this.isValidNestGround(targetState)) {
|
||||||
|
level.setBlock(targetPos, Blocks.ROOTED_DIRT.defaultBlockState(), 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Block getBlock(ResourceLocation id) {
|
||||||
|
Optional<Block> block = BuiltInRegistries.BLOCK.getOptional(id);
|
||||||
|
return block.orElse(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+26
-15
@@ -29,6 +29,8 @@ public final class CavarynBileVeinFeature extends Feature<NoneFeatureConfigurati
|
|||||||
private static final int VERTICAL_SCAN = 12;
|
private static final int VERTICAL_SCAN = 12;
|
||||||
private static final float BRANCH_CHANCE = 0.12f;
|
private static final float BRANCH_CHANCE = 0.12f;
|
||||||
private static final float LIQUID_POCKET_CHANCE = 0.008f;
|
private static final float LIQUID_POCKET_CHANCE = 0.008f;
|
||||||
|
private static final int MAX_DISTANCE_FROM_START = 16;
|
||||||
|
private static final int MAX_DISTANCE_FROM_START_SQR = MAX_DISTANCE_FROM_START * MAX_DISTANCE_FROM_START;
|
||||||
|
|
||||||
public CavarynBileVeinFeature(Codec<NoneFeatureConfiguration> codec) {
|
public CavarynBileVeinFeature(Codec<NoneFeatureConfiguration> codec) {
|
||||||
super(codec);
|
super(codec);
|
||||||
@@ -36,21 +38,25 @@ public final class CavarynBileVeinFeature extends Feature<NoneFeatureConfigurati
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> context) {
|
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> context) {
|
||||||
Block bileVeinBlock = getBlock(BILE_VEIN_ID);
|
try {
|
||||||
Block bileBlock = getBlock(BILE_ID);
|
Block bileVeinBlock = getBlock(BILE_VEIN_ID);
|
||||||
if (bileVeinBlock == null || !(bileBlock instanceof LiquidBlock)) {
|
Block bileBlock = getBlock(BILE_ID);
|
||||||
|
if (bileVeinBlock == null || !(bileBlock instanceof LiquidBlock)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
WorldGenLevel level = context.level();
|
||||||
|
RandomSource random = context.random();
|
||||||
|
|
||||||
|
BlockPos start = findStart(level, context.origin(), random);
|
||||||
|
if (start == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return growVeinNetwork(level, start, bileVeinBlock, bileBlock, random);
|
||||||
|
} catch (RuntimeException exception) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldGenLevel level = context.level();
|
|
||||||
RandomSource random = context.random();
|
|
||||||
|
|
||||||
BlockPos start = findStart(level, context.origin(), random);
|
|
||||||
if (start == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return growVeinNetwork(level, start, bileVeinBlock, bileBlock, random);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BlockPos findStart(WorldGenLevel level, BlockPos origin, RandomSource random) {
|
private static BlockPos findStart(WorldGenLevel level, BlockPos origin, RandomSource random) {
|
||||||
@@ -81,12 +87,12 @@ public final class CavarynBileVeinFeature extends Feature<NoneFeatureConfigurati
|
|||||||
boolean placedAny = false;
|
boolean placedAny = false;
|
||||||
|
|
||||||
Direction mainDir = Direction.values()[random.nextInt(6)];
|
Direction mainDir = Direction.values()[random.nextInt(6)];
|
||||||
placedAny |= growArm(level, start, mainDir, 45 + random.nextInt(25), visited, pendingBranches, veinBlock, bileBlock, random);
|
placedAny |= growArm(level, start, start, mainDir, 45 + random.nextInt(25), visited, pendingBranches, veinBlock, bileBlock, random);
|
||||||
|
|
||||||
for (BranchStart branch : pendingBranches) {
|
for (BranchStart branch : pendingBranches) {
|
||||||
Direction branchDir = perpendiculars(branch.dir())[random.nextInt(4)];
|
Direction branchDir = perpendiculars(branch.dir())[random.nextInt(4)];
|
||||||
int branchLen = 15 + random.nextInt(20);
|
int branchLen = 15 + random.nextInt(20);
|
||||||
growArm(level, branch.pos(), branchDir, branchLen, visited, null, veinBlock, bileBlock, random);
|
growArm(level, start, branch.pos(), branchDir, branchLen, visited, null, veinBlock, bileBlock, random);
|
||||||
}
|
}
|
||||||
|
|
||||||
return placedAny;
|
return placedAny;
|
||||||
@@ -94,6 +100,7 @@ public final class CavarynBileVeinFeature extends Feature<NoneFeatureConfigurati
|
|||||||
|
|
||||||
private boolean growArm(
|
private boolean growArm(
|
||||||
WorldGenLevel level,
|
WorldGenLevel level,
|
||||||
|
BlockPos networkOrigin,
|
||||||
BlockPos start,
|
BlockPos start,
|
||||||
Direction initialDir,
|
Direction initialDir,
|
||||||
int maxSteps,
|
int maxSteps,
|
||||||
@@ -108,6 +115,10 @@ public final class CavarynBileVeinFeature extends Feature<NoneFeatureConfigurati
|
|||||||
boolean placedAny = false;
|
boolean placedAny = false;
|
||||||
|
|
||||||
for (int step = 0; step < maxSteps; step++) {
|
for (int step = 0; step < maxSteps; step++) {
|
||||||
|
if (current.distSqr(networkOrigin) > MAX_DISTANCE_FROM_START_SQR) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (visited.contains(current)) {
|
if (visited.contains(current)) {
|
||||||
current = current.relative(biasedNextDir(dir, random));
|
current = current.relative(biasedNextDir(dir, random));
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.craisinlord.antarchy.mixins;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.Antarchy;
|
||||||
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.entity.item.FallingBlockEntity;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(FallingBlockEntity.class)
|
||||||
|
public abstract class DreamSandFallingSpeedMixin {
|
||||||
|
private static final ResourceLocation DREAM_SAND_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "dream_sand");
|
||||||
|
|
||||||
|
@Shadow public abstract BlockState getBlockState();
|
||||||
|
|
||||||
|
@Inject(method = "getDefaultGravity", at = @At("RETURN"), cancellable = true)
|
||||||
|
private void antarchy$slowDreamSandFall(CallbackInfoReturnable<Double> cir) {
|
||||||
|
if (BuiltInRegistries.BLOCK.getKey(this.getBlockState().getBlock()).equals(DREAM_SAND_ID)) {
|
||||||
|
cir.setReturnValue(cir.getReturnValue() * AntarchySettings.dreamSandFallingBlockGravityMultiplier());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
package com.craisinlord.antarchy.mixins;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import net.minecraft.world.level.storage.LevelSummary;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(value = LevelSummary.class, priority = 1001)
|
||||||
|
public abstract class ExperimentalSettingsLevelSummaryMixin {
|
||||||
|
@Inject(method = "isExperimental", at = @At("RETURN"), cancellable = true)
|
||||||
|
private void antarchy$hideExperimentalStatus(CallbackInfoReturnable<Boolean> cir) {
|
||||||
|
if (AntarchySettings.experimentalSettingsPopupDisabled()) {
|
||||||
|
cir.setReturnValue(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.craisinlord.antarchy.mixins;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.content.AntarchyTags;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.sounds.SoundEvents;
|
||||||
|
import net.minecraft.sounds.SoundSource;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.BucketPickup;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.block.LiquidBlock;
|
||||||
|
import net.minecraft.world.level.block.SpongeBlock;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraft.world.level.material.FluidState;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(SpongeBlock.class)
|
||||||
|
public abstract class SpongeAntiwaterMixin {
|
||||||
|
private static final int MAX_DEPTH = 6;
|
||||||
|
private static final int MAX_COUNT = 65;
|
||||||
|
private static final Direction[] ALL_DIRECTIONS = Direction.values();
|
||||||
|
|
||||||
|
@Inject(method = "tryAbsorbWater", at = @At("TAIL"))
|
||||||
|
private void antarchy$tryAbsorbAntiwater(Level level, BlockPos pos, CallbackInfo ci) {
|
||||||
|
if (!level.getBlockState(pos).is(Blocks.SPONGE)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (antarchy$removeAntiwaterBreadthFirstSearch(level, pos) > 1) {
|
||||||
|
level.setBlock(pos, Blocks.WET_SPONGE.defaultBlockState(), 2);
|
||||||
|
level.playSound(null, pos, SoundEvents.SPONGE_ABSORB, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int antarchy$removeAntiwaterBreadthFirstSearch(Level level, BlockPos origin) {
|
||||||
|
return BlockPos.breadthFirstTraversal(
|
||||||
|
origin,
|
||||||
|
MAX_DEPTH,
|
||||||
|
MAX_COUNT,
|
||||||
|
(pos, consumer) -> {
|
||||||
|
for (Direction direction : ALL_DIRECTIONS) {
|
||||||
|
consumer.accept(pos.relative(direction));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pos -> antarchy$tryRemoveAntiwaterAt(level, origin, pos)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean antarchy$tryRemoveAntiwaterAt(Level level, BlockPos origin, BlockPos pos) {
|
||||||
|
if (pos.equals(origin)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
BlockState state = level.getBlockState(pos);
|
||||||
|
FluidState fluidState = level.getFluidState(pos);
|
||||||
|
if (!fluidState.is(AntarchyTags.Fluids.ANTIWATER)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Block block = state.getBlock();
|
||||||
|
if (block instanceof BucketPickup bucketPickup && !bucketPickup.pickupBlock(null, level, pos, state).isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (block instanceof LiquidBlock) {
|
||||||
|
level.setBlock(pos, Blocks.AIR.defaultBlockState(), 3);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.craisinlord.antarchy.mixins.client;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import com.mojang.serialization.Lifecycle;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen;
|
||||||
|
import net.minecraft.client.gui.screens.worldselection.WorldOpenFlows;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(WorldOpenFlows.class)
|
||||||
|
public abstract class ExperimentalSettingsPopupMixin {
|
||||||
|
@Inject(method = "confirmWorldCreation", at = @At("HEAD"), cancellable = true)
|
||||||
|
private static void antarchy$skipExperimentalSettingsPopup(Minecraft minecraft, CreateWorldScreen screen, Lifecycle lifecycle, Runnable callback, boolean skipWarnings, CallbackInfo ci) {
|
||||||
|
if (AntarchySettings.experimentalSettingsPopupDisabled() && lifecycle == Lifecycle.experimental() && !skipWarnings) {
|
||||||
|
callback.run();
|
||||||
|
ci.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
"BlockEntityTypeSignMixin",
|
"BlockEntityTypeSignMixin",
|
||||||
"BloodglassMixin",
|
"BloodglassMixin",
|
||||||
"DreamFireBlockMixin",
|
"DreamFireBlockMixin",
|
||||||
|
"DreamSandFallingSpeedMixin",
|
||||||
"DreamSandLowGravityMixin",
|
"DreamSandLowGravityMixin",
|
||||||
"FireVisualBaseFireBlockMixin",
|
"FireVisualBaseFireBlockMixin",
|
||||||
"FireVisualEntityMixin",
|
"FireVisualEntityMixin",
|
||||||
@@ -18,11 +19,13 @@
|
|||||||
"FrogVariantBootstrapMixin",
|
"FrogVariantBootstrapMixin",
|
||||||
"GlowSquidLumenSpawnMixin",
|
"GlowSquidLumenSpawnMixin",
|
||||||
"GlowVinesUnderLeavesMixin",
|
"GlowVinesUnderLeavesMixin",
|
||||||
|
"ExperimentalSettingsLevelSummaryMixin",
|
||||||
"NightmareSwordDamageMixin",
|
"NightmareSwordDamageMixin",
|
||||||
"PotionBrewingMixin",
|
"PotionBrewingMixin",
|
||||||
"VillagerTradesMixin",
|
"VillagerTradesMixin",
|
||||||
"WaterlilyLumenMixin",
|
"WaterlilyLumenMixin",
|
||||||
"ServerPlayerGameModeMixin",
|
"ServerPlayerGameModeMixin",
|
||||||
|
"SpongeAntiwaterMixin",
|
||||||
"SquidzookaEnchantMixin",
|
"SquidzookaEnchantMixin",
|
||||||
"SquidzookaMultishotMixin",
|
"SquidzookaMultishotMixin",
|
||||||
"gravity.AbstractArrowGravityMixin",
|
"gravity.AbstractArrowGravityMixin",
|
||||||
@@ -61,6 +64,7 @@
|
|||||||
"client.ElytraModelAccessor",
|
"client.ElytraModelAccessor",
|
||||||
"client.FrogRendererElythiaMixin",
|
"client.FrogRendererElythiaMixin",
|
||||||
"client.GameRendererSwingThroughGrassMixin",
|
"client.GameRendererSwingThroughGrassMixin",
|
||||||
|
"client.ExperimentalSettingsPopupMixin",
|
||||||
"client.KrakensGraspChargePoseMixin",
|
"client.KrakensGraspChargePoseMixin",
|
||||||
"client.LightningBoltRendererMixin",
|
"client.LightningBoltRendererMixin",
|
||||||
"client.MountedVehicleCameraMixin",
|
"client.MountedVehicleCameraMixin",
|
||||||
|
|||||||
@@ -924,6 +924,9 @@
|
|||||||
"subtitles.antarchy.stink_bug_fart": "Stinkwanze furzt",
|
"subtitles.antarchy.stink_bug_fart": "Stinkwanze furzt",
|
||||||
"subtitles.antarchy.stink_bug_idle": "Stinkwanze ist zu hören",
|
"subtitles.antarchy.stink_bug_idle": "Stinkwanze ist zu hören",
|
||||||
"subtitles.antarchy.rolly_polly_idle": "Rollassel ist zu hören",
|
"subtitles.antarchy.rolly_polly_idle": "Rollassel ist zu hören",
|
||||||
|
"subtitles.antarchy.rolly_polly_wheel_mode": "Rollassel rollt sich ein",
|
||||||
|
"subtitles.antarchy.rolly_polly_normal_mode": "Rollassel rollt sich aus",
|
||||||
|
"subtitles.antarchy.rolly_polly_roll": "Rollassel rollt",
|
||||||
"subtitles.antarchy.hercules_beetle_idle": "Herkuleskäfer ist zu hören",
|
"subtitles.antarchy.hercules_beetle_idle": "Herkuleskäfer ist zu hören",
|
||||||
"subtitles.antarchy.hercules_beetle_hurt": "Herkuleskäfer wird verletzt",
|
"subtitles.antarchy.hercules_beetle_hurt": "Herkuleskäfer wird verletzt",
|
||||||
"subtitles.antarchy.hercules_beetle_attack": "Herkuleskäfer greift an",
|
"subtitles.antarchy.hercules_beetle_attack": "Herkuleskäfer greift an",
|
||||||
|
|||||||
@@ -925,6 +925,9 @@
|
|||||||
"subtitles.antarchy.stink_bug_fart": "Stink Bug farts",
|
"subtitles.antarchy.stink_bug_fart": "Stink Bug farts",
|
||||||
"subtitles.antarchy.stink_bug_idle": "Stink Bug idles",
|
"subtitles.antarchy.stink_bug_idle": "Stink Bug idles",
|
||||||
"subtitles.antarchy.rolly_polly_idle": "Rolly Polly idles",
|
"subtitles.antarchy.rolly_polly_idle": "Rolly Polly idles",
|
||||||
|
"subtitles.antarchy.rolly_polly_wheel_mode": "Rolly Polly curls up",
|
||||||
|
"subtitles.antarchy.rolly_polly_normal_mode": "Rolly Polly uncurls",
|
||||||
|
"subtitles.antarchy.rolly_polly_roll": "Rolly Polly rolls",
|
||||||
"subtitles.antarchy.hercules_beetle_idle": "Hercules Beetle idles",
|
"subtitles.antarchy.hercules_beetle_idle": "Hercules Beetle idles",
|
||||||
"subtitles.antarchy.hercules_beetle_hurt": "Hercules Beetle hurts",
|
"subtitles.antarchy.hercules_beetle_hurt": "Hercules Beetle hurts",
|
||||||
"subtitles.antarchy.hercules_beetle_attack": "Hercules Beetle attacks",
|
"subtitles.antarchy.hercules_beetle_attack": "Hercules Beetle attacks",
|
||||||
|
|||||||
@@ -924,6 +924,9 @@
|
|||||||
"subtitles.antarchy.stink_bug_fart": "Chinche apestosa se tira un pedo",
|
"subtitles.antarchy.stink_bug_fart": "Chinche apestosa se tira un pedo",
|
||||||
"subtitles.antarchy.stink_bug_idle": "Chinche apestosa hace ruido",
|
"subtitles.antarchy.stink_bug_idle": "Chinche apestosa hace ruido",
|
||||||
"subtitles.antarchy.rolly_polly_idle": "Cochinilla hace ruido",
|
"subtitles.antarchy.rolly_polly_idle": "Cochinilla hace ruido",
|
||||||
|
"subtitles.antarchy.rolly_polly_wheel_mode": "La cochinilla se enrolla",
|
||||||
|
"subtitles.antarchy.rolly_polly_normal_mode": "La cochinilla se desenrolla",
|
||||||
|
"subtitles.antarchy.rolly_polly_roll": "La cochinilla rueda",
|
||||||
"subtitles.antarchy.hercules_beetle_idle": "Escarabajo hércules hace ruido",
|
"subtitles.antarchy.hercules_beetle_idle": "Escarabajo hércules hace ruido",
|
||||||
"subtitles.antarchy.hercules_beetle_hurt": "Escarabajo hércules recibe daño",
|
"subtitles.antarchy.hercules_beetle_hurt": "Escarabajo hércules recibe daño",
|
||||||
"subtitles.antarchy.hercules_beetle_attack": "Escarabajo hércules ataca",
|
"subtitles.antarchy.hercules_beetle_attack": "Escarabajo hércules ataca",
|
||||||
|
|||||||
@@ -924,6 +924,9 @@
|
|||||||
"subtitles.antarchy.stink_bug_fart": "Punaise puante pète",
|
"subtitles.antarchy.stink_bug_fart": "Punaise puante pète",
|
||||||
"subtitles.antarchy.stink_bug_idle": "Punaise puante se fait entendre",
|
"subtitles.antarchy.stink_bug_idle": "Punaise puante se fait entendre",
|
||||||
"subtitles.antarchy.rolly_polly_idle": "Cloporte se fait entendre",
|
"subtitles.antarchy.rolly_polly_idle": "Cloporte se fait entendre",
|
||||||
|
"subtitles.antarchy.rolly_polly_wheel_mode": "Le cloporte s'enroule",
|
||||||
|
"subtitles.antarchy.rolly_polly_normal_mode": "Le cloporte se déroule",
|
||||||
|
"subtitles.antarchy.rolly_polly_roll": "Le cloporte roule",
|
||||||
"subtitles.antarchy.hercules_beetle_idle": "Scarabée Hercule se fait entendre",
|
"subtitles.antarchy.hercules_beetle_idle": "Scarabée Hercule se fait entendre",
|
||||||
"subtitles.antarchy.hercules_beetle_hurt": "Scarabée Hercule est blessé",
|
"subtitles.antarchy.hercules_beetle_hurt": "Scarabée Hercule est blessé",
|
||||||
"subtitles.antarchy.hercules_beetle_attack": "Scarabée Hercule attaque",
|
"subtitles.antarchy.hercules_beetle_attack": "Scarabée Hercule attaque",
|
||||||
|
|||||||
@@ -924,6 +924,9 @@
|
|||||||
"subtitles.antarchy.stink_bug_fart": "La cimice puzzolente scoreggia",
|
"subtitles.antarchy.stink_bug_fart": "La cimice puzzolente scoreggia",
|
||||||
"subtitles.antarchy.stink_bug_idle": "La cimice puzzolente emette un verso",
|
"subtitles.antarchy.stink_bug_idle": "La cimice puzzolente emette un verso",
|
||||||
"subtitles.antarchy.rolly_polly_idle": "Il porcellino di terra emette un verso",
|
"subtitles.antarchy.rolly_polly_idle": "Il porcellino di terra emette un verso",
|
||||||
|
"subtitles.antarchy.rolly_polly_wheel_mode": "Il porcellino di terra si arrotola",
|
||||||
|
"subtitles.antarchy.rolly_polly_normal_mode": "Il porcellino di terra si srotola",
|
||||||
|
"subtitles.antarchy.rolly_polly_roll": "Il porcellino di terra rotola",
|
||||||
"subtitles.antarchy.hercules_beetle_idle": "Lo scarabeo Ercole emette un verso",
|
"subtitles.antarchy.hercules_beetle_idle": "Lo scarabeo Ercole emette un verso",
|
||||||
"subtitles.antarchy.hercules_beetle_hurt": "Lo scarabeo Ercole si ferisce",
|
"subtitles.antarchy.hercules_beetle_hurt": "Lo scarabeo Ercole si ferisce",
|
||||||
"subtitles.antarchy.hercules_beetle_attack": "Lo scarabeo Ercole attacca",
|
"subtitles.antarchy.hercules_beetle_attack": "Lo scarabeo Ercole attacca",
|
||||||
|
|||||||
@@ -924,6 +924,9 @@
|
|||||||
"subtitles.antarchy.stink_bug_fart": "カメムシが屁をする",
|
"subtitles.antarchy.stink_bug_fart": "カメムシが屁をする",
|
||||||
"subtitles.antarchy.stink_bug_idle": "カメムシが鳴く",
|
"subtitles.antarchy.stink_bug_idle": "カメムシが鳴く",
|
||||||
"subtitles.antarchy.rolly_polly_idle": "ダンゴムシが鳴く",
|
"subtitles.antarchy.rolly_polly_idle": "ダンゴムシが鳴く",
|
||||||
|
"subtitles.antarchy.rolly_polly_wheel_mode": "ダンゴムシが丸まる",
|
||||||
|
"subtitles.antarchy.rolly_polly_normal_mode": "ダンゴムシが伸びる",
|
||||||
|
"subtitles.antarchy.rolly_polly_roll": "ダンゴムシが転がる",
|
||||||
"subtitles.antarchy.hercules_beetle_idle": "ヘラクレスオオカブトが鳴く",
|
"subtitles.antarchy.hercules_beetle_idle": "ヘラクレスオオカブトが鳴く",
|
||||||
"subtitles.antarchy.hercules_beetle_hurt": "ヘラクレスオオカブトが傷つく",
|
"subtitles.antarchy.hercules_beetle_hurt": "ヘラクレスオオカブトが傷つく",
|
||||||
"subtitles.antarchy.hercules_beetle_attack": "ヘラクレスオオカブトが攻撃する",
|
"subtitles.antarchy.hercules_beetle_attack": "ヘラクレスオオカブトが攻撃する",
|
||||||
|
|||||||
@@ -924,6 +924,9 @@
|
|||||||
"subtitles.antarchy.stink_bug_fart": "노린재 방귀를 뀝니다",
|
"subtitles.antarchy.stink_bug_fart": "노린재 방귀를 뀝니다",
|
||||||
"subtitles.antarchy.stink_bug_idle": "노린재 소리를 냅니다",
|
"subtitles.antarchy.stink_bug_idle": "노린재 소리를 냅니다",
|
||||||
"subtitles.antarchy.rolly_polly_idle": "공벌레 소리를 냅니다",
|
"subtitles.antarchy.rolly_polly_idle": "공벌레 소리를 냅니다",
|
||||||
|
"subtitles.antarchy.rolly_polly_wheel_mode": "공벌레가 몸을 맙니다",
|
||||||
|
"subtitles.antarchy.rolly_polly_normal_mode": "공벌레가 몸을 폅니다",
|
||||||
|
"subtitles.antarchy.rolly_polly_roll": "공벌레가 구릅니다",
|
||||||
"subtitles.antarchy.hercules_beetle_idle": "헤라클레스장수풍뎅이 소리를 냅니다",
|
"subtitles.antarchy.hercules_beetle_idle": "헤라클레스장수풍뎅이 소리를 냅니다",
|
||||||
"subtitles.antarchy.hercules_beetle_hurt": "헤라클레스장수풍뎅이 다칩니다",
|
"subtitles.antarchy.hercules_beetle_hurt": "헤라클레스장수풍뎅이 다칩니다",
|
||||||
"subtitles.antarchy.hercules_beetle_attack": "헤라클레스장수풍뎅이 공격합니다",
|
"subtitles.antarchy.hercules_beetle_attack": "헤라클레스장수풍뎅이 공격합니다",
|
||||||
|
|||||||
@@ -924,6 +924,9 @@
|
|||||||
"subtitles.antarchy.stink_bug_fart": "Percevejo-fedorento solta pum",
|
"subtitles.antarchy.stink_bug_fart": "Percevejo-fedorento solta pum",
|
||||||
"subtitles.antarchy.stink_bug_idle": "Percevejo-fedorento faz barulho",
|
"subtitles.antarchy.stink_bug_idle": "Percevejo-fedorento faz barulho",
|
||||||
"subtitles.antarchy.rolly_polly_idle": "Tatuzinho-de-jardim faz barulho",
|
"subtitles.antarchy.rolly_polly_idle": "Tatuzinho-de-jardim faz barulho",
|
||||||
|
"subtitles.antarchy.rolly_polly_wheel_mode": "Tatuzinho-de-jardim se enrola",
|
||||||
|
"subtitles.antarchy.rolly_polly_normal_mode": "Tatuzinho-de-jardim se desenrola",
|
||||||
|
"subtitles.antarchy.rolly_polly_roll": "Tatuzinho-de-jardim rola",
|
||||||
"subtitles.antarchy.hercules_beetle_idle": "Besouro-hércules faz barulho",
|
"subtitles.antarchy.hercules_beetle_idle": "Besouro-hércules faz barulho",
|
||||||
"subtitles.antarchy.hercules_beetle_hurt": "Besouro-hércules se machuca",
|
"subtitles.antarchy.hercules_beetle_hurt": "Besouro-hércules se machuca",
|
||||||
"subtitles.antarchy.hercules_beetle_attack": "Besouro-hércules ataca",
|
"subtitles.antarchy.hercules_beetle_attack": "Besouro-hércules ataca",
|
||||||
|
|||||||
@@ -924,6 +924,9 @@
|
|||||||
"subtitles.antarchy.stink_bug_fart": "臭屁虫放屁",
|
"subtitles.antarchy.stink_bug_fart": "臭屁虫放屁",
|
||||||
"subtitles.antarchy.stink_bug_idle": "臭屁虫发出动静",
|
"subtitles.antarchy.stink_bug_idle": "臭屁虫发出动静",
|
||||||
"subtitles.antarchy.rolly_polly_idle": "鼠妇发出动静",
|
"subtitles.antarchy.rolly_polly_idle": "鼠妇发出动静",
|
||||||
|
"subtitles.antarchy.rolly_polly_wheel_mode": "鼠妇蜷缩起来",
|
||||||
|
"subtitles.antarchy.rolly_polly_normal_mode": "鼠妇展开身体",
|
||||||
|
"subtitles.antarchy.rolly_polly_roll": "鼠妇滚动",
|
||||||
"subtitles.antarchy.hercules_beetle_idle": "赫拉克勒斯甲虫发出动静",
|
"subtitles.antarchy.hercules_beetle_idle": "赫拉克勒斯甲虫发出动静",
|
||||||
"subtitles.antarchy.hercules_beetle_hurt": "赫拉克勒斯甲虫受伤",
|
"subtitles.antarchy.hercules_beetle_hurt": "赫拉克勒斯甲虫受伤",
|
||||||
"subtitles.antarchy.hercules_beetle_attack": "赫拉克勒斯甲虫攻击",
|
"subtitles.antarchy.hercules_beetle_attack": "赫拉克勒斯甲虫攻击",
|
||||||
|
|||||||
@@ -924,6 +924,9 @@
|
|||||||
"subtitles.antarchy.stink_bug_fart": "臭屁蟲放屁",
|
"subtitles.antarchy.stink_bug_fart": "臭屁蟲放屁",
|
||||||
"subtitles.antarchy.stink_bug_idle": "臭屁蟲發出動靜",
|
"subtitles.antarchy.stink_bug_idle": "臭屁蟲發出動靜",
|
||||||
"subtitles.antarchy.rolly_polly_idle": "鼠婦發出動靜",
|
"subtitles.antarchy.rolly_polly_idle": "鼠婦發出動靜",
|
||||||
|
"subtitles.antarchy.rolly_polly_wheel_mode": "鼠婦蜷縮起來",
|
||||||
|
"subtitles.antarchy.rolly_polly_normal_mode": "鼠婦展開身體",
|
||||||
|
"subtitles.antarchy.rolly_polly_roll": "鼠婦滾動",
|
||||||
"subtitles.antarchy.hercules_beetle_idle": "赫拉克勒斯甲蟲發出動靜",
|
"subtitles.antarchy.hercules_beetle_idle": "赫拉克勒斯甲蟲發出動靜",
|
||||||
"subtitles.antarchy.hercules_beetle_hurt": "赫拉克勒斯甲蟲受傷",
|
"subtitles.antarchy.hercules_beetle_hurt": "赫拉克勒斯甲蟲受傷",
|
||||||
"subtitles.antarchy.hercules_beetle_attack": "赫拉克勒斯甲蟲攻擊",
|
"subtitles.antarchy.hercules_beetle_attack": "赫拉克勒斯甲蟲攻擊",
|
||||||
|
|||||||
@@ -660,6 +660,30 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"rolly_polly_wheel_mode": {
|
||||||
|
"subtitle": "subtitles.antarchy.rolly_polly_wheel_mode",
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/rolly_polly/wheel_mode"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rolly_polly_normal_mode": {
|
||||||
|
"subtitle": "subtitles.antarchy.rolly_polly_normal_mode",
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/rolly_polly/nromal_mode"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rolly_polly_roll": {
|
||||||
|
"subtitle": "subtitles.antarchy.rolly_polly_roll",
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/rolly_polly/roll1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"thoraxis_nightmare_wastes_ambient": {
|
"thoraxis_nightmare_wastes_ambient": {
|
||||||
"subtitle": "subtitles.antarchy.thoraxis_nightmare_wastes_ambient",
|
"subtitle": "subtitles.antarchy.thoraxis_nightmare_wastes_ambient",
|
||||||
"sounds": [
|
"sounds": [
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
+5
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"animation": {
|
||||||
|
"frametime": 7
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:entity",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "antarchy:raw_bug_meat",
|
||||||
|
"functions": [
|
||||||
|
{
|
||||||
|
"function": "minecraft:set_count",
|
||||||
|
"count": {
|
||||||
|
"type": "minecraft:uniform",
|
||||||
|
"min": 1.0,
|
||||||
|
"max": 2.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "minecraft:enchanted_count_increase",
|
||||||
|
"enchantment": "minecraft:looting",
|
||||||
|
"count": {
|
||||||
|
"type": "minecraft:uniform",
|
||||||
|
"min": 0.0,
|
||||||
|
"max": 1.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:killed_by_player"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"random_sequence": "antarchy:entities/bed_bug"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"antarchy:antiwater",
|
||||||
|
"antarchy:flowing_antiwater"
|
||||||
|
]
|
||||||
|
}
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"type": "minecraft:random_patch",
|
"type": "minecraft:random_patch",
|
||||||
"config": {
|
"config": {
|
||||||
"tries": 6,
|
"tries": 12,
|
||||||
"xz_spread": 3,
|
"xz_spread": 4,
|
||||||
"y_spread": 1,
|
"y_spread": 1,
|
||||||
"feature": "antarchy:cornea_stalk_single"
|
"feature": "antarchy:cornea_stalk_single"
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"type": "minecraft:random_patch",
|
"type": "minecraft:random_patch",
|
||||||
"config": {
|
"config": {
|
||||||
"tries": 6,
|
"tries": 12,
|
||||||
"xz_spread": 3,
|
"xz_spread": 4,
|
||||||
"y_spread": 1,
|
"y_spread": 1,
|
||||||
"feature": "antarchy:patch_ceiling_cornea_stalk_single"
|
"feature": "antarchy:patch_ceiling_cornea_stalk_single"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"placement": [
|
"placement": [
|
||||||
{
|
{
|
||||||
"type": "minecraft:rarity_filter",
|
"type": "minecraft:rarity_filter",
|
||||||
"chance": 36
|
"chance": 144
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "minecraft:in_square"
|
"type": "minecraft:in_square"
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
"placement": [
|
"placement": [
|
||||||
{
|
{
|
||||||
"type": "minecraft:rarity_filter",
|
"type": "minecraft:rarity_filter",
|
||||||
"chance": 14
|
"chance": 56
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "minecraft:in_square"
|
"type": "minecraft:in_square"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
"antarchy:hercules_beetle",
|
"antarchy:hercules_beetle",
|
||||||
"antarchy:creeping_horror",
|
"antarchy:creeping_horror",
|
||||||
"antarchy:lurking_terror",
|
"antarchy:lurking_terror",
|
||||||
|
"antarchy:rolly_polly",
|
||||||
"antarchy:scorpion",
|
"antarchy:scorpion",
|
||||||
"antarchy:emperor_scorpion"
|
"antarchy:emperor_scorpion"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -180,6 +180,8 @@ public final class AntarchyConfigModuleFabric {
|
|||||||
|| name.equals("glowingTorchflowers")
|
|| name.equals("glowingTorchflowers")
|
||||||
|| name.equals("glowVinesUnderLeaves")
|
|| name.equals("glowVinesUnderLeaves")
|
||||||
|| name.equals("swingThroughGrassEnabled")
|
|| name.equals("swingThroughGrassEnabled")
|
||||||
|
|| name.equals("fabricKeybindingConflictFixEnabled")
|
||||||
|
|| name.equals("experimentalSettingsPopupDisabled")
|
||||||
|| name.equals("entitySpecificFireOverlayEnabled")
|
|| name.equals("entitySpecificFireOverlayEnabled")
|
||||||
|| name.equals("dreamSandEnabled")
|
|| name.equals("dreamSandEnabled")
|
||||||
|| name.startsWith("dreamSand")
|
|| name.startsWith("dreamSand")
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ public final class AntarchyFabric implements ModInitializer {
|
|||||||
BiomeSelectors.tag(GOLDEN_APPLE_COW_SPAWN_BIOMES),
|
BiomeSelectors.tag(GOLDEN_APPLE_COW_SPAWN_BIOMES),
|
||||||
net.minecraft.world.entity.MobCategory.CREATURE,
|
net.minecraft.world.entity.MobCategory.CREATURE,
|
||||||
AntarchyFabricEntities.GOLDEN_APPLE_COW.get(),
|
AntarchyFabricEntities.GOLDEN_APPLE_COW.get(),
|
||||||
3, 1, 3
|
1, 1, 3
|
||||||
);
|
);
|
||||||
BiomeModifications.addSpawn(
|
BiomeModifications.addSpawn(
|
||||||
BiomeSelectors.tag(FLYING_SQUIRREL_SPAWN_BIOMES),
|
BiomeSelectors.tag(FLYING_SQUIRREL_SPAWN_BIOMES),
|
||||||
|
|||||||
@@ -269,7 +269,10 @@ public final class AntarchyFabricContent {
|
|||||||
AntarchyFabricSounds.JUMPY_BUG_JUMP,
|
AntarchyFabricSounds.JUMPY_BUG_JUMP,
|
||||||
AntarchyFabricSounds.SPIT_BUG_HURT,
|
AntarchyFabricSounds.SPIT_BUG_HURT,
|
||||||
AntarchyFabricSounds.SPIT_BUG_SPIT,
|
AntarchyFabricSounds.SPIT_BUG_SPIT,
|
||||||
AntarchyFabricSounds.BRUTALFLY_SPIT
|
AntarchyFabricSounds.BRUTALFLY_SPIT,
|
||||||
|
AntarchyFabricSounds.ROLLY_POLLY_WHEEL_MODE,
|
||||||
|
AntarchyFabricSounds.ROLLY_POLLY_NORMAL_MODE,
|
||||||
|
AntarchyFabricSounds.ROLLY_POLLY_ROLL
|
||||||
);
|
);
|
||||||
|
|
||||||
AntarchyObjects.setOctopusBomb(AntarchyFabricEntities.OCTOPUS_BOMB);
|
AntarchyObjects.setOctopusBomb(AntarchyFabricEntities.OCTOPUS_BOMB);
|
||||||
|
|||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
package com.craisinlord.antarchy.fabric;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.Antarchy;
|
||||||
|
import com.craisinlord.antarchy.fabric.registry.AntarchyFabricItems;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.dispenser.BlockSource;
|
||||||
|
import net.minecraft.core.dispenser.DefaultDispenseItemBehavior;
|
||||||
|
import net.minecraft.core.dispenser.DispenseItemBehavior;
|
||||||
|
import net.minecraft.world.entity.EntityType;
|
||||||
|
import net.minecraft.world.entity.MobSpawnType;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.Items;
|
||||||
|
import net.minecraft.world.item.SpawnEggItem;
|
||||||
|
import net.minecraft.world.level.block.DispenserBlock;
|
||||||
|
import net.minecraft.world.level.gameevent.GameEvent;
|
||||||
|
|
||||||
|
public final class AntarchyFabricDispenserBehaviors {
|
||||||
|
private static final DispenseItemBehavior SPAWN_EGG_BEHAVIOR = new DefaultDispenseItemBehavior() {
|
||||||
|
@Override
|
||||||
|
public ItemStack execute(BlockSource source, ItemStack stack) {
|
||||||
|
Direction direction = source.state().getValue(DispenserBlock.FACING);
|
||||||
|
EntityType<?> entityType = ((SpawnEggItem) stack.getItem()).getType(stack);
|
||||||
|
|
||||||
|
try {
|
||||||
|
entityType.spawn(source.level(), stack, null, source.pos().relative(direction), MobSpawnType.DISPENSER, direction != Direction.UP, false);
|
||||||
|
} catch (Exception exception) {
|
||||||
|
Antarchy.LOGGER.error("Error while dispensing spawn egg from dispenser at {}", source.pos(), exception);
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
stack.shrink(1);
|
||||||
|
source.level().gameEvent(null, GameEvent.ENTITY_PLACE, source.pos());
|
||||||
|
return stack;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private AntarchyFabricDispenserBehaviors() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void register() {
|
||||||
|
registerSpawnEggs();
|
||||||
|
registerPotions();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void registerSpawnEggs() {
|
||||||
|
for (var holder : AntarchyFabricItems.ITEMS.getEntries()) {
|
||||||
|
Item item = holder.get();
|
||||||
|
if (item instanceof SpawnEggItem) {
|
||||||
|
DispenserBlock.registerBehavior(item, SPAWN_EGG_BEHAVIOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void registerPotions() {
|
||||||
|
DispenserBlock.registerProjectileBehavior(Items.SPLASH_POTION);
|
||||||
|
DispenserBlock.registerProjectileBehavior(Items.LINGERING_POTION);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -25,6 +25,7 @@ import net.fabricmc.fabric.api.event.player.AttackEntityCallback;
|
|||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import com.craisinlord.antarchy.content.SquidzookaDispenseBehavior;
|
import com.craisinlord.antarchy.content.SquidzookaDispenseBehavior;
|
||||||
import com.craisinlord.antarchy.content.RpoLauncherDispenseBehavior;
|
import com.craisinlord.antarchy.content.RpoLauncherDispenseBehavior;
|
||||||
|
import com.craisinlord.antarchy.content.SizeRayDispenseBehavior;
|
||||||
import com.craisinlord.antarchy.content.WaterCannonDispenseBehavior;
|
import com.craisinlord.antarchy.content.WaterCannonDispenseBehavior;
|
||||||
import net.minecraft.world.level.block.ComposterBlock;
|
import net.minecraft.world.level.block.ComposterBlock;
|
||||||
import net.minecraft.world.level.block.DispenserBlock;
|
import net.minecraft.world.level.block.DispenserBlock;
|
||||||
@@ -58,6 +59,9 @@ public final class AntarchyFabricEvents {
|
|||||||
DispenserBlock.registerBehavior(AntarchyFabricItems.SQUIDZOOKA.get(), new SquidzookaDispenseBehavior());
|
DispenserBlock.registerBehavior(AntarchyFabricItems.SQUIDZOOKA.get(), new SquidzookaDispenseBehavior());
|
||||||
DispenserBlock.registerBehavior(AntarchyFabricItems.RPO_LAUNCHER.get(), new RpoLauncherDispenseBehavior());
|
DispenserBlock.registerBehavior(AntarchyFabricItems.RPO_LAUNCHER.get(), new RpoLauncherDispenseBehavior());
|
||||||
DispenserBlock.registerBehavior(AntarchyFabricItems.WATER_CANNON.get(), new WaterCannonDispenseBehavior());
|
DispenserBlock.registerBehavior(AntarchyFabricItems.WATER_CANNON.get(), new WaterCannonDispenseBehavior());
|
||||||
|
DispenserBlock.registerBehavior(AntarchyFabricItems.SHRINK_RAY.get(), new SizeRayDispenseBehavior());
|
||||||
|
DispenserBlock.registerBehavior(AntarchyFabricItems.GROWTH_RAY.get(), new SizeRayDispenseBehavior());
|
||||||
|
AntarchyFabricDispenserBehaviors.register();
|
||||||
|
|
||||||
ComposterBlock.COMPOSTABLES.put(AntarchyFabricBlocks.UMBRAL_MOSS_BLOCK.get().asItem(), 0.65f);
|
ComposterBlock.COMPOSTABLES.put(AntarchyFabricBlocks.UMBRAL_MOSS_BLOCK.get().asItem(), 0.65f);
|
||||||
ComposterBlock.COMPOSTABLES.put(AntarchyFabricBlocks.UMBRAL_MOSS_CARPET.get().asItem(), 0.3f);
|
ComposterBlock.COMPOSTABLES.put(AntarchyFabricBlocks.UMBRAL_MOSS_CARPET.get().asItem(), 0.3f);
|
||||||
|
|||||||
+1
-2
@@ -135,7 +135,7 @@ public final class AntarchyFabricClientBootstrap {
|
|||||||
EntityRendererRegistry.register(AntarchyFabricEntities.OURANWOOD_DEER.get(), com.craisinlord.antarchy.content.client.renderer.OuranwoodDeerRenderer::new);
|
EntityRendererRegistry.register(AntarchyFabricEntities.OURANWOOD_DEER.get(), com.craisinlord.antarchy.content.client.renderer.OuranwoodDeerRenderer::new);
|
||||||
EntityRendererRegistry.register(AntarchyFabricEntities.GLIMMER.get(), com.craisinlord.antarchy.content.client.renderer.glimmer.GlimmerRenderer::new);
|
EntityRendererRegistry.register(AntarchyFabricEntities.GLIMMER.get(), com.craisinlord.antarchy.content.client.renderer.glimmer.GlimmerRenderer::new);
|
||||||
EntityRendererRegistry.register(AntarchyFabricEntities.ELKA.get(), com.craisinlord.antarchy.content.client.renderer.ElkaRenderer::new);
|
EntityRendererRegistry.register(AntarchyFabricEntities.ELKA.get(), com.craisinlord.antarchy.content.client.renderer.ElkaRenderer::new);
|
||||||
// EntityRendererRegistry.register(AntarchyFabricEntities.ROLLY_POLLY.get(), RollyPollyRenderer::new);
|
EntityRendererRegistry.register(AntarchyFabricEntities.ROLLY_POLLY.get(), com.craisinlord.antarchy.content.client.renderer.RollyPollyRenderer::new);
|
||||||
EntityRendererRegistry.register(AntarchyFabricEntities.TERMITE.get(), TermiteRenderer::new);
|
EntityRendererRegistry.register(AntarchyFabricEntities.TERMITE.get(), TermiteRenderer::new);
|
||||||
EntityRendererRegistry.register(AntarchyFabricEntities.CREEPING_HORROR.get(), CreepingHorrorRenderer::new);
|
EntityRendererRegistry.register(AntarchyFabricEntities.CREEPING_HORROR.get(), CreepingHorrorRenderer::new);
|
||||||
EntityRendererRegistry.register(AntarchyFabricEntities.LURKING_TERROR.get(), LurkingTerrorRenderer::new);
|
EntityRendererRegistry.register(AntarchyFabricEntities.LURKING_TERROR.get(), LurkingTerrorRenderer::new);
|
||||||
@@ -448,7 +448,6 @@ public final class AntarchyFabricClientBootstrap {
|
|||||||
ScorpionWhipTetherRenderHandler.tick();
|
ScorpionWhipTetherRenderHandler.tick();
|
||||||
DorrieJumpClientHandler.tick();
|
DorrieJumpClientHandler.tick();
|
||||||
HerculesBeetleClientHandler.tick();
|
HerculesBeetleClientHandler.tick();
|
||||||
RollyPollyClientHandler.tick();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
BigBerthaClientHandler.register();
|
BigBerthaClientHandler.register();
|
||||||
|
|||||||
@@ -31,20 +31,12 @@ public final class AntarchyKeyBindings {
|
|||||||
CATEGORY
|
CATEGORY
|
||||||
);
|
);
|
||||||
|
|
||||||
public static final KeyMapping ROLLY_POLLY_ROLL = new KeyMapping(
|
|
||||||
"key.antarchy.rolly_polly_roll",
|
|
||||||
InputConstants.Type.KEYSYM,
|
|
||||||
GLFW.GLFW_KEY_R,
|
|
||||||
CATEGORY
|
|
||||||
);
|
|
||||||
|
|
||||||
private AntarchyKeyBindings() {}
|
private AntarchyKeyBindings() {}
|
||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
KeyBindingHelper.registerKeyBinding(BRUTALFLY_FLAP);
|
KeyBindingHelper.registerKeyBinding(BRUTALFLY_FLAP);
|
||||||
KeyBindingHelper.registerKeyBinding(DORRIE_CHARGE_JUMP);
|
KeyBindingHelper.registerKeyBinding(DORRIE_CHARGE_JUMP);
|
||||||
KeyBindingHelper.registerKeyBinding(HERCULES_BEETLE_CHARGE);
|
KeyBindingHelper.registerKeyBinding(HERCULES_BEETLE_CHARGE);
|
||||||
KeyBindingHelper.registerKeyBinding(ROLLY_POLLY_ROLL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isBrutalflyFlapPressed() {
|
public static boolean isBrutalflyFlapPressed() {
|
||||||
|
|||||||
+40
@@ -0,0 +1,40 @@
|
|||||||
|
package com.craisinlord.antarchy.fabric.client;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.platform.InputConstants;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import net.minecraft.client.KeyMapping;
|
||||||
|
|
||||||
|
public final class KeybindingConflictFixStore {
|
||||||
|
private static final Map<InputConstants.Key, List<KeyMapping>> MAPPINGS = new HashMap<>();
|
||||||
|
|
||||||
|
private KeybindingConflictFixStore() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void add(InputConstants.Key key, KeyMapping mapping) {
|
||||||
|
List<KeyMapping> mappings = MAPPINGS.computeIfAbsent(key, ignored -> new ArrayList<>());
|
||||||
|
if (!mappings.contains(mapping)) {
|
||||||
|
mappings.add(mapping);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void clear() {
|
||||||
|
MAPPINGS.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<KeyMapping> others(InputConstants.Key key, KeyMapping active) {
|
||||||
|
List<KeyMapping> mappings = MAPPINGS.get(key);
|
||||||
|
if (mappings == null || mappings.size() < 2) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
List<KeyMapping> others = new ArrayList<>(mappings.size() - 1);
|
||||||
|
for (KeyMapping mapping : mappings) {
|
||||||
|
if (mapping != active) {
|
||||||
|
others.add(mapping);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return others;
|
||||||
|
}
|
||||||
|
}
|
||||||
-29
@@ -1,29 +0,0 @@
|
|||||||
package com.craisinlord.antarchy.fabric.client;
|
|
||||||
|
|
||||||
import com.craisinlord.antarchy.content.entity.RollyPollyEntity;
|
|
||||||
import com.craisinlord.antarchy.content.network.RollyPollyRollPayload;
|
|
||||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
|
||||||
|
|
||||||
public final class RollyPollyClientHandler {
|
|
||||||
private static boolean wasPressingRoll;
|
|
||||||
|
|
||||||
private RollyPollyClientHandler() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void tick() {
|
|
||||||
Minecraft mc = Minecraft.getInstance();
|
|
||||||
LocalPlayer player = mc.player;
|
|
||||||
if (player == null || mc.screen != null || !(player.getVehicle() instanceof RollyPollyEntity)) {
|
|
||||||
wasPressingRoll = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean pressingRoll = AntarchyKeyBindings.ROLLY_POLLY_ROLL.isDown();
|
|
||||||
if (pressingRoll && !wasPressingRoll) {
|
|
||||||
ClientPlayNetworking.send(new RollyPollyRollPayload());
|
|
||||||
}
|
|
||||||
wasPressingRoll = pressingRoll;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+99
@@ -0,0 +1,99 @@
|
|||||||
|
package com.craisinlord.antarchy.fabric.mixin;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import com.craisinlord.antarchy.content.AntarchyTags;
|
||||||
|
import com.craisinlord.antarchy.content.movement.DreamSandLowGravityAccess;
|
||||||
|
import com.craisinlord.antarchy.fabric.registry.AntarchyFabricBlocks;
|
||||||
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(LivingEntity.class)
|
||||||
|
public abstract class DreamSandMovementMixin {
|
||||||
|
@Inject(method = "jumpFromGround", at = @At("TAIL"))
|
||||||
|
private void antarchy$handleDreamSandJump(CallbackInfo ci) {
|
||||||
|
LivingEntity self = (LivingEntity) (Object) this;
|
||||||
|
if (self.level().isClientSide()) return;
|
||||||
|
|
||||||
|
DreamSandLowGravityAccess access = (DreamSandLowGravityAccess) self;
|
||||||
|
if (!AntarchySettings.dreamSandEnabled() || antarchy$isDreamSandLowGravityBlacklisted(self)) {
|
||||||
|
access.antarchy$clearDreamSandLowGravity();
|
||||||
|
} else if (antarchy$isStandingOnDreamSand(self)) {
|
||||||
|
self.setDeltaMovement(
|
||||||
|
self.getDeltaMovement().x,
|
||||||
|
self.getDeltaMovement().y * AntarchySettings.dreamSandJumpVelocityMultiplier(),
|
||||||
|
self.getDeltaMovement().z
|
||||||
|
);
|
||||||
|
access.antarchy$setDreamSandLowGravityActive(true);
|
||||||
|
access.antarchy$setDreamSandLowGravityTicksRemaining((int) Math.max(1L, Math.round(AntarchySettings.dreamSandEffectDurationSeconds() * 20.0D)));
|
||||||
|
access.antarchy$setDreamSandLandingGraceTicks(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "tick", at = @At("TAIL"))
|
||||||
|
private void antarchy$tickDreamSandLowGravity(CallbackInfo ci) {
|
||||||
|
LivingEntity self = (LivingEntity) (Object) this;
|
||||||
|
if (self.level().isClientSide()) return;
|
||||||
|
|
||||||
|
DreamSandLowGravityAccess access = (DreamSandLowGravityAccess) self;
|
||||||
|
int landingGraceTicks = access.antarchy$getDreamSandLandingGraceTicks();
|
||||||
|
if (landingGraceTicks > 0) {
|
||||||
|
access.antarchy$setDreamSandLandingGraceTicks(landingGraceTicks - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!AntarchySettings.dreamSandEnabled() || antarchy$isDreamSandLowGravityBlacklisted(self) || !access.antarchy$isDreamSandLowGravityActive()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int remainingTicks = access.antarchy$getDreamSandLowGravityTicksRemaining();
|
||||||
|
if (remainingTicks > 0) {
|
||||||
|
access.antarchy$setDreamSandLowGravityTicksRemaining(remainingTicks - 1);
|
||||||
|
}
|
||||||
|
if (access.antarchy$getDreamSandLowGravityTicksRemaining() <= 0) {
|
||||||
|
access.antarchy$clearDreamSandLowGravity();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (antarchy$isOnSolidGround(self)) {
|
||||||
|
access.antarchy$setDreamSandLowGravityActive(false);
|
||||||
|
access.antarchy$setDreamSandLowGravityTicksRemaining(0);
|
||||||
|
access.antarchy$setDreamSandLandingGraceTicks(2);
|
||||||
|
} else if (!self.onGround() && self.getDeltaMovement().y < 0.0D) {
|
||||||
|
self.setDeltaMovement(
|
||||||
|
self.getDeltaMovement().x,
|
||||||
|
self.getDeltaMovement().y * AntarchySettings.dreamSandGravityMultiplier(),
|
||||||
|
self.getDeltaMovement().z
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "causeFallDamage", at = @At("HEAD"), cancellable = true)
|
||||||
|
private void antarchy$handleDreamSandFall(float fallDistance, float multiplier, DamageSource source, CallbackInfoReturnable<Boolean> cir) {
|
||||||
|
LivingEntity self = (LivingEntity) (Object) this;
|
||||||
|
DreamSandLowGravityAccess access = (DreamSandLowGravityAccess) self;
|
||||||
|
if (!AntarchySettings.dreamSandEnabled()
|
||||||
|
|| antarchy$isDreamSandLowGravityBlacklisted(self)
|
||||||
|
|| (!access.antarchy$isDreamSandLowGravityActive() && access.antarchy$getDreamSandLandingGraceTicks() <= 0)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.resetFallDistance();
|
||||||
|
cir.setReturnValue(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean antarchy$isOnSolidGround(LivingEntity livingEntity) {
|
||||||
|
return livingEntity.onGround() && livingEntity.getBlockStateOn().blocksMotion();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean antarchy$isStandingOnDreamSand(LivingEntity livingEntity) {
|
||||||
|
return livingEntity.level().getBlockState(livingEntity.getOnPosLegacy()).is(AntarchyFabricBlocks.DREAM_SAND.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean antarchy$isDreamSandLowGravityBlacklisted(LivingEntity livingEntity) {
|
||||||
|
return livingEntity.getType().is(AntarchyTags.Entities.DREAM_SAND_LOW_GRAVITY_BLACKLIST);
|
||||||
|
}
|
||||||
|
}
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
package com.craisinlord.antarchy.fabric.mixin.client;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import com.craisinlord.antarchy.fabric.client.KeybindingConflictFixStore;
|
||||||
|
import com.mojang.blaze3d.platform.InputConstants;
|
||||||
|
import java.util.Map;
|
||||||
|
import net.minecraft.client.KeyMapping;
|
||||||
|
import org.spongepowered.asm.mixin.Final;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(KeyMapping.class)
|
||||||
|
public abstract class KeybindingConflictFixMixin {
|
||||||
|
@Shadow @Final private static Map<InputConstants.Key, KeyMapping> MAP;
|
||||||
|
@Shadow @Final private static Map<String, KeyMapping> ALL;
|
||||||
|
@Shadow private InputConstants.Key key;
|
||||||
|
@Shadow private boolean isDown;
|
||||||
|
@Shadow private int clickCount;
|
||||||
|
|
||||||
|
@Inject(method = "<init>(Ljava/lang/String;Lcom/mojang/blaze3d/platform/InputConstants$Type;ILjava/lang/String;)V", at = @At("TAIL"))
|
||||||
|
private void antarchy$addInitialMapping(String name, InputConstants.Type type, int key, String category, CallbackInfo ci) {
|
||||||
|
KeybindingConflictFixStore.add(this.key, (KeyMapping) (Object) this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "resetMapping", at = @At("TAIL"))
|
||||||
|
private static void antarchy$rebuildMappings(CallbackInfo ci) {
|
||||||
|
KeybindingConflictFixStore.clear();
|
||||||
|
for (KeyMapping mapping : ALL.values()) {
|
||||||
|
KeybindingConflictFixStore.add(((KeybindingConflictFixMixin) (Object) mapping).key, mapping);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "click", at = @At("TAIL"))
|
||||||
|
private static void antarchy$clickConflicts(InputConstants.Key key, CallbackInfo ci) {
|
||||||
|
if (!AntarchySettings.fabricKeybindingConflictFixEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
KeyMapping active = MAP.get(key);
|
||||||
|
for (KeyMapping mapping : KeybindingConflictFixStore.others(key, active)) {
|
||||||
|
((KeybindingConflictFixMixin) (Object) mapping).antarchy$click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "set", at = @At("TAIL"))
|
||||||
|
private static void antarchy$setConflicts(InputConstants.Key key, boolean down, CallbackInfo ci) {
|
||||||
|
if (!AntarchySettings.fabricKeybindingConflictFixEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
KeyMapping active = MAP.get(key);
|
||||||
|
for (KeyMapping mapping : KeybindingConflictFixStore.others(key, active)) {
|
||||||
|
((KeybindingConflictFixMixin) (Object) mapping).antarchy$setDown(down);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Unique
|
||||||
|
private void antarchy$click() {
|
||||||
|
this.clickCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Unique
|
||||||
|
private void antarchy$setDown(boolean down) {
|
||||||
|
this.isDown = down;
|
||||||
|
}
|
||||||
|
}
|
||||||
-9
@@ -88,7 +88,6 @@ public final class AntarchyFabricNetworking {
|
|||||||
PayloadTypeRegistry.playC2S().register(HerculesBeetleJumpInputPayload.TYPE, HerculesBeetleJumpInputPayload.STREAM_CODEC);
|
PayloadTypeRegistry.playC2S().register(HerculesBeetleJumpInputPayload.TYPE, HerculesBeetleJumpInputPayload.STREAM_CODEC);
|
||||||
PayloadTypeRegistry.playC2S().register(HerculesBeetleMountedAttackPayload.TYPE, HerculesBeetleMountedAttackPayload.STREAM_CODEC);
|
PayloadTypeRegistry.playC2S().register(HerculesBeetleMountedAttackPayload.TYPE, HerculesBeetleMountedAttackPayload.STREAM_CODEC);
|
||||||
PayloadTypeRegistry.playC2S().register(HerculesBeetleMountedChargePayload.TYPE, HerculesBeetleMountedChargePayload.STREAM_CODEC);
|
PayloadTypeRegistry.playC2S().register(HerculesBeetleMountedChargePayload.TYPE, HerculesBeetleMountedChargePayload.STREAM_CODEC);
|
||||||
PayloadTypeRegistry.playC2S().register(com.craisinlord.antarchy.content.network.RollyPollyRollPayload.TYPE, com.craisinlord.antarchy.content.network.RollyPollyRollPayload.STREAM_CODEC);
|
|
||||||
PayloadTypeRegistry.playC2S().register(MultipartAttackPayload.TYPE, MultipartAttackPayload.STREAM_CODEC);
|
PayloadTypeRegistry.playC2S().register(MultipartAttackPayload.TYPE, MultipartAttackPayload.STREAM_CODEC);
|
||||||
PayloadTypeRegistry.playC2S().register(MultipartInteractPayload.TYPE, MultipartInteractPayload.STREAM_CODEC);
|
PayloadTypeRegistry.playC2S().register(MultipartInteractPayload.TYPE, MultipartInteractPayload.STREAM_CODEC);
|
||||||
}
|
}
|
||||||
@@ -116,8 +115,6 @@ public final class AntarchyFabricNetworking {
|
|||||||
context.server().execute(() -> handleHerculesBeetleMountedAttack(context.player(), payload)));
|
context.server().execute(() -> handleHerculesBeetleMountedAttack(context.player(), payload)));
|
||||||
ServerPlayNetworking.registerGlobalReceiver(HerculesBeetleMountedChargePayload.TYPE, (payload, context) ->
|
ServerPlayNetworking.registerGlobalReceiver(HerculesBeetleMountedChargePayload.TYPE, (payload, context) ->
|
||||||
context.server().execute(() -> handleHerculesBeetleMountedCharge(context.player(), payload)));
|
context.server().execute(() -> handleHerculesBeetleMountedCharge(context.player(), payload)));
|
||||||
ServerPlayNetworking.registerGlobalReceiver(com.craisinlord.antarchy.content.network.RollyPollyRollPayload.TYPE, (payload, context) ->
|
|
||||||
context.server().execute(() -> handleRollyPollyRoll(context.player())));
|
|
||||||
ServerPlayNetworking.registerGlobalReceiver(MultipartAttackPayload.TYPE, (payload, context) ->
|
ServerPlayNetworking.registerGlobalReceiver(MultipartAttackPayload.TYPE, (payload, context) ->
|
||||||
context.server().execute(() -> handleMultipartAttack(context.player(), payload)));
|
context.server().execute(() -> handleMultipartAttack(context.player(), payload)));
|
||||||
ServerPlayNetworking.registerGlobalReceiver(MultipartInteractPayload.TYPE, (payload, context) ->
|
ServerPlayNetworking.registerGlobalReceiver(MultipartInteractPayload.TYPE, (payload, context) ->
|
||||||
@@ -397,12 +394,6 @@ public final class AntarchyFabricNetworking {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void handleRollyPollyRoll(ServerPlayer player) {
|
|
||||||
if (player.getVehicle() instanceof com.craisinlord.antarchy.content.entity.RollyPollyEntity rollyPolly) {
|
|
||||||
rollyPolly.handleRollToggle(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void triggerHerculesBeetleImpactShake(int durationTicks) {
|
public static void triggerHerculesBeetleImpactShake(int durationTicks) {
|
||||||
HerculesBeetleImpactShakeClientState.trigger(durationTicks);
|
HerculesBeetleImpactShakeClientState.trigger(durationTicks);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -278,11 +278,11 @@ public final class AntarchyFabricEntities {
|
|||||||
() -> buildAntType(com.craisinlord.antarchy.content.entity.ant.TermiteEntity::new, MobCategory.CREATURE, "termite"));
|
() -> buildAntType(com.craisinlord.antarchy.content.entity.ant.TermiteEntity::new, MobCategory.CREATURE, "termite"));
|
||||||
|
|
||||||
|
|
||||||
// public static final DeferredHolder<EntityType<?>, EntityType<RollyPollyEntity>> ROLLY_POLLY = ENTITY_TYPES.register("rolly_polly",
|
public static final DeferredHolder<EntityType<?>, EntityType<RollyPollyEntity>> ROLLY_POLLY = ENTITY_TYPES.register("rolly_polly",
|
||||||
// () -> EntityType.Builder.of(RollyPollyEntity::new, MobCategory.CREATURE)
|
() -> EntityType.Builder.of(RollyPollyEntity::new, MobCategory.CREATURE)
|
||||||
// .sized(0.95F, 0.85F)
|
.sized(0.95F, 0.85F)
|
||||||
// .clientTrackingRange(10)
|
.clientTrackingRange(10)
|
||||||
// .build("rolly_polly"));
|
.build("rolly_polly"));
|
||||||
|
|
||||||
|
|
||||||
public static final DeferredHolder<EntityType<?>, EntityType<MolewormEntity>> MOLEWORM = ENTITY_TYPES.register("moleworm",
|
public static final DeferredHolder<EntityType<?>, EntityType<MolewormEntity>> MOLEWORM = ENTITY_TYPES.register("moleworm",
|
||||||
|
|||||||
+1
-1
@@ -303,7 +303,7 @@ public final class AntarchyFabricEntityAttributes {
|
|||||||
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.SPIT_BUG.get(), com.craisinlord.antarchy.content.entity.SpitBugEntity.createAttributes().build());
|
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.SPIT_BUG.get(), com.craisinlord.antarchy.content.entity.SpitBugEntity.createAttributes().build());
|
||||||
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.MANTIS.get(), MantisEntity.createAttributes().build());
|
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.MANTIS.get(), MantisEntity.createAttributes().build());
|
||||||
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.ALPHA_MANTIS.get(), AlphaMantisEntity.createAttributes().build());
|
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.ALPHA_MANTIS.get(), AlphaMantisEntity.createAttributes().build());
|
||||||
// FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.ROLLY_POLLY.get(), RollyPollyEntity.createAttributes().build());
|
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.ROLLY_POLLY.get(), RollyPollyEntity.createAttributes().build());
|
||||||
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.TRIFFID.get(), TriffidEntity.createAttributes().build());
|
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.TRIFFID.get(), TriffidEntity.createAttributes().build());
|
||||||
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.LUCID.get(), LucidEntity.createAttributes().build());
|
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.LUCID.get(), LucidEntity.createAttributes().build());
|
||||||
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.SCORPION.get(), ScorpionEntity.createAttributes().build());
|
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.SCORPION.get(), ScorpionEntity.createAttributes().build());
|
||||||
|
|||||||
+2
-2
@@ -1436,8 +1436,8 @@ public final class AntarchyFabricItems {
|
|||||||
() -> new DeferredSpawnEggItem(AntarchyFabricEntities.ALPHA_MANTIS, 0x8FDD6C, 0x2F5D22, new Item.Properties()));
|
() -> new DeferredSpawnEggItem(AntarchyFabricEntities.ALPHA_MANTIS, 0x8FDD6C, 0x2F5D22, new Item.Properties()));
|
||||||
|
|
||||||
|
|
||||||
// public static final DeferredItem<DeferredSpawnEggItem> ROLLY_POLLY_SPAWN_EGG = ITEMS.register("rolly_polly_spawn_egg",
|
public static final DeferredItem<DeferredSpawnEggItem> ROLLY_POLLY_SPAWN_EGG = ITEMS.register("rolly_polly_spawn_egg",
|
||||||
// () -> new DeferredSpawnEggItem(AntarchyFabricEntities.ROLLY_POLLY, 0x7284A3, 0xBCC8DB, new Item.Properties()));
|
() -> new DeferredSpawnEggItem(AntarchyFabricEntities.ROLLY_POLLY, 0x7284A3, 0xBCC8DB, new Item.Properties()));
|
||||||
|
|
||||||
|
|
||||||
public static final DeferredItem<DeferredSpawnEggItem> MOLEVORE_SPAWN_EGG = ITEMS.register("molevore_spawn_egg",
|
public static final DeferredItem<DeferredSpawnEggItem> MOLEVORE_SPAWN_EGG = ITEMS.register("molevore_spawn_egg",
|
||||||
|
|||||||
+3
@@ -635,6 +635,9 @@ public final class AntarchyFabricSounds {
|
|||||||
|
|
||||||
|
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> ROLLY_POLLY_IDLE = registerSoundEvent("rolly_polly_idle");
|
public static final DeferredHolder<SoundEvent, SoundEvent> ROLLY_POLLY_IDLE = registerSoundEvent("rolly_polly_idle");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> ROLLY_POLLY_WHEEL_MODE = registerSoundEvent("rolly_polly_wheel_mode");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> ROLLY_POLLY_NORMAL_MODE = registerSoundEvent("rolly_polly_normal_mode");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> ROLLY_POLLY_ROLL = registerSoundEvent("rolly_polly_roll");
|
||||||
|
|
||||||
|
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> CREEPING_HORROR_GROWL = registerSoundEvent("creeping_horror_growl");
|
public static final DeferredHolder<SoundEvent, SoundEvent> CREEPING_HORROR_GROWL = registerSoundEvent("creeping_horror_growl");
|
||||||
|
|||||||
+1
-1
@@ -294,7 +294,7 @@ public final class AntarchyFabricSpawnPlacements {
|
|||||||
SpawnPlacements.register(AntarchyFabricEntities.CREEPING_HORROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.CreepingHorrorEntity::canSpawn);
|
SpawnPlacements.register(AntarchyFabricEntities.CREEPING_HORROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.CreepingHorrorEntity::canSpawn);
|
||||||
SpawnPlacements.register(AntarchyFabricEntities.LURKING_TERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.LurkingTerrorEntity::canSpawn);
|
SpawnPlacements.register(AntarchyFabricEntities.LURKING_TERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.LurkingTerrorEntity::canSpawn);
|
||||||
SpawnPlacements.register(AntarchyFabricEntities.TERMITE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules);
|
SpawnPlacements.register(AntarchyFabricEntities.TERMITE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules);
|
||||||
// SpawnPlacements.register(AntarchyFabricEntities.ROLLY_POLLY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.RollyPollyEntity::canSpawn);
|
SpawnPlacements.register(AntarchyFabricEntities.ROLLY_POLLY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.RollyPollyEntity::canSpawn);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
"BloodglassEffectMixin",
|
"BloodglassEffectMixin",
|
||||||
"BloodglassRespawnMixin",
|
"BloodglassRespawnMixin",
|
||||||
"DreamCampfireBlockEntityMixin",
|
"DreamCampfireBlockEntityMixin",
|
||||||
|
"DreamSandMovementMixin",
|
||||||
"JumpyBootsFallDamageMixin",
|
"JumpyBootsFallDamageMixin",
|
||||||
"entity.MultipartEntityLevelRegistryMixin",
|
"entity.MultipartEntityLevelRegistryMixin",
|
||||||
"WoodTypeInvoker",
|
"WoodTypeInvoker",
|
||||||
@@ -24,6 +25,7 @@
|
|||||||
"client.DuctTapeInputMixin",
|
"client.DuctTapeInputMixin",
|
||||||
"client.AntiwaterFogMixin",
|
"client.AntiwaterFogMixin",
|
||||||
"client.GravityGunMouseScrollMixin",
|
"client.GravityGunMouseScrollMixin",
|
||||||
|
"client.KeybindingConflictFixMixin",
|
||||||
"client.CrossbowArmPoseMixin",
|
"client.CrossbowArmPoseMixin",
|
||||||
"client.MultipartClientSpawnMixin",
|
"client.MultipartClientSpawnMixin",
|
||||||
"client.MultipartEntityLevelRegistryMixin"
|
"client.MultipartEntityLevelRegistryMixin"
|
||||||
|
|||||||
+6
@@ -124,6 +124,10 @@ public final class AntarchyConfigModuleNeoforge {
|
|||||||
AntarchySettings.setRollyPollyRollSpeedMultiplier(AntarchyMobsConfig.rollyPollyRollSpeedMultiplier());
|
AntarchySettings.setRollyPollyRollSpeedMultiplier(AntarchyMobsConfig.rollyPollyRollSpeedMultiplier());
|
||||||
AntarchySettings.setRollyPollyTumbleDamage(AntarchyMobsConfig.rollyPollyTumbleDamage());
|
AntarchySettings.setRollyPollyTumbleDamage(AntarchyMobsConfig.rollyPollyTumbleDamage());
|
||||||
AntarchySettings.setRollyPollyTameChance(AntarchyMobsConfig.rollyPollyTameChance());
|
AntarchySettings.setRollyPollyTameChance(AntarchyMobsConfig.rollyPollyTameChance());
|
||||||
|
AntarchySettings.setRollyPollyBowlingDamage(AntarchyMobsConfig.rollyPollyBowlingDamage());
|
||||||
|
AntarchySettings.setRollyPollyBowlingKnockback(AntarchyMobsConfig.rollyPollyBowlingKnockback());
|
||||||
|
AntarchySettings.setRollyPollyArmor(AntarchyMobsConfig.rollyPollyArmor());
|
||||||
|
AntarchySettings.setRollyPollyRolledArmorBonus(AntarchyMobsConfig.rollyPollyRolledArmorBonus());
|
||||||
|
|
||||||
AntarchySettings.setTriffidHealth(AntarchyMobsConfig.triffidHealth());
|
AntarchySettings.setTriffidHealth(AntarchyMobsConfig.triffidHealth());
|
||||||
AntarchySettings.setTriffidAttackDamage(AntarchyMobsConfig.triffidAttackDamage());
|
AntarchySettings.setTriffidAttackDamage(AntarchyMobsConfig.triffidAttackDamage());
|
||||||
@@ -390,6 +394,8 @@ public final class AntarchyConfigModuleNeoforge {
|
|||||||
AntarchySettings.setGlowingTorchflowers(AntarchyMiscConfig.glowingTorchflowers());
|
AntarchySettings.setGlowingTorchflowers(AntarchyMiscConfig.glowingTorchflowers());
|
||||||
AntarchySettings.setGlowVinesUnderLeaves(AntarchyMiscConfig.glowVinesUnderLeaves());
|
AntarchySettings.setGlowVinesUnderLeaves(AntarchyMiscConfig.glowVinesUnderLeaves());
|
||||||
AntarchySettings.setSwingThroughGrassEnabled(AntarchyMiscConfig.swingThroughGrassEnabled());
|
AntarchySettings.setSwingThroughGrassEnabled(AntarchyMiscConfig.swingThroughGrassEnabled());
|
||||||
|
AntarchySettings.setFabricKeybindingConflictFixEnabled(AntarchyMiscConfig.fabricKeybindingConflictFixEnabled());
|
||||||
|
AntarchySettings.setExperimentalSettingsPopupDisabled(AntarchyMiscConfig.experimentalSettingsPopupDisabled());
|
||||||
AntarchySettings.setEntitySpecificFireOverlayEnabled(AntarchyMiscConfig.entitySpecificFireOverlayEnabled());
|
AntarchySettings.setEntitySpecificFireOverlayEnabled(AntarchyMiscConfig.entitySpecificFireOverlayEnabled());
|
||||||
|
|
||||||
AntarchySettings.setBloodCrystalArmorShieldRechargeTicks(AntarchyToolsConfig.bloodCrystalArmorShieldRechargeTicks());
|
AntarchySettings.setBloodCrystalArmorShieldRechargeTicks(AntarchyToolsConfig.bloodCrystalArmorShieldRechargeTicks());
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ public final class AntarchyMiscConfig {
|
|||||||
private static final ModConfigSpec.BooleanValue GLOWING_TORCHFLOWERS;
|
private static final ModConfigSpec.BooleanValue GLOWING_TORCHFLOWERS;
|
||||||
private static final ModConfigSpec.BooleanValue GLOW_VINES_UNDER_LEAVES;
|
private static final ModConfigSpec.BooleanValue GLOW_VINES_UNDER_LEAVES;
|
||||||
private static final ModConfigSpec.BooleanValue SWING_THROUGH_GRASS_ENABLED;
|
private static final ModConfigSpec.BooleanValue SWING_THROUGH_GRASS_ENABLED;
|
||||||
|
private static final ModConfigSpec.BooleanValue FABRIC_KEYBINDING_CONFLICT_FIX_ENABLED;
|
||||||
|
private static final ModConfigSpec.BooleanValue EXPERIMENTAL_SETTINGS_POPUP_DISABLED;
|
||||||
private static final ModConfigSpec.BooleanValue ENTITY_SPECIFIC_FIRE_OVERLAY_ENABLED;
|
private static final ModConfigSpec.BooleanValue ENTITY_SPECIFIC_FIRE_OVERLAY_ENABLED;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@@ -140,6 +142,8 @@ public final class AntarchyMiscConfig {
|
|||||||
GLOWING_TORCHFLOWERS = b.comment("Whether fully-grown torchflower blocks emit light.") .define("glowingTorchflowers", true);
|
GLOWING_TORCHFLOWERS = b.comment("Whether fully-grown torchflower blocks emit light.") .define("glowingTorchflowers", true);
|
||||||
GLOW_VINES_UNDER_LEAVES = b.comment("Whether glow vines can be placed and survive when attached under leaf blocks.") .define("glowVinesUnderLeaves", true);
|
GLOW_VINES_UNDER_LEAVES = b.comment("Whether glow vines can be placed and survive when attached under leaf blocks.") .define("glowVinesUnderLeaves", true);
|
||||||
SWING_THROUGH_GRASS_ENABLED = b.comment("If true, empty collision plants like grass do not block melee target picking.") .define("swingThroughGrassEnabled", true);
|
SWING_THROUGH_GRASS_ENABLED = b.comment("If true, empty collision plants like grass do not block melee target picking.") .define("swingThroughGrassEnabled", true);
|
||||||
|
FABRIC_KEYBINDING_CONFLICT_FIX_ENABLED = b.define("fabricKeybindingConflictFixEnabled", true);
|
||||||
|
EXPERIMENTAL_SETTINGS_POPUP_DISABLED = b.define("experimentalSettingsPopupDisabled", true);
|
||||||
ENTITY_SPECIFIC_FIRE_OVERLAY_ENABLED = b.comment("If true, burning entities use soul fire / dream fire overlays where appropriate.") .define("entitySpecificFireOverlayEnabled", true);
|
ENTITY_SPECIFIC_FIRE_OVERLAY_ENABLED = b.comment("If true, burning entities use soul fire / dream fire overlays where appropriate.") .define("entitySpecificFireOverlayEnabled", true);
|
||||||
b.pop();
|
b.pop();
|
||||||
|
|
||||||
@@ -162,6 +166,8 @@ public final class AntarchyMiscConfig {
|
|||||||
static boolean glowingTorchflowers() { return GLOWING_TORCHFLOWERS.get(); }
|
static boolean glowingTorchflowers() { return GLOWING_TORCHFLOWERS.get(); }
|
||||||
static boolean glowVinesUnderLeaves() { return GLOW_VINES_UNDER_LEAVES.get(); }
|
static boolean glowVinesUnderLeaves() { return GLOW_VINES_UNDER_LEAVES.get(); }
|
||||||
static boolean swingThroughGrassEnabled() { return SWING_THROUGH_GRASS_ENABLED.get(); }
|
static boolean swingThroughGrassEnabled() { return SWING_THROUGH_GRASS_ENABLED.get(); }
|
||||||
|
static boolean fabricKeybindingConflictFixEnabled() { return FABRIC_KEYBINDING_CONFLICT_FIX_ENABLED.get(); }
|
||||||
|
static boolean experimentalSettingsPopupDisabled() { return EXPERIMENTAL_SETTINGS_POPUP_DISABLED.get(); }
|
||||||
static boolean entitySpecificFireOverlayEnabled() { return ENTITY_SPECIFIC_FIRE_OVERLAY_ENABLED.get(); }
|
static boolean entitySpecificFireOverlayEnabled() { return ENTITY_SPECIFIC_FIRE_OVERLAY_ENABLED.get(); }
|
||||||
|
|
||||||
static double hushweedSporeLifetimeSeconds() { return HUSHWEED_SPORE_LIFETIME_SECONDS.get(); }
|
static double hushweedSporeLifetimeSeconds() { return HUSHWEED_SPORE_LIFETIME_SECONDS.get(); }
|
||||||
|
|||||||
@@ -108,6 +108,10 @@ public final class AntarchyMobsConfig {
|
|||||||
private static final ModConfigSpec.DoubleValue ROLLY_POLLY_ROLL_SPEED_MULTIPLIER;
|
private static final ModConfigSpec.DoubleValue ROLLY_POLLY_ROLL_SPEED_MULTIPLIER;
|
||||||
private static final ModConfigSpec.DoubleValue ROLLY_POLLY_TUMBLE_DAMAGE;
|
private static final ModConfigSpec.DoubleValue ROLLY_POLLY_TUMBLE_DAMAGE;
|
||||||
private static final ModConfigSpec.IntValue ROLLY_POLLY_TAME_CHANCE;
|
private static final ModConfigSpec.IntValue ROLLY_POLLY_TAME_CHANCE;
|
||||||
|
private static final ModConfigSpec.DoubleValue ROLLY_POLLY_BOWLING_DAMAGE;
|
||||||
|
private static final ModConfigSpec.DoubleValue ROLLY_POLLY_BOWLING_KNOCKBACK;
|
||||||
|
private static final ModConfigSpec.DoubleValue ROLLY_POLLY_ARMOR;
|
||||||
|
private static final ModConfigSpec.DoubleValue ROLLY_POLLY_ROLLED_ARMOR_BONUS;
|
||||||
|
|
||||||
|
|
||||||
// Triffid
|
// Triffid
|
||||||
@@ -414,11 +418,15 @@ public final class AntarchyMobsConfig {
|
|||||||
// Rolly Polly
|
// Rolly Polly
|
||||||
|
|
||||||
b.push("rollyPolly");
|
b.push("rollyPolly");
|
||||||
ROLLY_POLLY_HEALTH = b.comment("Base max health.") .defineInRange("health", 12.0D, 1.0D, 32768.0D);
|
ROLLY_POLLY_HEALTH = b.comment("Base max health.") .defineInRange("health", 25.0D, 1.0D, 32768.0D);
|
||||||
ROLLY_POLLY_MOVEMENT_SPEED = b.comment("Base movement speed.") .defineInRange("movementSpeed", 0.3D, 0.0D, 10.0D);
|
ROLLY_POLLY_MOVEMENT_SPEED = b.comment("Base movement speed.") .defineInRange("movementSpeed", 0.3D, 0.0D, 10.0D);
|
||||||
ROLLY_POLLY_ROLL_SPEED_MULTIPLIER = b.comment("Speed multiplier while rolled up and ridden.") .defineInRange("rollSpeedMultiplier", 2.2D, 0.1D, 20.0D);
|
ROLLY_POLLY_ROLL_SPEED_MULTIPLIER = b.comment("Speed multiplier while rolled up.") .defineInRange("rollSpeedMultiplier", 2.2D, 0.1D, 20.0D);
|
||||||
ROLLY_POLLY_TUMBLE_DAMAGE = b.comment("Damage dealt to a helmetless rider while rolling. 0 disables.") .defineInRange("tumbleDamage", 1.0D, 0.0D, 1024.0D);
|
ROLLY_POLLY_TUMBLE_DAMAGE = b.comment("Unused (riding removed). Retained for config compatibility.") .defineInRange("tumbleDamage", 1.0D, 0.0D, 1024.0D);
|
||||||
ROLLY_POLLY_TAME_CHANCE = b.comment("Taming succeeds with a 1-in-N chance per food item.") .defineInRange("tameChance", 3, 1, 100);
|
ROLLY_POLLY_TAME_CHANCE = b.comment("Taming succeeds with a 1-in-N chance per food item.") .defineInRange("tameChance", 3, 1, 100);
|
||||||
|
ROLLY_POLLY_BOWLING_DAMAGE = b.comment("Damage dealt by a tamed rolly polly's rolling bowling attack.") .defineInRange("bowlingDamage", 3.0D, 0.0D, 1024.0D);
|
||||||
|
ROLLY_POLLY_BOWLING_KNOCKBACK = b.comment("Knockback strength of a tamed rolly polly's rolling bowling attack.") .defineInRange("bowlingKnockback", 0.8D, 0.0D, 20.0D);
|
||||||
|
ROLLY_POLLY_ARMOR = b.comment("Base armor value.") .defineInRange("armor", 2.0D, 0.0D, 100.0D);
|
||||||
|
ROLLY_POLLY_ROLLED_ARMOR_BONUS = b.comment("Additional armor gained while rolled up.") .defineInRange("rolledArmorBonus", 16.0D, 0.0D, 100.0D);
|
||||||
b.pop();
|
b.pop();
|
||||||
|
|
||||||
|
|
||||||
@@ -663,6 +671,10 @@ public final class AntarchyMobsConfig {
|
|||||||
static double rollyPollyRollSpeedMultiplier() { return ROLLY_POLLY_ROLL_SPEED_MULTIPLIER.get(); }
|
static double rollyPollyRollSpeedMultiplier() { return ROLLY_POLLY_ROLL_SPEED_MULTIPLIER.get(); }
|
||||||
static double rollyPollyTumbleDamage() { return ROLLY_POLLY_TUMBLE_DAMAGE.get(); }
|
static double rollyPollyTumbleDamage() { return ROLLY_POLLY_TUMBLE_DAMAGE.get(); }
|
||||||
static int rollyPollyTameChance() { return ROLLY_POLLY_TAME_CHANCE.get(); }
|
static int rollyPollyTameChance() { return ROLLY_POLLY_TAME_CHANCE.get(); }
|
||||||
|
static double rollyPollyBowlingDamage() { return ROLLY_POLLY_BOWLING_DAMAGE.get(); }
|
||||||
|
static double rollyPollyBowlingKnockback() { return ROLLY_POLLY_BOWLING_KNOCKBACK.get(); }
|
||||||
|
static double rollyPollyArmor() { return ROLLY_POLLY_ARMOR.get(); }
|
||||||
|
static double rollyPollyRolledArmorBonus() { return ROLLY_POLLY_ROLLED_ARMOR_BONUS.get(); }
|
||||||
|
|
||||||
static double triffidHealth() { return TRIFFID_HEALTH.get(); }
|
static double triffidHealth() { return TRIFFID_HEALTH.get(); }
|
||||||
static double triffidAttackDamage() { return TRIFFID_ATTACK_DAMAGE.get(); }
|
static double triffidAttackDamage() { return TRIFFID_ATTACK_DAMAGE.get(); }
|
||||||
|
|||||||
@@ -173,7 +173,10 @@ public class AntarchyNeoforge {
|
|||||||
AntarchyNeoforgeSounds.JUMPY_BUG_JUMP,
|
AntarchyNeoforgeSounds.JUMPY_BUG_JUMP,
|
||||||
AntarchyNeoforgeSounds.SPIT_BUG_HURT,
|
AntarchyNeoforgeSounds.SPIT_BUG_HURT,
|
||||||
AntarchyNeoforgeSounds.SPIT_BUG_SPIT,
|
AntarchyNeoforgeSounds.SPIT_BUG_SPIT,
|
||||||
AntarchyNeoforgeSounds.BRUTALFLY_SPIT
|
AntarchyNeoforgeSounds.BRUTALFLY_SPIT,
|
||||||
|
AntarchyNeoforgeSounds.ROLLY_POLLY_WHEEL_MODE,
|
||||||
|
AntarchyNeoforgeSounds.ROLLY_POLLY_NORMAL_MODE,
|
||||||
|
AntarchyNeoforgeSounds.ROLLY_POLLY_ROLL
|
||||||
);
|
);
|
||||||
bindCommonObjects();
|
bindCommonObjects();
|
||||||
ScorpionWhipTetherSync.setSink((player, targetId) -> PacketDistributor.sendToPlayersTrackingEntityAndSelf(
|
ScorpionWhipTetherSync.setSink((player, targetId) -> PacketDistributor.sendToPlayersTrackingEntityAndSelf(
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ public final class AntarchyToolsConfig {
|
|||||||
// Battle Axe
|
// Battle Axe
|
||||||
|
|
||||||
b.push("battleAxe");
|
b.push("battleAxe");
|
||||||
BATTLE_AXE_ATTACK_DAMAGE = b.comment("Attack damage of the Battle Axe.").defineInRange("attackDamage", 44.0D, 0.0D, 4096.0D);
|
BATTLE_AXE_ATTACK_DAMAGE = b.comment("Attack damage of the Battle Axe.").defineInRange("attackDamage", 46.0D, 0.0D, 4096.0D);
|
||||||
BATTLE_AXE_ATTACK_SPEED = b.comment("Attack speed of the Battle Axe.") .defineInRange("attackSpeed", -3.1D, -10.0D, 10.0D);
|
BATTLE_AXE_ATTACK_SPEED = b.comment("Attack speed of the Battle Axe.") .defineInRange("attackSpeed", -3.1D, -10.0D, 10.0D);
|
||||||
b.pop();
|
b.pop();
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ public final class AntarchyToolsConfig {
|
|||||||
b.pop();
|
b.pop();
|
||||||
|
|
||||||
b.push("attitudeAdjuster");
|
b.push("attitudeAdjuster");
|
||||||
ATTITUDE_ADJUSTER_BASE_DAMAGE = b.comment("Base attack damage of the Attitude Adjuster.").defineInRange("baseDamage", 40.0D, 0.0D, 4096.0D);
|
ATTITUDE_ADJUSTER_BASE_DAMAGE = b.comment("Base attack damage of the Attitude Adjuster.").defineInRange("baseDamage", 47.0D, 0.0D, 4096.0D);
|
||||||
ATTITUDE_ADJUSTER_BREAKS_BLOCKS = b.comment("If true, player ground slams can break a small patch of blocks on impact.").define("breaksBlocks", true);
|
ATTITUDE_ADJUSTER_BREAKS_BLOCKS = b.comment("If true, player ground slams can break a small patch of blocks on impact.").define("breaksBlocks", true);
|
||||||
b.pop();
|
b.pop();
|
||||||
|
|
||||||
|
|||||||
-9
@@ -37,14 +37,6 @@ public final class AntarchyKeyBindings {
|
|||||||
CATEGORY
|
CATEGORY
|
||||||
);
|
);
|
||||||
|
|
||||||
public static final KeyMapping ROLLY_POLLY_ROLL = new KeyMapping(
|
|
||||||
"key.antarchy.rolly_polly_roll",
|
|
||||||
KeyConflictContext.IN_GAME,
|
|
||||||
InputConstants.Type.KEYSYM,
|
|
||||||
InputConstants.KEY_R,
|
|
||||||
CATEGORY
|
|
||||||
);
|
|
||||||
|
|
||||||
private AntarchyKeyBindings() {}
|
private AntarchyKeyBindings() {}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
@@ -52,6 +44,5 @@ public final class AntarchyKeyBindings {
|
|||||||
event.register(BRUTALFLY_FLAP);
|
event.register(BRUTALFLY_FLAP);
|
||||||
event.register(DORRIE_CHARGE_JUMP);
|
event.register(DORRIE_CHARGE_JUMP);
|
||||||
event.register(HERCULES_BEETLE_CHARGE);
|
event.register(HERCULES_BEETLE_CHARGE);
|
||||||
event.register(ROLLY_POLLY_ROLL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -139,7 +139,7 @@ public final class AntarchyNeoForgeClient {
|
|||||||
event.registerEntityRenderer(AntarchyNeoforgeEntites.OURANWOOD_DEER.get(), context -> new com.craisinlord.antarchy.content.client.renderer.OuranwoodDeerRenderer(context));
|
event.registerEntityRenderer(AntarchyNeoforgeEntites.OURANWOOD_DEER.get(), context -> new com.craisinlord.antarchy.content.client.renderer.OuranwoodDeerRenderer(context));
|
||||||
event.registerEntityRenderer(AntarchyNeoforgeEntites.GLIMMER.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.glimmer.GlimmerRenderer(context)));
|
event.registerEntityRenderer(AntarchyNeoforgeEntites.GLIMMER.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.glimmer.GlimmerRenderer(context)));
|
||||||
event.registerEntityRenderer(AntarchyNeoforgeEntites.ELKA.get(), context -> new com.craisinlord.antarchy.content.client.renderer.ElkaRenderer(context));
|
event.registerEntityRenderer(AntarchyNeoforgeEntites.ELKA.get(), context -> new com.craisinlord.antarchy.content.client.renderer.ElkaRenderer(context));
|
||||||
// event.registerEntityRenderer(AntarchyNeoforgeEntites.ROLLY_POLLY.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.RollyPollyRenderer(context)));
|
event.registerEntityRenderer(AntarchyNeoforgeEntites.ROLLY_POLLY.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.RollyPollyRenderer(context)));
|
||||||
event.registerEntityRenderer(AntarchyNeoforgeEntites.TERMITE.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.TermiteRenderer(context)));
|
event.registerEntityRenderer(AntarchyNeoforgeEntites.TERMITE.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.TermiteRenderer(context)));
|
||||||
event.registerEntityRenderer(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.CreepingHorrorRenderer(context)));
|
event.registerEntityRenderer(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.CreepingHorrorRenderer(context)));
|
||||||
event.registerEntityRenderer(AntarchyNeoforgeEntites.LURKING_TERROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.LurkingTerrorRenderer(context)));
|
event.registerEntityRenderer(AntarchyNeoforgeEntites.LURKING_TERROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.LurkingTerrorRenderer(context)));
|
||||||
|
|||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
package com.craisinlord.antarchy.neoforge.client;
|
|
||||||
|
|
||||||
import com.craisinlord.antarchy.Antarchy;
|
|
||||||
import com.craisinlord.antarchy.content.entity.RollyPollyEntity;
|
|
||||||
import com.craisinlord.antarchy.content.network.RollyPollyRollPayload;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
|
||||||
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 RollyPollyClientHandler {
|
|
||||||
private static boolean wasPressingRoll;
|
|
||||||
|
|
||||||
private RollyPollyClientHandler() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public static void onClientTick(ClientTickEvent.Post event) {
|
|
||||||
Minecraft mc = Minecraft.getInstance();
|
|
||||||
LocalPlayer player = mc.player;
|
|
||||||
if (player == null || mc.screen != null || !(player.getVehicle() instanceof RollyPollyEntity)) {
|
|
||||||
wasPressingRoll = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean pressingRoll = AntarchyKeyBindings.ROLLY_POLLY_ROLL.isDown();
|
|
||||||
if (pressingRoll && !wasPressingRoll) {
|
|
||||||
PacketDistributor.sendToServer(new RollyPollyRollPayload());
|
|
||||||
}
|
|
||||||
wasPressingRoll = pressingRoll;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-31
@@ -1,31 +0,0 @@
|
|||||||
package com.craisinlord.antarchy.neoforge.network;
|
|
||||||
|
|
||||||
import com.craisinlord.antarchy.content.entity.RollyPollyEntity;
|
|
||||||
import com.craisinlord.antarchy.content.network.RollyPollyRollPayload;
|
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
|
||||||
import net.neoforged.neoforge.network.handling.IPayloadContext;
|
|
||||||
import net.neoforged.neoforge.network.registration.PayloadRegistrar;
|
|
||||||
|
|
||||||
public final class RollyPollyNetworking {
|
|
||||||
private RollyPollyNetworking() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void register(PayloadRegistrar registrar) {
|
|
||||||
registrar.playToServer(
|
|
||||||
RollyPollyRollPayload.TYPE,
|
|
||||||
RollyPollyRollPayload.STREAM_CODEC,
|
|
||||||
RollyPollyNetworking::handleRollToggle
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void handleRollToggle(RollyPollyRollPayload payload, IPayloadContext context) {
|
|
||||||
context.enqueueWork(() -> {
|
|
||||||
if (!(context.player() instanceof ServerPlayer player)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (player.getVehicle() instanceof RollyPollyEntity rollyPolly) {
|
|
||||||
rollyPolly.handleRollToggle(player);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-1
@@ -63,7 +63,7 @@ public class AntarchyNeoforgeCreativeModeTabs {
|
|||||||
event.accept(AntarchyNeoforgeItems.MOLEWORM_SPAWN_EGG.get());
|
event.accept(AntarchyNeoforgeItems.MOLEWORM_SPAWN_EGG.get());
|
||||||
event.accept(AntarchyNeoforgeItems.MANTIS_SPAWN_EGG.get());
|
event.accept(AntarchyNeoforgeItems.MANTIS_SPAWN_EGG.get());
|
||||||
event.accept(AntarchyNeoforgeItems.ALPHA_MANTIS_SPAWN_EGG.get());
|
event.accept(AntarchyNeoforgeItems.ALPHA_MANTIS_SPAWN_EGG.get());
|
||||||
// event.accept(AntarchyNeoforgeItems.ROLLY_POLLY_SPAWN_EGG.get());
|
event.accept(AntarchyNeoforgeItems.ROLLY_POLLY_SPAWN_EGG.get());
|
||||||
event.accept(AntarchyNeoforgeItems.MOLEVORE_SPAWN_EGG.get());
|
event.accept(AntarchyNeoforgeItems.MOLEVORE_SPAWN_EGG.get());
|
||||||
event.accept(AntarchyNeoforgeItems.TRIFFID_SPAWN_EGG.get());
|
event.accept(AntarchyNeoforgeItems.TRIFFID_SPAWN_EGG.get());
|
||||||
event.accept(AntarchyNeoforgeItems.APPLE_COW_SPAWN_EGG.get());
|
event.accept(AntarchyNeoforgeItems.APPLE_COW_SPAWN_EGG.get());
|
||||||
|
|||||||
+5
-5
@@ -107,11 +107,11 @@ public final class AntarchyNeoforgeEntites {
|
|||||||
.sized(4.25F, 3.35F)
|
.sized(4.25F, 3.35F)
|
||||||
.clientTrackingRange(10)
|
.clientTrackingRange(10)
|
||||||
.build("alpha_mantis"));
|
.build("alpha_mantis"));
|
||||||
// public static final DeferredHolder<EntityType<?>, EntityType<RollyPollyEntity>> ROLLY_POLLY = ENTITY_TYPES.register("rolly_polly",
|
public static final DeferredHolder<EntityType<?>, EntityType<RollyPollyEntity>> ROLLY_POLLY = ENTITY_TYPES.register("rolly_polly",
|
||||||
// () -> EntityType.Builder.of(RollyPollyEntity::new, MobCategory.CREATURE)
|
() -> EntityType.Builder.of(RollyPollyEntity::new, MobCategory.CREATURE)
|
||||||
// .sized(0.95F, 0.85F)
|
.sized(0.95F, 0.85F)
|
||||||
// .clientTrackingRange(10)
|
.clientTrackingRange(10)
|
||||||
// .build("rolly_polly"));
|
.build("rolly_polly"));
|
||||||
public static final DeferredHolder<EntityType<?>, EntityType<OuranwoodBoatEntity>> OURANWOOD_BOAT_ENTITY = ENTITY_TYPES.register("ouranwood_boat",
|
public static final DeferredHolder<EntityType<?>, EntityType<OuranwoodBoatEntity>> OURANWOOD_BOAT_ENTITY = ENTITY_TYPES.register("ouranwood_boat",
|
||||||
() -> EntityType.Builder.<OuranwoodBoatEntity>of(OuranwoodBoatEntity::new, MobCategory.MISC)
|
() -> EntityType.Builder.<OuranwoodBoatEntity>of(OuranwoodBoatEntity::new, MobCategory.MISC)
|
||||||
.sized(1.375F, 0.5625F)
|
.sized(1.375F, 0.5625F)
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ public class AntarchyNeoforgeEntityAttributes {
|
|||||||
AntarchySettings.termiteMovementSpeed(),
|
AntarchySettings.termiteMovementSpeed(),
|
||||||
AntarchySettings.termiteAttackDamage()
|
AntarchySettings.termiteAttackDamage()
|
||||||
).build());
|
).build());
|
||||||
// event.put(AntarchyNeoforgeEntites.ROLLY_POLLY.get(), RollyPollyEntity.createAttributes().build());
|
event.put(AntarchyNeoforgeEntites.ROLLY_POLLY.get(), RollyPollyEntity.createAttributes().build());
|
||||||
event.put(AntarchyNeoforgeEntites.DR_TRAYAURUS.get(), Villager.createAttributes().build());
|
event.put(AntarchyNeoforgeEntites.DR_TRAYAURUS.get(), Villager.createAttributes().build());
|
||||||
event.put(AntarchyNeoforgeEntites.CLOUD_SHARK.get(), CloudSharkEntity.createAttributes().build());
|
event.put(AntarchyNeoforgeEntites.CLOUD_SHARK.get(), CloudSharkEntity.createAttributes().build());
|
||||||
event.put(AntarchyNeoforgeEntites.KRAKEN.get(), KrakenEntity.createAttributes().build());
|
event.put(AntarchyNeoforgeEntites.KRAKEN.get(), KrakenEntity.createAttributes().build());
|
||||||
|
|||||||
+2
-2
@@ -711,8 +711,8 @@ public final class AntarchyNeoforgeItems {
|
|||||||
() -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.MANTIS, 0xF8F8F2, 0x63B44A, new Item.Properties()));
|
() -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.MANTIS, 0xF8F8F2, 0x63B44A, new Item.Properties()));
|
||||||
public static final DeferredItem<DeferredSpawnEggItem> ALPHA_MANTIS_SPAWN_EGG = ITEMS.register("alpha_mantis_spawn_egg",
|
public static final DeferredItem<DeferredSpawnEggItem> ALPHA_MANTIS_SPAWN_EGG = ITEMS.register("alpha_mantis_spawn_egg",
|
||||||
() -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.ALPHA_MANTIS, 0x8FDD6C, 0x2F5D22, new Item.Properties().rarity(Rarity.UNCOMMON)));
|
() -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.ALPHA_MANTIS, 0x8FDD6C, 0x2F5D22, new Item.Properties().rarity(Rarity.UNCOMMON)));
|
||||||
// public static final DeferredItem<DeferredSpawnEggItem> ROLLY_POLLY_SPAWN_EGG = ITEMS.register("rolly_polly_spawn_egg",
|
public static final DeferredItem<DeferredSpawnEggItem> ROLLY_POLLY_SPAWN_EGG = ITEMS.register("rolly_polly_spawn_egg",
|
||||||
// () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.ROLLY_POLLY, 0x7284A3, 0xBCC8DB, new Item.Properties()));
|
() -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.ROLLY_POLLY, 0x7284A3, 0xBCC8DB, new Item.Properties()));
|
||||||
public static final DeferredItem<DeferredSpawnEggItem> MOLEVORE_SPAWN_EGG = ITEMS.register("molevore_spawn_egg",
|
public static final DeferredItem<DeferredSpawnEggItem> MOLEVORE_SPAWN_EGG = ITEMS.register("molevore_spawn_egg",
|
||||||
() -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.MOLEVORE, 0x4A4A4A, 0x6B4A2B, new Item.Properties().rarity(Rarity.UNCOMMON)));
|
() -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.MOLEVORE, 0x4A4A4A, 0x6B4A2B, new Item.Properties().rarity(Rarity.UNCOMMON)));
|
||||||
public static final DeferredItem<DeferredSpawnEggItem> TRIFFID_SPAWN_EGG = ITEMS.register("triffid_spawn_egg",
|
public static final DeferredItem<DeferredSpawnEggItem> TRIFFID_SPAWN_EGG = ITEMS.register("triffid_spawn_egg",
|
||||||
|
|||||||
-1
@@ -24,7 +24,6 @@ public class AntarchyNeoforgePayloadHandlers {
|
|||||||
JumpyBootsNetworking.register(registrar);
|
JumpyBootsNetworking.register(registrar);
|
||||||
DorrieJumpNetworking.register(registrar);
|
DorrieJumpNetworking.register(registrar);
|
||||||
HerculesBeetleNetworking.register(registrar);
|
HerculesBeetleNetworking.register(registrar);
|
||||||
com.craisinlord.antarchy.neoforge.network.RollyPollyNetworking.register(registrar);
|
|
||||||
registrar.playToClient(
|
registrar.playToClient(
|
||||||
com.craisinlord.antarchy.content.network.BloodglassStatePayload.TYPE,
|
com.craisinlord.antarchy.content.network.BloodglassStatePayload.TYPE,
|
||||||
com.craisinlord.antarchy.content.network.BloodglassStatePayload.STREAM_CODEC,
|
com.craisinlord.antarchy.content.network.BloodglassStatePayload.STREAM_CODEC,
|
||||||
|
|||||||
+3
@@ -137,6 +137,9 @@ public final class AntarchyNeoforgeSounds {
|
|||||||
public static final DeferredHolder<SoundEvent, SoundEvent> STINK_BUG_FART = registerSoundEvent("stink_bug_fart");
|
public static final DeferredHolder<SoundEvent, SoundEvent> STINK_BUG_FART = registerSoundEvent("stink_bug_fart");
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> STINK_BUG_IDLE = registerSoundEvent("stink_bug_idle");
|
public static final DeferredHolder<SoundEvent, SoundEvent> STINK_BUG_IDLE = registerSoundEvent("stink_bug_idle");
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> ROLLY_POLLY_IDLE = registerSoundEvent("rolly_polly_idle");
|
public static final DeferredHolder<SoundEvent, SoundEvent> ROLLY_POLLY_IDLE = registerSoundEvent("rolly_polly_idle");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> ROLLY_POLLY_WHEEL_MODE = registerSoundEvent("rolly_polly_wheel_mode");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> ROLLY_POLLY_NORMAL_MODE = registerSoundEvent("rolly_polly_normal_mode");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> ROLLY_POLLY_ROLL = registerSoundEvent("rolly_polly_roll");
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> CREEPING_HORROR_GROWL = registerSoundEvent("creeping_horror_growl");
|
public static final DeferredHolder<SoundEvent, SoundEvent> CREEPING_HORROR_GROWL = registerSoundEvent("creeping_horror_growl");
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> CREEPING_HORROR_HURT = registerSoundEvent("creeping_horror_hurt");
|
public static final DeferredHolder<SoundEvent, SoundEvent> CREEPING_HORROR_HURT = registerSoundEvent("creeping_horror_hurt");
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> CREEPING_HORROR_BITE = registerSoundEvent("creeping_horror_bite");
|
public static final DeferredHolder<SoundEvent, SoundEvent> CREEPING_HORROR_BITE = registerSoundEvent("creeping_horror_bite");
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ public class AntarchyNeoforgeSpawnPlacements {
|
|||||||
event.register(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CreepingHorrorEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);
|
event.register(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CreepingHorrorEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);
|
||||||
event.register(AntarchyNeoforgeEntites.LURKING_TERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, LurkingTerrorEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);
|
event.register(AntarchyNeoforgeEntites.LURKING_TERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, LurkingTerrorEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);
|
||||||
event.register(AntarchyNeoforgeEntites.TERMITE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR);
|
event.register(AntarchyNeoforgeEntites.TERMITE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR);
|
||||||
// event.register(AntarchyNeoforgeEntites.ROLLY_POLLY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.RollyPollyEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);
|
event.register(AntarchyNeoforgeEntites.ROLLY_POLLY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.RollyPollyEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);
|
||||||
event.register(AntarchyNeoforgeEntites.CHEEP.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, AbstractFish::checkSurfaceWaterAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR);
|
event.register(AntarchyNeoforgeEntites.CHEEP.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, AbstractFish::checkSurfaceWaterAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR);
|
||||||
event.register(AntarchyNeoforgeEntites.DORRIE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR);
|
event.register(AntarchyNeoforgeEntites.DORRIE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR);
|
||||||
event.register(AntarchyNeoforgeEntites.OURANWOOD_DEER.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR);
|
event.register(AntarchyNeoforgeEntites.OURANWOOD_DEER.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR);
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
"spawners": [
|
"spawners": [
|
||||||
{
|
{
|
||||||
"type": "antarchy:golden_apple_cow",
|
"type": "antarchy:golden_apple_cow",
|
||||||
"weight": 3,
|
"weight": 1,
|
||||||
"minCount": 1,
|
"minCount": 1,
|
||||||
"maxCount": 3
|
"maxCount": 3
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user