Added various missing tags, finalize 1.0

This commit is contained in:
craisinlord committed 2026-07-24 17:09:30 -05:00
1 parent 2795134604
commit 9089f26a44
21 files changed
+183 -14

No files matched your search

@@ -0,0 +1,41 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.content.fluid.AntarchyFluidChecks;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.block.GlowLichenBlock;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;
public class AmberLichenBlock extends GlowLichenBlock {
public static final MapCodec<AmberLichenBlock> CODEC = simpleCodec(AmberLichenBlock::new);
public AmberLichenBlock(BlockBehaviour.Properties properties) {
super(properties);
}
@Override
public MapCodec<GlowLichenBlock> codec() {
return (MapCodec<GlowLichenBlock>) (MapCodec<?>) CODEC;
}
@Override
public boolean canPlaceLiquid(Player player, BlockGetter level, BlockPos pos, BlockState state, Fluid fluid) {
return fluid == Fluids.WATER || AntarchyFluidChecks.isBile(fluid.defaultFluidState());
}
@Override
public boolean placeLiquid(LevelAccessor level, BlockPos pos, BlockState state, FluidState fluidState) {
if (AntarchyFluidChecks.isBile(fluidState)) {
level.setBlock(pos, fluidState.createLegacyBlock(), 3);
return true;
}
return super.placeLiquid(level, pos, state, fluidState);
}
}
@@ -121,7 +121,8 @@ public class BluestoneWireBlock extends Block implements BluestoneSignalSource {
return net.minecraft.world.level.block.Blocks.AIR.defaultBlockState(); return net.minecraft.world.level.block.Blocks.AIR.defaultBlockState();
} }
if (direction.getAxis().isHorizontal() || direction == Direction.UP || direction == Direction.DOWN) { if (direction.getAxis().isHorizontal() || direction == Direction.UP || direction == Direction.DOWN) {
return this.calculateShape(level, pos, state); BlockState shaped = this.calculateShape(level, pos, state);
return level instanceof Level actualLevel ? this.updatePowerFromNeighbors(actualLevel, pos, shaped) : shaped;
} }
return super.updateShape(state, direction, neighborState, level, pos, neighborPos); return super.updateShape(state, direction, neighborState, level, pos, neighborPos);
} }
@@ -295,7 +296,9 @@ public class BluestoneWireBlock extends Block implements BluestoneSignalSource {
} }
private int calculateTargetStrength(Level level, BlockPos pos) { private int calculateTargetStrength(Level level, BlockPos pos) {
shouldSignal = false;
int external = this.getExternalSignal(level, pos); int external = this.getExternalSignal(level, pos);
shouldSignal = true;
int neighborWirePower = 0; int neighborWirePower = 0;
boolean openBelowCurrent = !level.getBlockState(pos.below()).isRedstoneConductor(level, pos.below()); boolean openBelowCurrent = !level.getBlockState(pos.below()).isRedstoneConductor(level, pos.below());
@@ -324,7 +327,7 @@ public class BluestoneWireBlock extends Block implements BluestoneSignalSource {
if (neighborState.getBlock() instanceof BluestoneWireBlock) { if (neighborState.getBlock() instanceof BluestoneWireBlock) {
continue; continue;
} }
signal = Math.max(signal, neighborState.getSignal(level, neighborPos, direction)); signal = Math.max(signal, BluestoneSignalHelper.getSignalExcludingRedstoneWire(level, neighborPos, direction.getOpposite()));
if (signal >= 15) { if (signal >= 15) {
return 15; return 15;
} }
@@ -99,7 +99,7 @@ public class ElythiaFloraFeature extends Feature<NoneFeatureConfiguration> {
}) { }) {
placedAny |= this.placeMilkweedPatch(level, origin, random, AntarchyObjects.PINK_MILKWEED.get()); placedAny |= this.placeMilkweedPatch(level, origin, random, AntarchyObjects.PINK_MILKWEED.get());
} }
if (this.variant == Variant.PEACH_FOREST && random.nextFloat() < 0.035F) { if (this.variant == Variant.PEACH_FOREST && random.nextFloat() < 0.14F) {
placedAny |= this.placeMilkweedPatch(level, origin, random, antarchyBlock(CAMELLIA_ID)); placedAny |= this.placeMilkweedPatch(level, origin, random, antarchyBlock(CAMELLIA_ID));
} }
@@ -13,6 +13,8 @@ import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityDimensions; import net.minecraft.world.entity.EntityDimensions;
import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.npc.Villager;
import net.minecraft.world.entity.npc.WanderingTrader;
import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.AbstractMinecart;
import net.minecraft.world.level.block.BaseRailBlock; import net.minecraft.world.level.block.BaseRailBlock;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
@@ -97,11 +99,19 @@ public abstract class AbstractMinecartMixin implements AntimetalMinecartAccess {
} }
} }
@Unique
private static final double ANTARCHY$STANDING_PASSENGER_OFFSET = 0.1875D;
@Inject(method = "getPassengerAttachmentPoint", at = @At("RETURN"), cancellable = true) @Inject(method = "getPassengerAttachmentPoint", at = @At("RETURN"), cancellable = true)
private void antarchy$mirrorPassengerAttachment(Entity passenger, EntityDimensions dimensions, float partialTick, CallbackInfoReturnable<Vec3> cir) { private void antarchy$mirrorPassengerAttachment(Entity passenger, EntityDimensions dimensions, float partialTick, CallbackInfoReturnable<Vec3> cir) {
if (this.antarchy$isOnAntimetalRail()) { if (this.antarchy$isOnAntimetalRail()) {
Vec3 original = cir.getReturnValue(); Vec3 original = cir.getReturnValue();
double mirroredY = 2.0D * AntimetalRailHelper.CART_MODEL_PIVOT_Y - original.y + 1.0D; boolean standing = passenger instanceof Villager || passenger instanceof WanderingTrader;
double sourceY = standing ? original.y + ANTARCHY$STANDING_PASSENGER_OFFSET : original.y;
double mirroredY = 2.0D * AntimetalRailHelper.CART_MODEL_PIVOT_Y - sourceY + 1.0D;
if (standing) {
mirroredY -= ANTARCHY$STANDING_PASSENGER_OFFSET;
}
cir.setReturnValue(new Vec3(original.x, mirroredY, original.z)); cir.setReturnValue(new Vec3(original.x, mirroredY, original.z));
} }
} }
@@ -2,10 +2,36 @@
"type": "minecraft:simple_block", "type": "minecraft:simple_block",
"config": { "config": {
"to_place": { "to_place": {
"type": "minecraft:simple_state_provider", "type": "minecraft:weighted_state_provider",
"state": { "entries": [
"Name": "minecraft:pink_petals" {
} "data": {
"Name": "minecraft:pink_petals",
"Properties": {
"flower_amount": "2"
}
},
"weight": 1
},
{
"data": {
"Name": "minecraft:pink_petals",
"Properties": {
"flower_amount": "3"
}
},
"weight": 1
},
{
"data": {
"Name": "minecraft:pink_petals",
"Properties": {
"flower_amount": "4"
}
},
"weight": 1
}
]
} }
} }
} }
@@ -3,7 +3,7 @@
"placement": [ "placement": [
{ {
"type": "minecraft:count", "type": "minecraft:count",
"count": 3 "count": 12
}, },
{ {
"type": "minecraft:in_square" "type": "minecraft:in_square"
@@ -1,6 +1,10 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"antarchy:moleworm" "antarchy:moleworm",
"antarchy:raw_bug_meat",
"antarchy:cooked_bug_meat",
"antarchy:raw_venison",
"antarchy:cooked_venison"
] ]
} }
@@ -6,6 +6,10 @@
"antarchy:cornbread", "antarchy:cornbread",
"antarchy:popcorn", "antarchy:popcorn",
"antarchy:peach_pie", "antarchy:peach_pie",
"antarchy:cheep",
"antarchy:broodfruit",
"antarchy:raw_bug_meat",
"antarchy:cooked_bug_meat",
"antarchy:raw_venison", "antarchy:raw_venison",
"antarchy:cooked_venison", "antarchy:cooked_venison",
"antarchy:mud_pie", "antarchy:mud_pie",
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"antarchy:cooked_venison",
"antarchy:cooked_bug_meat"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"antarchy:peach"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"antarchy:cheep"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"antarchy:raw_venison",
"antarchy:raw_bug_meat"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"antarchy:corn_seeds"
]
}
@@ -0,0 +1,11 @@
{
"replace": false,
"values": [
"antarchy:ultimate_sword",
"antarchy:battle_axe",
"antarchy:nightmare_sword",
"antarchy:basilisk_dagger",
"antarchy:emperor_scorpion_whip",
"antarchy:attitude_adjuster"
]
}
@@ -0,0 +1,11 @@
{
"replace": false,
"values": [
"antarchy:ultimate_bow",
"antarchy:ultimate_crossbow",
"antarchy:krakens_grasp",
"antarchy:water_cannon",
"antarchy:squidzooka",
"antarchy:rpo_launcher"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"antarchy:peach"
]
}
@@ -0,0 +1,9 @@
{
"replace": false,
"values": [
"antarchy:raw_venison",
"antarchy:cooked_venison",
"antarchy:raw_bug_meat",
"antarchy:cooked_bug_meat"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"antarchy:corn_seeds"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"antarchy:corn_seeds"
]
}
@@ -546,8 +546,8 @@ public final class AntarchyFabricBlocks {
() -> new UmbralMossCarpetBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_CARPET).noOcclusion())); () -> new UmbralMossCarpetBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_CARPET).noOcclusion()));
public static final DeferredBlock<GlowLichenBlock> AMBER_LICHEN = BLOCKS.register("amber_lichen", public static final DeferredBlock<AmberLichenBlock> AMBER_LICHEN = BLOCKS.register("amber_lichen",
() -> new GlowLichenBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.GLOW_LICHEN).lightLevel(state -> 4))); () -> new AmberLichenBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.GLOW_LICHEN).lightLevel(state -> 4)));
public static final DeferredBlock<Block> BILE_VEIN = BLOCKS.register("bile_vein", public static final DeferredBlock<Block> BILE_VEIN = BLOCKS.register("bile_vein",
@@ -303,8 +303,8 @@ public final class AntarchyNeoforgeBlocks {
() -> new AmberMossBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_BLOCK))); () -> new AmberMossBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_BLOCK)));
public static final DeferredBlock<UmbralMossCarpetBlock> AMBER_MOSS_CARPET = BLOCKS.register("amber_moss_carpet", public static final DeferredBlock<UmbralMossCarpetBlock> AMBER_MOSS_CARPET = BLOCKS.register("amber_moss_carpet",
() -> new UmbralMossCarpetBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_CARPET).noOcclusion())); () -> new UmbralMossCarpetBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_CARPET).noOcclusion()));
public static final DeferredBlock<GlowLichenBlock> AMBER_LICHEN = BLOCKS.register("amber_lichen", public static final DeferredBlock<AmberLichenBlock> AMBER_LICHEN = BLOCKS.register("amber_lichen",
() -> new GlowLichenBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.GLOW_LICHEN).lightLevel(state -> 4))); () -> new AmberLichenBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.GLOW_LICHEN).lightLevel(state -> 4)));
public static final DeferredBlock<Block> BILE_VEIN = BLOCKS.register("bile_vein", public static final DeferredBlock<Block> BILE_VEIN = BLOCKS.register("bile_vein",
() -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.NETHERRACK).lightLevel(state -> 2))); () -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.NETHERRACK).lightLevel(state -> 2)));
public static final DeferredBlock<CreepvineBlock> CREEPVINE = BLOCKS.register("creepvine", public static final DeferredBlock<CreepvineBlock> CREEPVINE = BLOCKS.register("creepvine",