fix sign crash, no more holes in elythia, brutalfly cacoon perf improvements, shake hanlder perf fix, herc beetle improvements, new triffifd texture, new spit bug, new lurking terror

This commit is contained in:
craisinlord committed 2026-07-02 00:51:53 -05:00
1 parent 8cabdb33bf
commit c478e560f9
49 files changed
+906 -447

No files matched your search

@@ -516,13 +516,13 @@ public final class AntarchyFabricContent {
() -> new TorchflowerBushBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.PEONY)
.lightLevel(state -> AntarchySettings.glowingTorchflowers() ? 15 : 0)));
public static final DeferredBlock<net.minecraft.world.level.block.StandingSignBlock> OURANWOOD_SIGN = BLOCKS.register("ouranwood_sign",
() -> new net.minecraft.world.level.block.StandingSignBlock(net.minecraft.world.level.block.state.properties.WoodType.JUNGLE, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN)));
() -> new net.minecraft.world.level.block.StandingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN)));
public static final DeferredBlock<net.minecraft.world.level.block.WallSignBlock> OURANWOOD_WALL_SIGN = BLOCKS.register("ouranwood_wall_sign",
() -> new net.minecraft.world.level.block.WallSignBlock(net.minecraft.world.level.block.state.properties.WoodType.JUNGLE, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_WALL_SIGN)));
() -> new net.minecraft.world.level.block.WallSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_WALL_SIGN)));
public static final DeferredBlock<net.minecraft.world.level.block.CeilingHangingSignBlock> OURANWOOD_HANGING_SIGN = BLOCKS.register("ouranwood_hanging_sign",
() -> new net.minecraft.world.level.block.CeilingHangingSignBlock(net.minecraft.world.level.block.state.properties.WoodType.JUNGLE, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_HANGING_SIGN)));
() -> new net.minecraft.world.level.block.CeilingHangingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_HANGING_SIGN)));
public static final DeferredBlock<net.minecraft.world.level.block.WallHangingSignBlock> OURANWOOD_WALL_HANGING_SIGN = BLOCKS.register("ouranwood_wall_hanging_sign",
() -> new net.minecraft.world.level.block.WallHangingSignBlock(net.minecraft.world.level.block.state.properties.WoodType.JUNGLE, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_WALL_HANGING_SIGN)));
() -> new net.minecraft.world.level.block.WallHangingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_WALL_HANGING_SIGN)));
public static final DeferredBlock<DuplicatorSaplingBlock> DUPLICATOR_SAPLING = BLOCKS.register("duplicator_sapling",
() -> new DuplicatorSaplingBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_SAPLING).randomTicks().noCollission()));
public static final DeferredBlock<DuctTapeBlock> DUCT_TAPE = BLOCKS.register("duct_tape",
@@ -701,6 +701,8 @@ public final class AntarchyFabricContent {
() -> new WaspNestBlock(AntarchyFabricContent::waspNestBlockEntityType, BlockBehaviour.Properties.ofFullCopy(Blocks.BEE_NEST)));
public static final DeferredBlock<com.craisinlord.antarchy.content.block.OuranwoodSquirrelNestBlock> OURANWOOD_SQUIRREL_NEST = BLOCKS.register("ouranwood_squirrel_nest",
() -> new com.craisinlord.antarchy.content.block.OuranwoodSquirrelNestBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.COARSE_DIRT).noLootTable()));
public static final DeferredBlock<com.craisinlord.antarchy.content.block.BrutalflyCocoonSpawnerBlock> BRUTALFLY_COCOON_SPAWNER = BLOCKS.register("brutalfly_cocoon_spawner",
() -> new com.craisinlord.antarchy.content.block.BrutalflyCocoonSpawnerBlock(BlockBehaviour.Properties.of().noCollission().instabreak().noLootTable()));
public static final DeferredBlock<HushweedBlock> HUSHWEED = BLOCKS.register("hushweed",
() -> new HushweedBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.AZALEA).noCollission().noOcclusion()));
public static final DeferredHolder<MobEffect, DreadMobEffect> DREAD = MOB_EFFECTS.register("dread", DreadMobEffect::new);
@@ -1717,11 +1719,11 @@ public final class AntarchyFabricContent {
public static final DeferredItem<DeferredSpawnEggItem> TERMITE_SPAWN_EGG = ITEMS.register("termite_spawn_egg",
() -> new DeferredSpawnEggItem(TERMITE, 0xD4B96A, 0xFF6B1A, new Item.Properties()));
public static final DeferredItem<DeferredSpawnEggItem> MOLEWORM_SPAWN_EGG = ITEMS.register("moleworm_spawn_egg",
() -> new DeferredSpawnEggItem(MOLEWORM, 0x7A6150, 0xD2B8A3, new Item.Properties()));
() -> new DeferredSpawnEggItem(MOLEWORM, 0xB8B8B8, 0x8A623A, new Item.Properties()));
public static final DeferredItem<DeferredSpawnEggItem> MANTIS_SPAWN_EGG = ITEMS.register("mantis_spawn_egg",
() -> new DeferredSpawnEggItem(MANTIS, 0xF8F8F2, 0x63B44A, new Item.Properties()));
public static final DeferredItem<DeferredSpawnEggItem> MOLEVORE_SPAWN_EGG = ITEMS.register("molevore_spawn_egg",
() -> new DeferredSpawnEggItem(MOLEVORE, 0x3E2E24, 0xB67B4F, new Item.Properties().rarity(Rarity.UNCOMMON)));
() -> new DeferredSpawnEggItem(MOLEVORE, 0x4A4A4A, 0x6B4A2B, new Item.Properties().rarity(Rarity.UNCOMMON)));
public static final DeferredItem<DeferredSpawnEggItem> TRIFFID_SPAWN_EGG = ITEMS.register("triffid_spawn_egg",
() -> new DeferredSpawnEggItem(TRIFFID, 0x4C8F3A, 0xFF2FB3, new Item.Properties().rarity(Rarity.UNCOMMON)));
public static final DeferredItem<DeferredSpawnEggItem> APPLE_COW_SPAWN_EGG = ITEMS.register("apple_cow_spawn_egg",
@@ -2578,6 +2580,7 @@ public final class AntarchyFabricContent {
() -> WASP_NEST.get(),
() -> HUSHWEED.get(),
() -> OURANWOOD_SQUIRREL_NEST.get(),
() -> BRUTALFLY_COCOON_SPAWNER.get(),
() -> ANT_NEST_BLOCK_ENTITY.get(),
() -> DREAM_CAMPFIRE_BLOCK_ENTITY.get(),
() -> WASP_NEST_BLOCK_ENTITY.get(),
@@ -0,0 +1,17 @@
package com.craisinlord.antarchy.fabric;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.fabric.mixin.WoodTypeInvoker;
import net.minecraft.world.level.block.state.properties.BlockSetType;
import net.minecraft.world.level.block.state.properties.WoodType;
public final class OuranwoodWoodTypes {
public static final WoodType OURANWOOD = register("ouranwood");
private OuranwoodWoodTypes() {
}
private static WoodType register(String name) {
return WoodTypeInvoker.antarchy$register(new WoodType(Antarchy.MODID + ":" + name, BlockSetType.JUNGLE));
}
}
@@ -0,0 +1,13 @@
package com.craisinlord.antarchy.fabric.mixin;
import net.minecraft.world.level.block.state.properties.WoodType;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker;
@Mixin(WoodType.class)
public interface WoodTypeInvoker {
@Invoker("register")
static WoodType antarchy$register(WoodType woodType) {
throw new AssertionError();
}
}
@@ -1,61 +1,45 @@
package com.craisinlord.antarchy.fabric.mixin.client;
import com.craisinlord.antarchy.content.entity.ToreterrorEntity;
import com.craisinlord.antarchy.content.entity.nightmare.NightmareEntity;
import com.craisinlord.antarchy.content.client.CameraShakeClientState;
import com.craisinlord.antarchy.content.client.HerculesBeetleImpactShakeClientState;
import com.craisinlord.antarchy.content.item.BigBerthaItem;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.util.Mth;
import net.minecraft.world.phys.Vec3;
import org.spongepowered.asm.mixin.Final;
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.CallbackInfo;
import net.minecraft.client.renderer.GameRenderer;
@Mixin(GameRenderer.class)
public abstract class CameraShakeMixin {
private static final double MAX_SHAKE_RANGE = 48.0D;
private static final int TORETERROR_SHAKE_TICKS = 25;
private static final double NIGHTMARE_SHAKE_RANGE = 32.0D;
@Shadow @Final private Minecraft minecraft;
@Inject(method = "bobView", at = @At("TAIL"))
private void applyCameraShake(PoseStack poseStack, float partialTick, CallbackInfo ci) {
if (minecraft.level == null || minecraft.player == null) return;
Vec3 cameraPos = minecraft.gameRenderer.getMainCamera().getPosition();
float shakeStrength = 0.0F;
for (ToreterrorEntity toreterror : minecraft.level.getEntitiesOfClass(
ToreterrorEntity.class,
minecraft.player.getBoundingBox().inflate(MAX_SHAKE_RANGE),
t -> t.isAlive() && t.isJumpShaking()
)) {
double distance = Math.sqrt(cameraPos.distanceToSqr(toreterror.position().add(0, toreterror.getBbHeight() * 0.5, 0)));
if (distance > MAX_SHAKE_RANGE) continue;
shakeStrength += (float) ((1.0D - distance / MAX_SHAKE_RANGE) * 1.0F);
if (minecraft.level == null || minecraft.player == null) {
CameraShakeClientState.clear();
return;
}
for (NightmareEntity nightmare : minecraft.level.getEntitiesOfClass(
NightmareEntity.class,
minecraft.player.getBoundingBox().inflate(NIGHTMARE_SHAKE_RANGE),
entity -> entity.isAlive() && entity.isRoaring()
)) {
double distance = Math.sqrt(cameraPos.distanceToSqr(nightmare.position().add(0.0D, nightmare.getBbHeight() * 0.5D, 0.0D)));
if (distance > NIGHTMARE_SHAKE_RANGE) continue;
shakeStrength += (float) ((1.0D - distance / NIGHTMARE_SHAKE_RANGE) * 1.35D);
}
float shakeStrength = CameraShakeClientState.getStrength(minecraft.gameRenderer.getMainCamera().getPosition());
int beetleShakeTicks = HerculesBeetleImpactShakeClientState.getTicks();
if (beetleShakeTicks > 0) {
shakeStrength += (float) beetleShakeTicks / TORETERROR_SHAKE_TICKS * 2.0F;
}
int bigBerthaShakeTicks = BigBerthaItem.clientShakeTicks;
if (bigBerthaShakeTicks > 0) {
shakeStrength += (float) bigBerthaShakeTicks / TORETERROR_SHAKE_TICKS * 2.0F;
}
if (shakeStrength <= 0.0F) return;
float time = (float) (minecraft.player.tickCount + partialTick);
@@ -15,11 +15,11 @@
"BloodglassRespawnMixin",
"DreamCampfireBlockEntityMixin",
"JumpyBootsFallDamageMixin",
"WoodTypeInvoker",
"infinity.RandomSpringMixin",
"infinity.PortalCreatorMixin"
],
"client": [
"client.NightmareCameraShakeMixin",
"client.CameraShakeMixin",
"client.DuctTapeInputMixin",
"client.AntiwaterFogMixin",