Toreterror changes
Remove cheep item fix cheep spawning nightmare sword tooltip apple cow sheared drop fix
This commit is contained in:
1 parent
dc2c4cf014
commit
84bf436434
40 files changed
+411
-209
No files matched your search
+13
-12
@@ -7,26 +7,27 @@ dependencies {
|
|||||||
// modImplementation("curse.maven:create-${create_curseforge_id}:${create_curseforge_file_id}")
|
// modImplementation("curse.maven:create-${create_curseforge_id}:${create_curseforge_file_id}")
|
||||||
// modImplementation("curse.maven:selene-499980:4754433")
|
// modImplementation("curse.maven:selene-499980:4754433")
|
||||||
compileOnly("curse.maven:intapi-${project.intapi_curseforge_id}:${project.intapi_curseforge_file_id_neoforge}")
|
compileOnly("curse.maven:intapi-${project.intapi_curseforge_id}:${project.intapi_curseforge_file_id_neoforge}")
|
||||||
compileOnly("curse.maven:create-${project.create_curseforge_id_neoforge}:${project.create_curseforge_file_id_neoforge}")
|
// compileOnly("curse.maven:create-${project.create_curseforge_id_neoforge}:${project.create_curseforge_file_id_neoforge}")
|
||||||
compileOnly("curse.maven:marvel-${project.marvel_curseforge_id}:${project.marvel_curseforge_file_id}")
|
// compileOnly("curse.maven:marvel-${project.marvel_curseforge_id}:${project.marvel_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:stellaris-${project.stellaris_curseforge_id}:${project.stellaris_curseforge_file_id}")
|
// compileOnly("curse.maven:stellaris-${project.stellaris_curseforge_id}:${project.stellaris_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:aperture-${project.aperture_curseforge_id}:${project.aperture_curseforge_file_id}")
|
// compileOnly("curse.maven:aperture-${project.aperture_curseforge_id}:${project.aperture_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:inventory_pets-${project.inventory_pets_curseforge_id}:${project.inventory_pets_curseforge_file_id}")
|
// compileOnly("curse.maven:inventory_pets-${project.inventory_pets_curseforge_id}:${project.inventory_pets_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:cataclysm-${project.cataclysm_curseforge_id}:${project.cataclysm_curseforge_file_id}")
|
// compileOnly("curse.maven:cataclysm-${project.cataclysm_curseforge_id}:${project.cataclysm_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:iaf-${project.iaf_curseforge_id}:${project.iaf_curseforge_file_id}")
|
// compileOnly("curse.maven:iaf-${project.iaf_curseforge_id}:${project.iaf_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:backpack-${project.backpack_curseforge_id}:${project.backpack_curseforge_file_id}")
|
// compileOnly("curse.maven:backpack-${project.backpack_curseforge_id}:${project.backpack_curseforge_file_id}")
|
||||||
// compileOnly("curse.maven:regions_unexplored-${project.regions_unexplored_curseforge_id}:${project.regions_unexplored_curseforge_file_id}")
|
// compileOnly("curse.maven:regions_unexplored-${project.regions_unexplored_curseforge_id}:${project.regions_unexplored_curseforge_file_id}")
|
||||||
// compileOnly("curse.maven:geckolib-${project.geckolib_curseforge_id}:${project.geckolib_curseforge_file_id}")
|
// compileOnly("curse.maven:geckolib-${project.geckolib_curseforge_id}:${project.geckolib_curseforge_file_id}")
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/infinity-2.7.1+1.21.1-neoforge.jar"))
|
compileOnly(files("$rootDir/infinite_dimensions_jars/infinity-2.7.1+1.21.1-neoforge.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/infinity-2.7.1+1.21.1-fabric.jar"))
|
compileOnly(files("$rootDir/infinite_dimensions_jars/infinity-2.7.1+1.21.1-fabric.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/infinity-2.7.1+1.21.1-neoforge-sources.jar"))
|
compileOnly(files("$rootDir/infinite_dimensions_jars/infinity-2.7.1+1.21.1-neoforge-sources.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/gravity-api-1.0.7-1.20.1.jar"))
|
compileOnly(files("$rootDir/infinite_dimensions_jars/gravity-api-1.0.7-1.20.1.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/Cloro's Gravity Gun Mod (Release 1.3.1).jar"))
|
// compileOnly(files("$rootDir/infinite_dimensions_jars/Cloro's Gravity Gun Mod (Release 1.3.1).jar"))
|
||||||
// compileOnly(files("$rootDir/infinite_dimensions_jars/antarchy-1.0.0+1.21.1-neoforge.jar"))
|
// compileOnly(files("$rootDir/infinite_dimensions_jars/antarchy-1.0.0+1.21.1-neoforge.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/VanillaBackport-neoforge-1.21.1-1.1.7.6.jar"))
|
// compileOnly(files("$rootDir/infinite_dimensions_jars/VanillaBackport-neoforge-1.21.1-1.1.7.6.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/soul-fire-d-neoforge-1.21-6.1.0.jar"))
|
// compileOnly(files("$rootDir/infinite_dimensions_jars/soul-fire-d-neoforge-1.21-6.1.0.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/prometheus-neoforge-1.21-1.2.5.jar"))
|
// compileOnly(files("$rootDir/infinite_dimensions_jars/prometheus-neoforge-1.21-1.2.5.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/sable-neoforge-1.21.1-2.0.3.jar"))
|
compileOnly(files("$rootDir/infinite_dimensions_jars/sable-neoforge-1.21.1-2.0.3.jar"))
|
||||||
|
compileOnly(files("$rootDir/infinite_dimensions_jars/antarchy-1.0.0+1.21.1-neoforge.jar"))
|
||||||
compileOnly("software.bernie.geckolib:geckolib-neoforge-${minecraft_version}:${geckolib_version}")
|
compileOnly("software.bernie.geckolib:geckolib-neoforge-${minecraft_version}:${geckolib_version}")
|
||||||
//
|
//
|
||||||
// compileOnly group: 'org.ow2.asm', name: 'asm-tree', version: '9.4'
|
// compileOnly group: 'org.ow2.asm', name: 'asm-tree', version: '9.4'
|
||||||
|
|||||||
@@ -454,8 +454,8 @@ public final class AntarchySettings {
|
|||||||
private static double toreterrorHealth = 300.0D;
|
private static double toreterrorHealth = 300.0D;
|
||||||
private static double toreterrorJumpAttackDamage = 14.0D;
|
private static double toreterrorJumpAttackDamage = 14.0D;
|
||||||
private static double toreterrorJumpAttackKnockback = 2.5D;
|
private static double toreterrorJumpAttackKnockback = 2.5D;
|
||||||
private static double toreterrorSpinDamage = 8.0D;
|
private static double toreterrorSpinDamage = 6.0D;
|
||||||
private static double toreterrorSpinKnockback = 1.5D;
|
private static double toreterrorSpinKnockback = 0.9D;
|
||||||
private static double toreterrorRangedWaterBombChance = 0.5D;
|
private static double toreterrorRangedWaterBombChance = 0.5D;
|
||||||
private static double toreterrorProjectileDamageMultiplier = 0.5D;
|
private static double toreterrorProjectileDamageMultiplier = 0.5D;
|
||||||
private static double waterBombDamage = 6.0D;
|
private static double waterBombDamage = 6.0D;
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.craisinlord.antarchy.config;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.Antarchy;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
public final class ConfigResetGuard {
|
||||||
|
public static final int RESET_GENERATION = 1;
|
||||||
|
private static final String MARKER_FILE_NAME = ".config_generation";
|
||||||
|
|
||||||
|
private ConfigResetGuard() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void wipeIfNeeded(Path configDir, Path... configFiles) {
|
||||||
|
Path markerPath = configDir.resolve(MARKER_FILE_NAME);
|
||||||
|
if (readGeneration(markerPath) >= RESET_GENERATION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Path configFile : configFiles) {
|
||||||
|
try {
|
||||||
|
if (Files.deleteIfExists(configFile)) {
|
||||||
|
Antarchy.LOGGER.info("Reset config file {} to defaults (config generation {})", configFile, RESET_GENERATION);
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
Antarchy.LOGGER.warn("Failed to delete config file {} during config reset", configFile, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
writeGeneration(markerPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int readGeneration(Path markerPath) {
|
||||||
|
if (!Files.exists(markerPath)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
return Integer.parseInt(Files.readString(markerPath).trim());
|
||||||
|
} catch (IOException | NumberFormatException e) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void writeGeneration(Path markerPath) {
|
||||||
|
try {
|
||||||
|
Files.createDirectories(markerPath.getParent());
|
||||||
|
Files.writeString(markerPath, Integer.toString(RESET_GENERATION));
|
||||||
|
} catch (IOException e) {
|
||||||
|
Antarchy.LOGGER.warn("Failed to write config generation marker at {}", markerPath, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -122,6 +122,10 @@ public final class AntarchySoundEvents {
|
|||||||
public static Supplier<SoundEvent> BOMBER_WALK = (Supplier<SoundEvent>) UNBOUND;
|
public static Supplier<SoundEvent> BOMBER_WALK = (Supplier<SoundEvent>) UNBOUND;
|
||||||
public static Supplier<SoundEvent> BOMBER_KNOCK = (Supplier<SoundEvent>) UNBOUND;
|
public static Supplier<SoundEvent> BOMBER_KNOCK = (Supplier<SoundEvent>) UNBOUND;
|
||||||
public static Supplier<SoundEvent> BOMBER_EXPLODE = (Supplier<SoundEvent>) UNBOUND;
|
public static Supplier<SoundEvent> BOMBER_EXPLODE = (Supplier<SoundEvent>) UNBOUND;
|
||||||
|
public static Supplier<SoundEvent> TORETERROR_IDLE = (Supplier<SoundEvent>) UNBOUND;
|
||||||
|
public static Supplier<SoundEvent> TORETERROR_HURT = (Supplier<SoundEvent>) UNBOUND;
|
||||||
|
public static Supplier<SoundEvent> TORETERROR_DEATH = (Supplier<SoundEvent>) UNBOUND;
|
||||||
|
public static Supplier<SoundEvent> TORETERROR_BOMBER_FIRE = (Supplier<SoundEvent>) UNBOUND;
|
||||||
public static Supplier<SoundEvent> STINKY_FLY = (Supplier<SoundEvent>) UNBOUND;
|
public static Supplier<SoundEvent> STINKY_FLY = (Supplier<SoundEvent>) UNBOUND;
|
||||||
public static Supplier<SoundEvent> CREEPING_HORROR_GROWL = (Supplier<SoundEvent>) UNBOUND;
|
public static Supplier<SoundEvent> CREEPING_HORROR_GROWL = (Supplier<SoundEvent>) UNBOUND;
|
||||||
public static Supplier<SoundEvent> CREEPING_HORROR_HURT = (Supplier<SoundEvent>) UNBOUND;
|
public static Supplier<SoundEvent> CREEPING_HORROR_HURT = (Supplier<SoundEvent>) UNBOUND;
|
||||||
@@ -249,6 +253,10 @@ public final class AntarchySoundEvents {
|
|||||||
Supplier<SoundEvent> bomberWalk,
|
Supplier<SoundEvent> bomberWalk,
|
||||||
Supplier<SoundEvent> bomberKnock,
|
Supplier<SoundEvent> bomberKnock,
|
||||||
Supplier<SoundEvent> bomberExplode,
|
Supplier<SoundEvent> bomberExplode,
|
||||||
|
Supplier<SoundEvent> toreterrorIdle,
|
||||||
|
Supplier<SoundEvent> toreterrorHurt,
|
||||||
|
Supplier<SoundEvent> toreterrorDeath,
|
||||||
|
Supplier<SoundEvent> toreterrorBomberFire,
|
||||||
Supplier<SoundEvent> stinkyFly,
|
Supplier<SoundEvent> stinkyFly,
|
||||||
Supplier<SoundEvent> creepingHorrorGrowl,
|
Supplier<SoundEvent> creepingHorrorGrowl,
|
||||||
Supplier<SoundEvent> creepingHorrorHurt,
|
Supplier<SoundEvent> creepingHorrorHurt,
|
||||||
@@ -372,6 +380,10 @@ public final class AntarchySoundEvents {
|
|||||||
BOMBER_WALK = bomberWalk;
|
BOMBER_WALK = bomberWalk;
|
||||||
BOMBER_KNOCK = bomberKnock;
|
BOMBER_KNOCK = bomberKnock;
|
||||||
BOMBER_EXPLODE = bomberExplode;
|
BOMBER_EXPLODE = bomberExplode;
|
||||||
|
TORETERROR_IDLE = toreterrorIdle;
|
||||||
|
TORETERROR_HURT = toreterrorHurt;
|
||||||
|
TORETERROR_DEATH = toreterrorDeath;
|
||||||
|
TORETERROR_BOMBER_FIRE = toreterrorBomberFire;
|
||||||
STINKY_FLY = stinkyFly;
|
STINKY_FLY = stinkyFly;
|
||||||
CREEPING_HORROR_GROWL = creepingHorrorGrowl;
|
CREEPING_HORROR_GROWL = creepingHorrorGrowl;
|
||||||
CREEPING_HORROR_HURT = creepingHorrorHurt;
|
CREEPING_HORROR_HURT = creepingHorrorHurt;
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ public final class StinkyBehavior {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void attractArthropod(Mob mob, LivingEntity source) {
|
private static void attractArthropod(Mob mob, LivingEntity source) {
|
||||||
if (!isValidStinkySourceForMob(mob, source)) {
|
if (!isValidStinkyAttackSourceForMob(mob, source)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ public final class StinkyBehavior {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void repelPassiveOrNeutralMob(Mob mob, LivingEntity source) {
|
private static void repelPassiveOrNeutralMob(Mob mob, LivingEntity source) {
|
||||||
if (!(mob instanceof PathfinderMob pathfinderMob) || !isValidStinkySourceForMob(mob, source)) {
|
if (!(mob instanceof PathfinderMob pathfinderMob) || !isValidStinkyRepelSourceForMob(mob, source)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +195,10 @@ public final class StinkyBehavior {
|
|||||||
return !(mob instanceof Enemy);
|
return !(mob instanceof Enemy);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isValidStinkySourceForMob(Mob mob, LivingEntity source) {
|
private static boolean isValidStinkyAttackSourceForMob(Mob mob, LivingEntity source) {
|
||||||
|
if (!isValidStinkyRepelSourceForMob(mob, source)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (source == mob || !source.isAlive() || !source.hasEffect(AntarchyObjects.STINKY_EFFECT.get())) {
|
if (source == mob || !source.isAlive() || !source.hasEffect(AntarchyObjects.STINKY_EFFECT.get())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -205,4 +208,14 @@ public final class StinkyBehavior {
|
|||||||
return !mob.isAlliedTo(source);
|
return !mob.isAlliedTo(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isValidStinkyRepelSourceForMob(Mob mob, LivingEntity source) {
|
||||||
|
if (source == mob || !source.isAlive() || !source.hasEffect(AntarchyObjects.STINKY_EFFECT.get())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (source instanceof Player player && player.isSpectator()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return !mob.isAlliedTo(source);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
package com.craisinlord.antarchy.content.client;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import com.craisinlord.antarchy.content.item.NightmareSwordItem;
|
||||||
|
import net.minecraft.ChatFormatting;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
|
||||||
|
public final class NightmareSwordTooltipHelper {
|
||||||
|
private NightmareSwordTooltipHelper() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Component damageLine() {
|
||||||
|
Player player = Minecraft.getInstance().player;
|
||||||
|
float damage = player != null
|
||||||
|
? NightmareSwordItem.calculateDamage(player)
|
||||||
|
: (float) AntarchySettings.nightmareSwordBaseDamage();
|
||||||
|
return Component.translatable("tooltip.antarchy.nightmare_sword_damage", formatDamage(damage)).withStyle(ChatFormatting.RED);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String formatDamage(float damage) {
|
||||||
|
float rounded = Math.round(damage * 10.0F) / 10.0F;
|
||||||
|
if (rounded == (int) rounded) {
|
||||||
|
return String.valueOf((int) rounded);
|
||||||
|
}
|
||||||
|
return String.valueOf(rounded);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -353,6 +353,18 @@ public abstract class AppleCowEntity extends Cow implements GeoEntity, Shearable
|
|||||||
this.spawnAtLocation(new ItemStack(this.shearDropItem(), 2), this.getBbHeight() * 0.66F);
|
this.spawnAtLocation(new ItemStack(this.shearDropItem(), 2), this.getBbHeight() * 0.66F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dropCustomDeathLoot(ServerLevel level, net.minecraft.world.damagesource.DamageSource damageSource, boolean recentlyHit) {
|
||||||
|
super.dropCustomDeathLoot(level, damageSource, recentlyHit);
|
||||||
|
|
||||||
|
if (this.isBaby() || this.isSheared()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int count = this instanceof AppleCowEntityVariants.EnchantedGoldenAppleCow ? 1 : 1 + this.random.nextInt(2);
|
||||||
|
this.spawnAtLocation(new ItemStack(this.shearDropItem(), count));
|
||||||
|
}
|
||||||
|
|
||||||
private net.minecraft.world.item.Item shearDropItem() {
|
private net.minecraft.world.item.Item shearDropItem() {
|
||||||
if (this instanceof AppleCowEntityVariants.EnchantedGoldenAppleCow) {
|
if (this instanceof AppleCowEntityVariants.EnchantedGoldenAppleCow) {
|
||||||
return Items.ENCHANTED_GOLDEN_APPLE;
|
return Items.ENCHANTED_GOLDEN_APPLE;
|
||||||
|
|||||||
+34
-18
@@ -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.AntarchySoundEvents;
|
||||||
import com.craisinlord.antarchy.content.damage.AntarchyDamageSources;
|
import com.craisinlord.antarchy.content.damage.AntarchyDamageSources;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
@@ -78,7 +79,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
|
|||||||
private static final int RAPID_FIRE_END_TICK = 60;
|
private static final int RAPID_FIRE_END_TICK = 60;
|
||||||
private static final int SHOOT_BOMBER_TICK = 12;
|
private static final int SHOOT_BOMBER_TICK = 12;
|
||||||
private static final int SHOOT_BOMBER_SECOND_TICK = 32;
|
private static final int SHOOT_BOMBER_SECOND_TICK = 32;
|
||||||
private static final int JUMP_TOTAL_TICKS = 55;
|
private static final int JUMP_TOTAL_TICKS = 40;
|
||||||
private static final int JUMP_LAUNCH_TICK = 10;
|
private static final int JUMP_LAUNCH_TICK = 10;
|
||||||
private static final int JUMP_SHAKE_TICKS = 12;
|
private static final int JUMP_SHAKE_TICKS = 12;
|
||||||
private static final int SPIN_START_TOTAL_TICKS = 5;
|
private static final int SPIN_START_TOTAL_TICKS = 5;
|
||||||
@@ -93,8 +94,8 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
|
|||||||
private static final double RANGED_MAX_RANGE_SQR = 625.0D;
|
private static final double RANGED_MAX_RANGE_SQR = 625.0D;
|
||||||
private static final double SPIN_TRIGGER_RANGE_SQR = 225.0D;
|
private static final double SPIN_TRIGGER_RANGE_SQR = 225.0D;
|
||||||
private static final double SPIN_LEASH_RANGE_SQR = 225.0D;
|
private static final double SPIN_LEASH_RANGE_SQR = 225.0D;
|
||||||
private static final double SPIN_RADIUS = 4.5D;
|
private static final double SPIN_RADIUS = 2.5D;
|
||||||
private static final double SPIN_MOVE_SPEED = 0.833D;
|
private static final double SPIN_MOVE_SPEED = 0.65D;
|
||||||
private static final double SPIN_ANIMATION_SPEED = 0.49D;
|
private static final double SPIN_ANIMATION_SPEED = 0.49D;
|
||||||
private static final double JUMP_SHOCKWAVE_RADIUS = 6.0D;
|
private static final double JUMP_SHOCKWAVE_RADIUS = 6.0D;
|
||||||
|
|
||||||
@@ -145,7 +146,8 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
|
|||||||
.add(Attributes.MOVEMENT_SPEED, 0.325D)
|
.add(Attributes.MOVEMENT_SPEED, 0.325D)
|
||||||
.add(Attributes.FOLLOW_RANGE, 48.0D)
|
.add(Attributes.FOLLOW_RANGE, 48.0D)
|
||||||
.add(Attributes.KNOCKBACK_RESISTANCE, 0.85D)
|
.add(Attributes.KNOCKBACK_RESISTANCE, 0.85D)
|
||||||
.add(Attributes.ARMOR, 10.0D);
|
.add(Attributes.ARMOR, 16.0D)
|
||||||
|
.add(Attributes.ARMOR_TOUGHNESS, 4.0D);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean canSpawn(EntityType<ToreterrorEntity> entityType, ServerLevelAccessor level, MobSpawnType spawnReason, BlockPos pos, net.minecraft.util.RandomSource random) {
|
public static boolean canSpawn(EntityType<ToreterrorEntity> entityType, ServerLevelAccessor level, MobSpawnType spawnReason, BlockPos pos, net.minecraft.util.RandomSource random) {
|
||||||
@@ -284,7 +286,22 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
|
|||||||
return this.entityData.get(JUMP_SHAKING);
|
return this.entityData.get(JUMP_SHAKING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
protected net.minecraft.sounds.SoundEvent getAmbientSound() {
|
||||||
|
return AntarchySoundEvents.TORETERROR_IDLE.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected net.minecraft.sounds.SoundEvent getHurtSound(DamageSource damageSource) {
|
||||||
|
return AntarchySoundEvents.TORETERROR_HURT.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected net.minecraft.sounds.SoundEvent getDeathSound() {
|
||||||
|
return AntarchySoundEvents.TORETERROR_DEATH.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void startSeenByPlayer(ServerPlayer player) {
|
public void startSeenByPlayer(ServerPlayer player) {
|
||||||
super.startSeenByPlayer(player);
|
super.startSeenByPlayer(player);
|
||||||
this.bossEvent.addPlayer(player);
|
this.bossEvent.addPlayer(player);
|
||||||
@@ -423,7 +440,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
|
|||||||
LivingEntity target = this.getTarget();
|
LivingEntity target = this.getTarget();
|
||||||
if (target != null) {
|
if (target != null) {
|
||||||
Vec3 toTarget = target.position().subtract(this.position()).normalize();
|
Vec3 toTarget = target.position().subtract(this.position()).normalize();
|
||||||
this.setDeltaMovement(toTarget.x * 0.6D, 1.4D, toTarget.z * 0.6D);
|
this.setDeltaMovement(toTarget.x * 0.6D, 1.15D, toTarget.z * 0.6D);
|
||||||
this.hasImpulse = true;
|
this.hasImpulse = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -431,20 +448,18 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
|
|||||||
this.jumpAirborne = true;
|
this.jumpAirborne = true;
|
||||||
}
|
}
|
||||||
if (this.jumpLaunched && this.jumpAirborne && !this.shockwaveApplied) {
|
if (this.jumpLaunched && this.jumpAirborne && !this.shockwaveApplied) {
|
||||||
boolean forceLand = this.jumpAnimTicks <= 1;
|
if (this.onGround()) {
|
||||||
if (forceLand) {
|
|
||||||
BlockPos pos = BlockPos.containing(this.getX(), this.getY(), this.getZ());
|
|
||||||
while (pos.getY() > this.level().getMinBuildHeight() && this.level().isEmptyBlock(pos)) {
|
|
||||||
pos = pos.below();
|
|
||||||
}
|
|
||||||
this.teleportTo(this.getX(), pos.getY() + 1.0, this.getZ());
|
|
||||||
this.setDeltaMovement(Vec3.ZERO);
|
|
||||||
}
|
|
||||||
if (this.onGround() || forceLand) {
|
|
||||||
this.shockwaveApplied = true;
|
this.shockwaveApplied = true;
|
||||||
this.applyJumpShockwave();
|
this.applyJumpShockwave();
|
||||||
this.jumpShakeTicks = JUMP_SHAKE_TICKS;
|
this.jumpShakeTicks = JUMP_SHAKE_TICKS;
|
||||||
this.entityData.set(JUMP_SHAKING, true);
|
this.entityData.set(JUMP_SHAKING, true);
|
||||||
|
} else if (this.jumpAnimTicks <= 10) {
|
||||||
|
Vec3 vel = this.getDeltaMovement();
|
||||||
|
this.setDeltaMovement(vel.x * 0.5D, Math.min(vel.y, -1.5D), vel.z * 0.5D);
|
||||||
|
this.hasImpulse = true;
|
||||||
|
if (this.jumpAnimTicks <= 2) {
|
||||||
|
this.jumpAnimTicks = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.jumpAnimTicks--;
|
this.jumpAnimTicks--;
|
||||||
@@ -517,7 +532,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
|
|||||||
this.spinEndTicks--;
|
this.spinEndTicks--;
|
||||||
if (this.spinEndTicks <= 0) {
|
if (this.spinEndTicks <= 0) {
|
||||||
this.stopSpinSequence();
|
this.stopSpinSequence();
|
||||||
this.spinCooldown = 260 + this.random.nextInt(80);
|
this.spinCooldown = 340 + this.random.nextInt(80);
|
||||||
this.spinHitCooldowns.clear();
|
this.spinHitCooldowns.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -532,7 +547,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Vec3 forward = this.spinDirection.lengthSqr() > 1.0E-4D ? this.spinDirection.normalize() : towardTarget;
|
Vec3 forward = this.spinDirection.lengthSqr() > 1.0E-4D ? this.spinDirection.normalize() : towardTarget;
|
||||||
Vec3 combined = forward.scale(0.95D).add(towardTarget.scale(0.05D));
|
Vec3 combined = forward.scale(0.99D).add(towardTarget.scale(0.01D));
|
||||||
this.spinDirection = combined.lengthSqr() > 1.0E-4D ? combined.normalize() : towardTarget;
|
this.spinDirection = combined.lengthSqr() > 1.0E-4D ? combined.normalize() : towardTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -703,6 +718,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
|
|||||||
if (!(this.level() instanceof ServerLevel serverLevel)) return;
|
if (!(this.level() instanceof ServerLevel serverLevel)) return;
|
||||||
LivingEntity target = this.getTarget();
|
LivingEntity target = this.getTarget();
|
||||||
if (target == null) return;
|
if (target == null) return;
|
||||||
|
this.playSound(AntarchySoundEvents.TORETERROR_BOMBER_FIRE.get(), 1.1F, 0.9F + this.random.nextFloat() * 0.15F);
|
||||||
int count = 3;
|
int count = 3;
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
BomberEntity bomber = AntarchyObjects.BOMBER.get().create(this.level());
|
BomberEntity bomber = AntarchyObjects.BOMBER.get().create(this.level());
|
||||||
|
|||||||
+73
-2
@@ -1,18 +1,24 @@
|
|||||||
package com.craisinlord.antarchy.content.entity.ant;
|
package com.craisinlord.antarchy.content.entity.ant;
|
||||||
|
|
||||||
import com.craisinlord.antarchy.config.AntarchySettings;
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.resources.ResourceKey;
|
|
||||||
import net.minecraft.server.level.PlayerRespawnLogic;
|
import net.minecraft.server.level.PlayerRespawnLogic;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.sounds.SoundEvents;
|
import net.minecraft.sounds.SoundEvents;
|
||||||
import net.minecraft.world.InteractionResult;
|
import net.minecraft.world.InteractionResult;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.Mob;
|
||||||
|
import net.minecraft.world.entity.OwnableEntity;
|
||||||
|
import net.minecraft.world.entity.TamableAnimal;
|
||||||
|
import net.minecraft.world.entity.animal.horse.AbstractHorse;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.entity.vehicle.DismountHelper;
|
import net.minecraft.world.entity.vehicle.DismountHelper;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
@@ -20,13 +26,78 @@ import net.minecraft.world.level.ChunkPos;
|
|||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.levelgen.Heightmap;
|
import net.minecraft.world.level.levelgen.Heightmap;
|
||||||
|
import net.minecraft.world.level.portal.DimensionTransition;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public final class AntTeleportHelper {
|
public final class AntTeleportHelper {
|
||||||
|
private static final double COMPANION_FOLLOW_RADIUS = 16.0D;
|
||||||
|
|
||||||
private AntTeleportHelper() {
|
private AntTeleportHelper() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void teleportPlayerWithCompanions(ServerPlayer player, ServerLevel destination, Vec3 destinationPos) {
|
||||||
|
Mob vehicle = player.getVehicle() instanceof Mob mob ? mob : null;
|
||||||
|
List<Mob> companions = collectCompanions(player);
|
||||||
|
player.teleportTo(destination, destinationPos.x, destinationPos.y, destinationPos.z, player.getYRot(), player.getXRot());
|
||||||
|
Mob movedVehicle = null;
|
||||||
|
for (Mob companion : companions) {
|
||||||
|
Mob moved = moveCompanion(companion, destination, destinationPos);
|
||||||
|
if (companion == vehicle) {
|
||||||
|
movedVehicle = moved;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (movedVehicle != null) {
|
||||||
|
player.startRiding(movedVehicle, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<Mob> collectCompanions(ServerPlayer player) {
|
||||||
|
List<Mob> companions = new ArrayList<>();
|
||||||
|
if (player.getVehicle() instanceof Mob vehicle) {
|
||||||
|
companions.add(vehicle);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Mob mob : player.serverLevel().getEntitiesOfClass(Mob.class, player.getBoundingBox().inflate(COMPANION_FOLLOW_RADIUS), mob -> isFollowingPet(mob, player))) {
|
||||||
|
if (!companions.contains(mob)) {
|
||||||
|
companions.add(mob);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return companions;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isFollowingPet(Mob mob, ServerPlayer player) {
|
||||||
|
if (!mob.isAlive()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mob instanceof TamableAnimal tamable) {
|
||||||
|
return tamable.isTame() && player.getUUID().equals(tamable.getOwnerUUID()) && !tamable.isOrderedToSit();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mob instanceof AbstractHorse horse) {
|
||||||
|
return horse.isTamed() && player.getUUID().equals(horse.getOwnerUUID());
|
||||||
|
}
|
||||||
|
|
||||||
|
return mob instanceof OwnableEntity ownable && player.getUUID().equals(ownable.getOwnerUUID());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
private static Mob moveCompanion(Mob companion, ServerLevel destination, Vec3 destinationPos) {
|
||||||
|
companion.stopRiding();
|
||||||
|
companion.ejectPassengers();
|
||||||
|
companion.getNavigation().stop();
|
||||||
|
if (companion.level() == destination) {
|
||||||
|
companion.teleportTo(destinationPos.x, destinationPos.y, destinationPos.z);
|
||||||
|
return companion;
|
||||||
|
}
|
||||||
|
|
||||||
|
Entity moved = companion.changeDimension(new DimensionTransition(destination, destinationPos, Vec3.ZERO, companion.getYRot(), companion.getXRot(), DimensionTransition.DO_NOTHING));
|
||||||
|
return moved instanceof Mob mob ? mob : null;
|
||||||
|
}
|
||||||
|
|
||||||
static InteractionResult handleInteraction(BaseAntEntity ant, Player player, ItemStack itemStack) {
|
static InteractionResult handleInteraction(BaseAntEntity ant, Player player, ItemStack itemStack) {
|
||||||
if (ant.requiresActivationReagent() && !ant.isTeleportActivatedState()) {
|
if (ant.requiresActivationReagent() && !ant.isTeleportActivatedState()) {
|
||||||
if (!(player instanceof ServerPlayer serverPlayer)) {
|
if (!(player instanceof ServerPlayer serverPlayer)) {
|
||||||
@@ -62,7 +133,7 @@ public final class AntTeleportHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Vec3 destinationPos = getDestinationPosition(serverPlayer, destination);
|
Vec3 destinationPos = getDestinationPosition(serverPlayer, destination);
|
||||||
serverPlayer.teleportTo(destination, destinationPos.x, destinationPos.y, destinationPos.z, serverPlayer.getYRot(), serverPlayer.getXRot());
|
teleportPlayerWithCompanions(serverPlayer, destination, destinationPos);
|
||||||
serverPlayer.playSound(SoundEvents.ENDERMAN_TELEPORT, 1.0F, 1.0F);
|
serverPlayer.playSound(SoundEvents.ENDERMAN_TELEPORT, 1.0F, 1.0F);
|
||||||
return InteractionResult.CONSUME;
|
return InteractionResult.CONSUME;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package com.craisinlord.antarchy.content.item;
|
package com.craisinlord.antarchy.content.item;
|
||||||
|
|
||||||
import com.craisinlord.antarchy.config.AntarchySettings;
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import com.craisinlord.antarchy.content.client.NightmareSwordTooltipHelper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.minecraft.ChatFormatting;
|
import net.minecraft.ChatFormatting;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.SwordItem;
|
import net.minecraft.world.item.SwordItem;
|
||||||
@@ -21,6 +23,18 @@ public class NightmareSwordItem extends SwordItem {
|
|||||||
this.attackSpeed = attackSpeed;
|
this.attackSpeed = attackSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static float calculateDamage(LivingEntity attacker) {
|
||||||
|
float baseDamage = (float) AntarchySettings.nightmareSwordBaseDamage();
|
||||||
|
float maxHealth = attacker.getMaxHealth();
|
||||||
|
if (maxHealth <= 0.0F) {
|
||||||
|
return baseDamage;
|
||||||
|
}
|
||||||
|
|
||||||
|
float missingFraction = (maxHealth - attacker.getHealth()) / maxHealth;
|
||||||
|
float scalingFactor = (float) AntarchySettings.nightmareSwordScalingFactor();
|
||||||
|
return baseDamage + missingFraction * scalingFactor * baseDamage;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemAttributeModifiers getDefaultAttributeModifiers() {
|
public ItemAttributeModifiers getDefaultAttributeModifiers() {
|
||||||
return SwordItem.createAttributes(
|
return SwordItem.createAttributes(
|
||||||
@@ -38,6 +52,7 @@ public class NightmareSwordItem extends SwordItem {
|
|||||||
@Override
|
@Override
|
||||||
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
|
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
|
||||||
tooltipComponents.add(Component.translatable("tooltip.antarchy.nightmare_sword").withStyle(ChatFormatting.DARK_RED));
|
tooltipComponents.add(Component.translatable("tooltip.antarchy.nightmare_sword").withStyle(ChatFormatting.DARK_RED));
|
||||||
|
tooltipComponents.add(NightmareSwordTooltipHelper.damageLine());
|
||||||
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
|
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.craisinlord.antarchy.mixins;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.content.item.NightmareSwordItem;
|
||||||
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||||
|
|
||||||
|
@Mixin(LivingEntity.class)
|
||||||
|
public abstract class NightmareSwordDamageMixin {
|
||||||
|
@ModifyVariable(method = "hurt", at = @At("HEAD"), ordinal = 0, argsOnly = true)
|
||||||
|
private float antarchy$applyNightmareSwordDamage(float amount, DamageSource source) {
|
||||||
|
LivingEntity self = (LivingEntity) (Object) this;
|
||||||
|
if (self.level().isClientSide) {
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(source.getEntity() instanceof Player attacker)) {
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(attacker.getMainHandItem().getItem() instanceof NightmareSwordItem)) {
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NightmareSwordItem.calculateDamage(attacker);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
"FireVisualBaseFireBlockMixin",
|
"FireVisualBaseFireBlockMixin",
|
||||||
"FireVisualEntityMixin",
|
"FireVisualEntityMixin",
|
||||||
"GlowVinesUnderLeavesMixin",
|
"GlowVinesUnderLeavesMixin",
|
||||||
|
"NightmareSwordDamageMixin",
|
||||||
"ServerPlayerGameModeMixin",
|
"ServerPlayerGameModeMixin",
|
||||||
"SquidzookaEnchantMixin",
|
"SquidzookaEnchantMixin",
|
||||||
"SquidzookaMultishotMixin",
|
"SquidzookaMultishotMixin",
|
||||||
|
|||||||
@@ -220,6 +220,7 @@
|
|||||||
"tooltip.antarchy.nightmare_armor_double_damage": "%s%% chance to deal double damage",
|
"tooltip.antarchy.nightmare_armor_double_damage": "%s%% chance to deal double damage",
|
||||||
"tooltip.antarchy.nightmare_armor_set_bonus": "Full Set: Wither & Dread immunity",
|
"tooltip.antarchy.nightmare_armor_set_bonus": "Full Set: Wither & Dread immunity",
|
||||||
"tooltip.antarchy.nightmare_sword": "Deals more damage as your health drops.",
|
"tooltip.antarchy.nightmare_sword": "Deals more damage as your health drops.",
|
||||||
|
"tooltip.antarchy.nightmare_sword_damage": "Deals %s damage",
|
||||||
"tooltip.antarchy.primordial_helmet_water_breathing": "Grants the wearer Water Breathing",
|
"tooltip.antarchy.primordial_helmet_water_breathing": "Grants the wearer Water Breathing",
|
||||||
"tooltip.antarchy.primordial_armor_knockback_dealt": "Adds %s attack knockback per piece",
|
"tooltip.antarchy.primordial_armor_knockback_dealt": "Adds %s attack knockback per piece",
|
||||||
"tooltip.antarchy.primordial_armor_set_bonus": "Full Set: Attacks ignore enemy knockback resistance",
|
"tooltip.antarchy.primordial_armor_set_bonus": "Full Set: Attacks ignore enemy knockback resistance",
|
||||||
@@ -654,6 +655,10 @@
|
|||||||
"subtitles.antarchy.bomber_walk": "Bomber walks",
|
"subtitles.antarchy.bomber_walk": "Bomber walks",
|
||||||
"subtitles.antarchy.bomber_knock": "Bomber gets hit",
|
"subtitles.antarchy.bomber_knock": "Bomber gets hit",
|
||||||
"subtitles.antarchy.bomber_explode": "Bomber fuse hisses",
|
"subtitles.antarchy.bomber_explode": "Bomber fuse hisses",
|
||||||
|
"subtitles.antarchy.toreterror_idle": "Toreterror idles",
|
||||||
|
"subtitles.antarchy.toreterror_hurt": "Toreterror hurts",
|
||||||
|
"subtitles.antarchy.toreterror_death": "Toreterror dies",
|
||||||
|
"subtitles.antarchy.toreterror_bomber_fire": "Toreterror launches bombers",
|
||||||
"subtitles.antarchy.creeping_horror_growl": "Creeping Horror growls",
|
"subtitles.antarchy.creeping_horror_growl": "Creeping Horror growls",
|
||||||
"subtitles.antarchy.creeping_horror_hurt": "Creeping Horror hurts",
|
"subtitles.antarchy.creeping_horror_hurt": "Creeping Horror hurts",
|
||||||
"subtitles.antarchy.creeping_horror_bite": "Creeping Horror bites",
|
"subtitles.antarchy.creeping_horror_bite": "Creeping Horror bites",
|
||||||
|
|||||||
@@ -466,6 +466,53 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"toreterror_idle": {
|
||||||
|
"subtitle": "subtitles.antarchy.toreterror_idle",
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/toreterror/idle1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/toreterror/idle2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/toreterror/idle3"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"toreterror_hurt": {
|
||||||
|
"subtitle": "subtitles.antarchy.toreterror_hurt",
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/toreterror/hurt1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/toreterror/hurt2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/toreterror/hurt3"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"toreterror_death": {
|
||||||
|
"subtitle": "subtitles.antarchy.toreterror_death",
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/toreterror/death"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"toreterror_bomber_fire": {
|
||||||
|
"subtitle": "subtitles.antarchy.toreterror_bomber_fire",
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/toreterror/bomber_fire1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "antarchy:mob/toreterror/bomber_fire2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"creeping_horror_growl": {
|
"creeping_horror_growl": {
|
||||||
"subtitle": "subtitles.antarchy.creeping_horror_growl",
|
"subtitle": "subtitles.antarchy.creeping_horror_growl",
|
||||||
"sounds": [
|
"sounds": [
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -485,7 +485,7 @@
|
|||||||
"humidity": 0.85,
|
"humidity": 0.85,
|
||||||
"continentalness": -0.88,
|
"continentalness": -0.88,
|
||||||
"erosion": 0.20,
|
"erosion": 0.20,
|
||||||
"weirdness": 0.60,
|
"weirdness": 0.50,
|
||||||
"depth": 0.0,
|
"depth": 0.0,
|
||||||
"offset": 0.0
|
"offset": 0.0
|
||||||
}
|
}
|
||||||
@@ -497,7 +497,7 @@
|
|||||||
"humidity": 0.82,
|
"humidity": 0.82,
|
||||||
"continentalness": -0.90,
|
"continentalness": -0.90,
|
||||||
"erosion": 0.15,
|
"erosion": 0.15,
|
||||||
"weirdness": -0.65,
|
"weirdness": -0.55,
|
||||||
"depth": 0.0,
|
"depth": 0.0,
|
||||||
"offset": 0.0
|
"offset": 0.0
|
||||||
}
|
}
|
||||||
@@ -509,7 +509,7 @@
|
|||||||
"humidity": 0.85,
|
"humidity": 0.85,
|
||||||
"continentalness": -0.88,
|
"continentalness": -0.88,
|
||||||
"erosion": 0.20,
|
"erosion": 0.20,
|
||||||
"weirdness": 0.60,
|
"weirdness": 0.50,
|
||||||
"depth": 0.5,
|
"depth": 0.5,
|
||||||
"offset": 0.0
|
"offset": 0.0
|
||||||
}
|
}
|
||||||
@@ -521,7 +521,7 @@
|
|||||||
"humidity": 0.82,
|
"humidity": 0.82,
|
||||||
"continentalness": -0.90,
|
"continentalness": -0.90,
|
||||||
"erosion": 0.15,
|
"erosion": 0.15,
|
||||||
"weirdness": -0.65,
|
"weirdness": -0.55,
|
||||||
"depth": 0.5,
|
"depth": 0.5,
|
||||||
"offset": 0.0
|
"offset": 0.0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,37 +70,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"rolls": 1,
|
|
||||||
"conditions": [
|
|
||||||
{
|
|
||||||
"condition": "minecraft:entity_properties",
|
|
||||||
"entity": "this",
|
|
||||||
"predicate": {
|
|
||||||
"minecraft:flags": {
|
|
||||||
"is_baby": false,
|
|
||||||
"sheared": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"entries": [
|
|
||||||
{
|
|
||||||
"type": "minecraft:item",
|
|
||||||
"name": "minecraft:apple",
|
|
||||||
"functions": [
|
|
||||||
{
|
|
||||||
"function": "minecraft:set_count",
|
|
||||||
"count": {
|
|
||||||
"type": "minecraft:uniform",
|
|
||||||
"min": 1.0,
|
|
||||||
"max": 2.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,25 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "minecraft:entity",
|
"type": "minecraft:entity",
|
||||||
"pools": [
|
"pools": [],
|
||||||
{
|
|
||||||
"rolls": 1.0,
|
|
||||||
"entries": [
|
|
||||||
{
|
|
||||||
"type": "minecraft:item",
|
|
||||||
"name": "antarchy:cheep"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"functions": [
|
|
||||||
{
|
|
||||||
"function": "minecraft:set_count",
|
|
||||||
"count": {
|
|
||||||
"type": "minecraft:uniform",
|
|
||||||
"min": 1.0,
|
|
||||||
"max": 1.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"random_sequence": "antarchy:entities/cheep"
|
"random_sequence": "antarchy:entities/cheep"
|
||||||
}
|
}
|
||||||
-29
@@ -70,35 +70,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"rolls": 1,
|
|
||||||
"conditions": [
|
|
||||||
{
|
|
||||||
"condition": "minecraft:entity_properties",
|
|
||||||
"entity": "this",
|
|
||||||
"predicate": {
|
|
||||||
"minecraft:flags": {
|
|
||||||
"is_baby": false
|
|
||||||
},
|
|
||||||
"antarchy:apple_cow": {
|
|
||||||
"sheared": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"entries": [
|
|
||||||
{
|
|
||||||
"type": "minecraft:item",
|
|
||||||
"name": "minecraft:enchanted_golden_apple",
|
|
||||||
"functions": [
|
|
||||||
{
|
|
||||||
"function": "minecraft:set_count",
|
|
||||||
"count": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -70,39 +70,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"rolls": 1,
|
|
||||||
"conditions": [
|
|
||||||
{
|
|
||||||
"condition": "minecraft:entity_properties",
|
|
||||||
"entity": "this",
|
|
||||||
"predicate": {
|
|
||||||
"minecraft:flags": {
|
|
||||||
"is_baby": false
|
|
||||||
},
|
|
||||||
"antarchy:apple_cow": {
|
|
||||||
"sheared": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"entries": [
|
|
||||||
{
|
|
||||||
"type": "minecraft:item",
|
|
||||||
"name": "minecraft:golden_apple",
|
|
||||||
"functions": [
|
|
||||||
{
|
|
||||||
"function": "minecraft:set_count",
|
|
||||||
"count": {
|
|
||||||
"type": "minecraft:uniform",
|
|
||||||
"min": 1.0,
|
|
||||||
"max": 2.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -51,7 +51,9 @@
|
|||||||
"antarchy:elythia_underground"
|
"antarchy:elythia_underground"
|
||||||
],
|
],
|
||||||
[],
|
[],
|
||||||
[],
|
[
|
||||||
|
"minecraft:patch_sugar_cane"
|
||||||
|
],
|
||||||
[]
|
[]
|
||||||
],
|
],
|
||||||
"creature_spawn_probability": 0.04,
|
"creature_spawn_probability": 0.04,
|
||||||
|
|||||||
@@ -62,7 +62,8 @@
|
|||||||
"antarchy:elythia_large_tuff_boulders",
|
"antarchy:elythia_large_tuff_boulders",
|
||||||
"antarchy:elythia_tuff_boulders",
|
"antarchy:elythia_tuff_boulders",
|
||||||
"antarchy:elythia_meadow_flora",
|
"antarchy:elythia_meadow_flora",
|
||||||
"antarchy:elythia_brown_ant_nests"
|
"antarchy:elythia_brown_ant_nests",
|
||||||
|
"minecraft:patch_sugar_cane"
|
||||||
],
|
],
|
||||||
[]
|
[]
|
||||||
],
|
],
|
||||||
@@ -133,7 +134,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"water_ambient": [
|
"water_ambient": [
|
||||||
{ "type": "antarchy:cheep", "weight": 20, "minCount": 4, "maxCount": 8 },
|
{ "type": "antarchy:cheep", "weight": 10, "minCount": 3, "maxCount": 6 },
|
||||||
{ "type": "minecraft:tropical_fish", "weight": 20, "minCount": 4, "maxCount": 8 }
|
{ "type": "minecraft:tropical_fish", "weight": 20, "minCount": 4, "maxCount": 8 }
|
||||||
],
|
],
|
||||||
"misc": []
|
"misc": []
|
||||||
|
|||||||
@@ -53,7 +53,8 @@
|
|||||||
[],
|
[],
|
||||||
[
|
[
|
||||||
"minecraft:sea_pickle",
|
"minecraft:sea_pickle",
|
||||||
"minecraft:warm_ocean_vegetation"
|
"minecraft:warm_ocean_vegetation",
|
||||||
|
"minecraft:kelp_warm"
|
||||||
],
|
],
|
||||||
[]
|
[]
|
||||||
],
|
],
|
||||||
@@ -71,7 +72,7 @@
|
|||||||
{ "type": "minecraft:turtle", "weight": 5, "minCount": 1, "maxCount": 2 },
|
{ "type": "minecraft:turtle", "weight": 5, "minCount": 1, "maxCount": 2 },
|
||||||
{ "type": "antarchy:octopus_bomb", "weight": 4, "minCount": 1, "maxCount": 2 }],
|
{ "type": "antarchy:octopus_bomb", "weight": 4, "minCount": 1, "maxCount": 2 }],
|
||||||
"water_ambient": [
|
"water_ambient": [
|
||||||
{ "type": "antarchy:cheep", "weight": 20, "minCount": 4, "maxCount": 8 },
|
{ "type": "antarchy:cheep", "weight": 10, "minCount": 3, "maxCount": 6 },
|
||||||
{ "type": "minecraft:tropical_fish", "weight": 20, "minCount": 4, "maxCount": 8 }
|
{ "type": "minecraft:tropical_fish", "weight": 20, "minCount": 4, "maxCount": 8 }
|
||||||
],
|
],
|
||||||
"misc": []
|
"misc": []
|
||||||
|
|||||||
@@ -54,7 +54,8 @@
|
|||||||
],
|
],
|
||||||
[],
|
[],
|
||||||
[
|
[
|
||||||
"antarchy:elythia_meadow_flora"
|
"antarchy:elythia_meadow_flora",
|
||||||
|
"minecraft:patch_sugar_cane"
|
||||||
],
|
],
|
||||||
[]
|
[]
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
"maxCount": 1
|
"maxCount": 1
|
||||||
}],
|
}],
|
||||||
"water_ambient": [
|
"water_ambient": [
|
||||||
{ "type": "antarchy:cheep", "weight": 20, "minCount": 4, "maxCount": 8 },
|
{ "type": "antarchy:cheep", "weight": 10, "minCount": 3, "maxCount": 6 },
|
||||||
{ "type": "minecraft:tropical_fish", "weight": 20, "minCount": 4, "maxCount": 8 }],
|
{ "type": "minecraft:tropical_fish", "weight": 20, "minCount": 4, "maxCount": 8 }],
|
||||||
"misc": []
|
"misc": []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"replace": false,
|
|
||||||
"values": [
|
|
||||||
"antarchy:cheep"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
+13
-13
@@ -23,22 +23,22 @@ dependencies {
|
|||||||
modApi "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
modApi "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||||
modImplementation "software.bernie.geckolib:geckolib-fabric-${project.minecraft_version}:${project.geckolib_version}"
|
modImplementation "software.bernie.geckolib:geckolib-fabric-${project.minecraft_version}:${project.geckolib_version}"
|
||||||
compileOnly("curse.maven:intapi-${project.intapi_curseforge_id}:${project.intapi_curseforge_file_id_neoforge}")
|
compileOnly("curse.maven:intapi-${project.intapi_curseforge_id}:${project.intapi_curseforge_file_id_neoforge}")
|
||||||
compileOnly("curse.maven:create-${project.create_curseforge_id_neoforge}:${project.create_curseforge_file_id_neoforge}")
|
// compileOnly("curse.maven:create-${project.create_curseforge_id_neoforge}:${project.create_curseforge_file_id_neoforge}")
|
||||||
compileOnly("curse.maven:marvel-${project.marvel_curseforge_id}:${project.marvel_curseforge_file_id}")
|
// compileOnly("curse.maven:marvel-${project.marvel_curseforge_id}:${project.marvel_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:stellaris-${project.stellaris_curseforge_id}:${project.stellaris_curseforge_file_id}")
|
// compileOnly("curse.maven:stellaris-${project.stellaris_curseforge_id}:${project.stellaris_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:aperture-${project.aperture_curseforge_id}:${project.aperture_curseforge_file_id}")
|
// compileOnly("curse.maven:aperture-${project.aperture_curseforge_id}:${project.aperture_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:inventory_pets-${project.inventory_pets_curseforge_id}:${project.inventory_pets_curseforge_file_id}")
|
// compileOnly("curse.maven:inventory_pets-${project.inventory_pets_curseforge_id}:${project.inventory_pets_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:cataclysm-${project.cataclysm_curseforge_id}:${project.cataclysm_curseforge_file_id}")
|
// compileOnly("curse.maven:cataclysm-${project.cataclysm_curseforge_id}:${project.cataclysm_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:iaf-${project.iaf_curseforge_id}:${project.iaf_curseforge_file_id}")
|
// compileOnly("curse.maven:iaf-${project.iaf_curseforge_id}:${project.iaf_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:backpack-${project.backpack_curseforge_id}:${project.backpack_curseforge_file_id}")
|
// compileOnly("curse.maven:backpack-${project.backpack_curseforge_id}:${project.backpack_curseforge_file_id}")
|
||||||
compileOnly("curse.maven:regions_unexplored-${project.regions_unexplored_curseforge_id}:${project.regions_unexplored_curseforge_file_id}")
|
// compileOnly("curse.maven:regions_unexplored-${project.regions_unexplored_curseforge_id}:${project.regions_unexplored_curseforge_file_id}")
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/infinity-2.7.1+1.21.1-neoforge.jar"))
|
compileOnly(files("$rootDir/infinite_dimensions_jars/infinity-2.7.1+1.21.1-neoforge.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/infinity-2.7.1+1.21.1-neoforge-sources.jar"))
|
compileOnly(files("$rootDir/infinite_dimensions_jars/infinity-2.7.1+1.21.1-neoforge-sources.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/gravity-api-1.0.7-1.20.1.jar"))
|
compileOnly(files("$rootDir/infinite_dimensions_jars/gravity-api-1.0.7-1.20.1.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/Cloro's Gravity Gun Mod (Release 1.3.1).jar"))
|
// compileOnly(files("$rootDir/infinite_dimensions_jars/Cloro's Gravity Gun Mod (Release 1.3.1).jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/VanillaBackport-neoforge-1.21.1-1.1.7.6.jar"))
|
// compileOnly(files("$rootDir/infinite_dimensions_jars/VanillaBackport-neoforge-1.21.1-1.1.7.6.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/soul-fire-d-neoforge-1.21-6.1.0.jar"))
|
// compileOnly(files("$rootDir/infinite_dimensions_jars/soul-fire-d-neoforge-1.21-6.1.0.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/prometheus-neoforge-1.21-1.2.5.jar"))
|
// compileOnly(files("$rootDir/infinite_dimensions_jars/prometheus-neoforge-1.21-1.2.5.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/cloth-config-15.0.140-fabric.jar"))
|
compileOnly(files("$rootDir/infinite_dimensions_jars/cloth-config-15.0.140-fabric.jar"))
|
||||||
compileOnly(files("$rootDir/infinite_dimensions_jars/sable-neoforge-1.21.1-2.0.3.jar"))
|
compileOnly(files("$rootDir/infinite_dimensions_jars/sable-neoforge-1.21.1-2.0.3.jar"))
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.fabric;
|
|||||||
|
|
||||||
import com.craisinlord.antarchy.Antarchy;
|
import com.craisinlord.antarchy.Antarchy;
|
||||||
import com.craisinlord.antarchy.config.AntarchySettings;
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import com.craisinlord.antarchy.config.ConfigResetGuard;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
@@ -35,6 +36,13 @@ public final class AntarchyConfigModuleFabric {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
ConfigResetGuard.wipeIfNeeded(
|
||||||
|
CONFIG_DIR,
|
||||||
|
ConfigSection.MOBS.path,
|
||||||
|
ConfigSection.TOOLS.path,
|
||||||
|
ConfigSection.MISC.path,
|
||||||
|
LEGACY_CONFIG_PATH
|
||||||
|
);
|
||||||
JsonObject legacy = readConfig(LEGACY_CONFIG_PATH);
|
JsonObject legacy = readConfig(LEGACY_CONFIG_PATH);
|
||||||
Map<ConfigSection, JsonObject> loaded = new LinkedHashMap<>();
|
Map<ConfigSection, JsonObject> loaded = new LinkedHashMap<>();
|
||||||
Map<ConfigSection, JsonObject> normalized = new LinkedHashMap<>();
|
Map<ConfigSection, JsonObject> normalized = new LinkedHashMap<>();
|
||||||
|
|||||||
@@ -396,6 +396,10 @@ public final class AntarchyFabricContent {
|
|||||||
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_WALK = registerSoundEvent("bomber_walk");
|
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_WALK = registerSoundEvent("bomber_walk");
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_KNOCK = registerSoundEvent("bomber_knock");
|
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_KNOCK = registerSoundEvent("bomber_knock");
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_EXPLODE = registerSoundEvent("bomber_explode");
|
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_EXPLODE = registerSoundEvent("bomber_explode");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> TORETERROR_IDLE = registerSoundEvent("toreterror_idle");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> TORETERROR_HURT = registerSoundEvent("toreterror_hurt");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> TORETERROR_DEATH = registerSoundEvent("toreterror_death");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> TORETERROR_BOMBER_FIRE = registerSoundEvent("toreterror_bomber_fire");
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> STINKY_FLY_SOUND = registerSoundEvent("stinky_fly");
|
public static final DeferredHolder<SoundEvent, SoundEvent> STINKY_FLY_SOUND = registerSoundEvent("stinky_fly");
|
||||||
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");
|
||||||
@@ -1814,7 +1818,7 @@ public final class AntarchyFabricContent {
|
|||||||
() -> new DeferredSpawnEggItem(LURKING_TERROR, 0x2D5A1B, 0x8B0000, new Item.Properties()));
|
() -> new DeferredSpawnEggItem(LURKING_TERROR, 0x2D5A1B, 0x8B0000, new Item.Properties()));
|
||||||
|
|
||||||
public static final DeferredHolder<EntityType<?>, EntityType<com.craisinlord.antarchy.content.entity.CheepEntity>> CHEEP = ENTITY_TYPES.register("cheep",
|
public static final DeferredHolder<EntityType<?>, EntityType<com.craisinlord.antarchy.content.entity.CheepEntity>> CHEEP = ENTITY_TYPES.register("cheep",
|
||||||
() -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.CheepEntity::new, MobCategory.WATER_CREATURE)
|
() -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.CheepEntity::new, MobCategory.WATER_AMBIENT)
|
||||||
.sized(1.0F, 1.2F)
|
.sized(1.0F, 1.2F)
|
||||||
.clientTrackingRange(8)
|
.clientTrackingRange(8)
|
||||||
.build("cheep"));
|
.build("cheep"));
|
||||||
@@ -1828,8 +1832,6 @@ public final class AntarchyFabricContent {
|
|||||||
.sized(3.0F, 4.0F)
|
.sized(3.0F, 4.0F)
|
||||||
.clientTrackingRange(12)
|
.clientTrackingRange(12)
|
||||||
.build("hercules_beetle"));
|
.build("hercules_beetle"));
|
||||||
public static final DeferredItem<Item> CHEEP_ITEM = ITEMS.register("cheep",
|
|
||||||
() -> new Item(new Item.Properties().food(new FoodProperties.Builder().nutrition(2).saturationModifier(0.2F).build())));
|
|
||||||
public static final DeferredItem<DeferredSpawnEggItem> CHEEP_SPAWN_EGG = ITEMS.register("cheep_spawn_egg",
|
public static final DeferredItem<DeferredSpawnEggItem> CHEEP_SPAWN_EGG = ITEMS.register("cheep_spawn_egg",
|
||||||
() -> new DeferredSpawnEggItem(CHEEP, 0xFF00AA, 0x00FF44, new Item.Properties()));
|
() -> new DeferredSpawnEggItem(CHEEP, 0xFF00AA, 0x00FF44, new Item.Properties()));
|
||||||
public static final DeferredItem<DeferredSpawnEggItem> DORRIE_SPAWN_EGG = ITEMS.register("dorrie_spawn_egg",
|
public static final DeferredItem<DeferredSpawnEggItem> DORRIE_SPAWN_EGG = ITEMS.register("dorrie_spawn_egg",
|
||||||
@@ -1968,6 +1970,7 @@ public final class AntarchyFabricContent {
|
|||||||
SpawnPlacements.register(KRAKEN.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, KrakenEntity::canSpawn);
|
SpawnPlacements.register(KRAKEN.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, KrakenEntity::canSpawn);
|
||||||
SpawnPlacements.register(MISSILE_SQUID.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, MissileSquidEntity::canSpawn);
|
SpawnPlacements.register(MISSILE_SQUID.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, MissileSquidEntity::canSpawn);
|
||||||
SpawnPlacements.register(OCTOPUS_BOMB.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, OctopusBombEntity::canSpawn);
|
SpawnPlacements.register(OCTOPUS_BOMB.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, OctopusBombEntity::canSpawn);
|
||||||
|
SpawnPlacements.register(CHEEP.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.AbstractFish::checkSurfaceWaterAnimalSpawnRules);
|
||||||
SpawnPlacements.register(NIGHTMARE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, NightmareEntity::canSpawn);
|
SpawnPlacements.register(NIGHTMARE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, NightmareEntity::canSpawn);
|
||||||
SpawnPlacements.register(MOLEWORM.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, MolewormEntity::canSpawn);
|
SpawnPlacements.register(MOLEWORM.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, MolewormEntity::canSpawn);
|
||||||
SpawnPlacements.register(MANTIS.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, MantisEntity::canSpawn);
|
SpawnPlacements.register(MANTIS.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, MantisEntity::canSpawn);
|
||||||
@@ -2081,7 +2084,6 @@ public final class AntarchyFabricContent {
|
|||||||
"hercules_beetle_spawn_egg",
|
"hercules_beetle_spawn_egg",
|
||||||
"creeping_horror_spawn_egg", "lurking_terror_spawn_egg" -> 90;
|
"creeping_horror_spawn_egg", "lurking_terror_spawn_egg" -> 90;
|
||||||
case "stink_bug", "chiten" -> 22;
|
case "stink_bug", "chiten" -> 22;
|
||||||
case "cheep" -> 21;
|
|
||||||
case "water_cannon" -> 52;
|
case "water_cannon" -> 52;
|
||||||
case "primordial_helmet", "primordial_chestplate", "primordial_leggings", "primordial_boots" -> 53;
|
case "primordial_helmet", "primordial_chestplate", "primordial_leggings", "primordial_boots" -> 53;
|
||||||
case "jumpy_boots" -> 54;
|
case "jumpy_boots" -> 54;
|
||||||
@@ -2367,7 +2369,6 @@ public final class AntarchyFabricContent {
|
|||||||
CREATIVE_MODE_TABS.register();
|
CREATIVE_MODE_TABS.register();
|
||||||
|
|
||||||
// Wire common-module accessors after all registrations are complete.
|
// Wire common-module accessors after all registrations are complete.
|
||||||
AntarchyObjects.CHEEP_ITEM = () -> CHEEP_ITEM.get();
|
|
||||||
AntarchyObjects.setHerculesBeetle(() -> HERCULES_BEETLE.get());
|
AntarchyObjects.setHerculesBeetle(() -> HERCULES_BEETLE.get());
|
||||||
|
|
||||||
AntarchySoundEvents.bind(
|
AntarchySoundEvents.bind(
|
||||||
@@ -2484,6 +2485,10 @@ public final class AntarchyFabricContent {
|
|||||||
BOMBER_WALK,
|
BOMBER_WALK,
|
||||||
BOMBER_KNOCK,
|
BOMBER_KNOCK,
|
||||||
BOMBER_EXPLODE,
|
BOMBER_EXPLODE,
|
||||||
|
TORETERROR_IDLE,
|
||||||
|
TORETERROR_HURT,
|
||||||
|
TORETERROR_DEATH,
|
||||||
|
TORETERROR_BOMBER_FIRE,
|
||||||
STINKY_FLY_SOUND,
|
STINKY_FLY_SOUND,
|
||||||
CREEPING_HORROR_GROWL,
|
CREEPING_HORROR_GROWL,
|
||||||
CREEPING_HORROR_HURT,
|
CREEPING_HORROR_HURT,
|
||||||
|
|||||||
+10
@@ -1,8 +1,11 @@
|
|||||||
package com.craisinlord.antarchy.neoforge;
|
package com.craisinlord.antarchy.neoforge;
|
||||||
|
|
||||||
import com.craisinlord.antarchy.config.AntarchySettings;
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import com.craisinlord.antarchy.config.ConfigResetGuard;
|
||||||
import com.craisinlord.antarchy.content.network.HerculesBeetleImpactShakePayload;
|
import com.craisinlord.antarchy.content.network.HerculesBeetleImpactShakePayload;
|
||||||
import com.craisinlord.antarchy.content.network.HerculesBeetleImpactShakeSync;
|
import com.craisinlord.antarchy.content.network.HerculesBeetleImpactShakeSync;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import net.neoforged.fml.loading.FMLPaths;
|
||||||
import net.neoforged.neoforge.network.PacketDistributor;
|
import net.neoforged.neoforge.network.PacketDistributor;
|
||||||
import net.neoforged.fml.ModContainer;
|
import net.neoforged.fml.ModContainer;
|
||||||
import net.neoforged.fml.config.ModConfig;
|
import net.neoforged.fml.config.ModConfig;
|
||||||
@@ -12,6 +15,13 @@ public final class AntarchyConfigModuleNeoforge {
|
|||||||
private AntarchyConfigModuleNeoforge() {}
|
private AntarchyConfigModuleNeoforge() {}
|
||||||
|
|
||||||
public static void init(ModContainer modContainer) {
|
public static void init(ModContainer modContainer) {
|
||||||
|
Path configDir = FMLPaths.CONFIGDIR.get().resolve("antarchy");
|
||||||
|
ConfigResetGuard.wipeIfNeeded(
|
||||||
|
configDir,
|
||||||
|
configDir.resolve("antarchy_mobs.toml"),
|
||||||
|
configDir.resolve("antarchy_tools.toml"),
|
||||||
|
configDir.resolve("antarchy_misc.toml")
|
||||||
|
);
|
||||||
modContainer.registerConfig(ModConfig.Type.COMMON, AntarchyMobsConfig.SPEC, "antarchy/antarchy_mobs.toml");
|
modContainer.registerConfig(ModConfig.Type.COMMON, AntarchyMobsConfig.SPEC, "antarchy/antarchy_mobs.toml");
|
||||||
modContainer.registerConfig(ModConfig.Type.COMMON, AntarchyToolsConfig.SPEC, "antarchy/antarchy_tools.toml");
|
modContainer.registerConfig(ModConfig.Type.COMMON, AntarchyToolsConfig.SPEC, "antarchy/antarchy_tools.toml");
|
||||||
modContainer.registerConfig(ModConfig.Type.COMMON, AntarchyMiscConfig.SPEC, "antarchy/antarchy_misc.toml");
|
modContainer.registerConfig(ModConfig.Type.COMMON, AntarchyMiscConfig.SPEC, "antarchy/antarchy_misc.toml");
|
||||||
|
|||||||
@@ -137,6 +137,10 @@ public class AntarchyNeoforge {
|
|||||||
AntarchyNeoforgeSounds.BOMBER_WALK,
|
AntarchyNeoforgeSounds.BOMBER_WALK,
|
||||||
AntarchyNeoforgeSounds.BOMBER_KNOCK,
|
AntarchyNeoforgeSounds.BOMBER_KNOCK,
|
||||||
AntarchyNeoforgeSounds.BOMBER_EXPLODE,
|
AntarchyNeoforgeSounds.BOMBER_EXPLODE,
|
||||||
|
AntarchyNeoforgeSounds.TORETERROR_IDLE,
|
||||||
|
AntarchyNeoforgeSounds.TORETERROR_HURT,
|
||||||
|
AntarchyNeoforgeSounds.TORETERROR_DEATH,
|
||||||
|
AntarchyNeoforgeSounds.TORETERROR_BOMBER_FIRE,
|
||||||
AntarchyNeoforgeSounds.STINKY_FLY,
|
AntarchyNeoforgeSounds.STINKY_FLY,
|
||||||
AntarchyNeoforgeSounds.CREEPING_HORROR_GROWL,
|
AntarchyNeoforgeSounds.CREEPING_HORROR_GROWL,
|
||||||
AntarchyNeoforgeSounds.CREEPING_HORROR_HURT,
|
AntarchyNeoforgeSounds.CREEPING_HORROR_HURT,
|
||||||
|
|||||||
-14
@@ -74,7 +74,6 @@ public final class AntarchyNeoForgeEvents {
|
|||||||
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::onInvertedEffectExpired);
|
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::onInvertedEffectExpired);
|
||||||
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleUltimateBowDamage);
|
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleUltimateBowDamage);
|
||||||
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleUltimateCrossbowDamage);
|
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleUltimateCrossbowDamage);
|
||||||
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleNightmareSwordDamage);
|
|
||||||
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleNightmareArmorDoubleDamage);
|
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleNightmareArmorDoubleDamage);
|
||||||
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleScorpionWhipAttackEntity);
|
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleScorpionWhipAttackEntity);
|
||||||
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleScorpionWhipLeftClickBlock);
|
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleScorpionWhipLeftClickBlock);
|
||||||
@@ -672,19 +671,6 @@ public final class AntarchyNeoForgeEvents {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void handleNightmareSwordDamage(LivingIncomingDamageEvent event) {
|
|
||||||
net.minecraft.world.damagesource.DamageSource source = event.getSource();
|
|
||||||
if (!(source.getEntity() instanceof Player attacker)) return;
|
|
||||||
if (!(attacker.getMainHandItem().getItem() instanceof NightmareSwordItem)) return;
|
|
||||||
|
|
||||||
float maxHealth = attacker.getMaxHealth();
|
|
||||||
if (maxHealth <= 0) return;
|
|
||||||
float missingFraction = (maxHealth - attacker.getHealth()) / maxHealth;
|
|
||||||
float baseDamage = (float) AntarchySettings.nightmareSwordBaseDamage();
|
|
||||||
float scalingFactor = (float) AntarchySettings.nightmareSwordScalingFactor();
|
|
||||||
|
|
||||||
event.setAmount(baseDamage + missingFraction * scalingFactor * baseDamage);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void handleNightmareArmorDoubleDamage(LivingIncomingDamageEvent event) {
|
static void handleNightmareArmorDoubleDamage(LivingIncomingDamageEvent event) {
|
||||||
net.minecraft.world.damagesource.DamageSource source = event.getSource();
|
net.minecraft.world.damagesource.DamageSource source = event.getSource();
|
||||||
|
|||||||
+1
-2
@@ -144,7 +144,6 @@ public class AntarchyNeoforgeCreativeModeTabs {
|
|||||||
event.accept(AntarchyNeoforgeItems.MOLEVORE_NOSE.get());
|
event.accept(AntarchyNeoforgeItems.MOLEVORE_NOSE.get());
|
||||||
event.accept(AntarchyNeoforgeItems.MOLEWORM_ITEM.get());
|
event.accept(AntarchyNeoforgeItems.MOLEWORM_ITEM.get());
|
||||||
event.accept(AntarchyNeoforgeItems.MUD_PIE.get());
|
event.accept(AntarchyNeoforgeItems.MUD_PIE.get());
|
||||||
event.accept(AntarchyNeoforgeItems.CHEEP.get());
|
|
||||||
event.accept(AntarchyNeoforgeItems.LUCID_EYE.get());
|
event.accept(AntarchyNeoforgeItems.LUCID_EYE.get());
|
||||||
event.accept(AntarchyNeoforgeItems.BLOOD_CRYSTAL_SHARD.get());
|
event.accept(AntarchyNeoforgeItems.BLOOD_CRYSTAL_SHARD.get());
|
||||||
event.accept(AntarchyNeoforgeItems.BLOOD_CRYSTAL_APPLE.get());
|
event.accept(AntarchyNeoforgeItems.BLOOD_CRYSTAL_APPLE.get());
|
||||||
@@ -436,7 +435,7 @@ public class AntarchyNeoforgeCreativeModeTabs {
|
|||||||
case "ultimate_bow", "ultimate_crossbow" -> 20;
|
case "ultimate_bow", "ultimate_crossbow" -> 20;
|
||||||
|
|
||||||
// 21 - Foods
|
// 21 - Foods
|
||||||
case "cloud_shark_fin_soup", "mud_pie", "cheep", "rainbow_sugar",
|
case "cloud_shark_fin_soup", "mud_pie", "rainbow_sugar",
|
||||||
"blood_crystal_apple" -> 21;
|
"blood_crystal_apple" -> 21;
|
||||||
|
|
||||||
// 22 - Crafting ingredients
|
// 22 - Crafting ingredients
|
||||||
|
|||||||
+1
-1
@@ -303,7 +303,7 @@ public final class AntarchyNeoforgeEntites {
|
|||||||
.clientTrackingRange(10)
|
.clientTrackingRange(10)
|
||||||
.build("lurking_terror"));
|
.build("lurking_terror"));
|
||||||
public static final DeferredHolder<EntityType<?>, EntityType<CheepEntity>> CHEEP = ENTITY_TYPES.register("cheep",
|
public static final DeferredHolder<EntityType<?>, EntityType<CheepEntity>> CHEEP = ENTITY_TYPES.register("cheep",
|
||||||
() -> EntityType.Builder.of(CheepEntity::new, MobCategory.WATER_CREATURE)
|
() -> EntityType.Builder.of(CheepEntity::new, MobCategory.WATER_AMBIENT)
|
||||||
.sized(1.0F, 1.2F)
|
.sized(1.0F, 1.2F)
|
||||||
.clientTrackingRange(8)
|
.clientTrackingRange(8)
|
||||||
.build("cheep"));
|
.build("cheep"));
|
||||||
|
|||||||
-6
@@ -362,12 +362,6 @@ public final class AntarchyNeoforgeItems {
|
|||||||
public static final DeferredItem<Item> URANIUM_INGOT = ITEMS.registerSimpleItem("uranium_ingot", new Item.Properties().rarity(Rarity.UNCOMMON).fireResistant());
|
public static final DeferredItem<Item> URANIUM_INGOT = ITEMS.registerSimpleItem("uranium_ingot", new Item.Properties().rarity(Rarity.UNCOMMON).fireResistant());
|
||||||
public static final DeferredItem<Item> TITANIUM_INGOT = ITEMS.registerSimpleItem("titanium_ingot", new Item.Properties().rarity(Rarity.UNCOMMON).fireResistant());
|
public static final DeferredItem<Item> TITANIUM_INGOT = ITEMS.registerSimpleItem("titanium_ingot", new Item.Properties().rarity(Rarity.UNCOMMON).fireResistant());
|
||||||
public static final DeferredItem<Item> MOLEVORE_NOSE = ITEMS.registerSimpleItem("molevore_nose", new Item.Properties().rarity(Rarity.RARE));
|
public static final DeferredItem<Item> MOLEVORE_NOSE = ITEMS.registerSimpleItem("molevore_nose", new Item.Properties().rarity(Rarity.RARE));
|
||||||
public static final DeferredItem<Item> CHEEP = ITEMS.register("cheep",
|
|
||||||
() -> new Item(new Item.Properties()
|
|
||||||
.food(new FoodProperties.Builder()
|
|
||||||
.nutrition(2)
|
|
||||||
.saturationModifier(0.2F)
|
|
||||||
.build())));
|
|
||||||
public static final DeferredItem<Item> MOLEWORM_ITEM = ITEMS.register("moleworm",
|
public static final DeferredItem<Item> MOLEWORM_ITEM = ITEMS.register("moleworm",
|
||||||
() -> new Item(new Item.Properties()
|
() -> new Item(new Item.Properties()
|
||||||
.food(new FoodProperties.Builder()
|
.food(new FoodProperties.Builder()
|
||||||
|
|||||||
+4
@@ -124,6 +124,10 @@ public final class AntarchyNeoforgeSounds {
|
|||||||
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_WALK = registerSoundEvent("bomber_walk");
|
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_WALK = registerSoundEvent("bomber_walk");
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_KNOCK = registerSoundEvent("bomber_knock");
|
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_KNOCK = registerSoundEvent("bomber_knock");
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_EXPLODE = registerSoundEvent("bomber_explode");
|
public static final DeferredHolder<SoundEvent, SoundEvent> BOMBER_EXPLODE = registerSoundEvent("bomber_explode");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> TORETERROR_IDLE = registerSoundEvent("toreterror_idle");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> TORETERROR_HURT = registerSoundEvent("toreterror_hurt");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> TORETERROR_DEATH = registerSoundEvent("toreterror_death");
|
||||||
|
public static final DeferredHolder<SoundEvent, SoundEvent> TORETERROR_BOMBER_FIRE = registerSoundEvent("toreterror_bomber_fire");
|
||||||
public static final DeferredHolder<SoundEvent, SoundEvent> STINKY_FLY = registerSoundEvent("stinky_fly");
|
public static final DeferredHolder<SoundEvent, SoundEvent> STINKY_FLY = registerSoundEvent("stinky_fly");
|
||||||
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");
|
||||||
|
|||||||
Reference in new issue
Block a user