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();
}
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);
}
@@ -295,7 +296,9 @@ public class BluestoneWireBlock extends Block implements BluestoneSignalSource {
}
private int calculateTargetStrength(Level level, BlockPos pos) {
shouldSignal = false;
int external = this.getExternalSignal(level, pos);
shouldSignal = true;
int neighborWirePower = 0;
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) {
continue;
}
signal = Math.max(signal, neighborState.getSignal(level, neighborPos, direction));
signal = Math.max(signal, BluestoneSignalHelper.getSignalExcludingRedstoneWire(level, neighborPos, direction.getOpposite()));
if (signal >= 15) {
return 15;
}
@@ -99,7 +99,7 @@ public class ElythiaFloraFeature extends Feature<NoneFeatureConfiguration> {
}) {
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));
}
@@ -13,6 +13,8 @@ import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityDimensions;
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.level.block.BaseRailBlock;
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)
private void antarchy$mirrorPassengerAttachment(Entity passenger, EntityDimensions dimensions, float partialTick, CallbackInfoReturnable<Vec3> cir) {
if (this.antarchy$isOnAntimetalRail()) {
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));
}
}
@@ -2,10 +2,36 @@
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "minecraft:pink_petals"
}
"type": "minecraft:weighted_state_provider",
"entries": [
{
"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": [
{
"type": "minecraft:count",
"count": 3
"count": 12
},
{
"type": "minecraft:in_square"
@@ -1,6 +1,10 @@
{
"replace": false,
"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:popcorn",
"antarchy:peach_pie",
"antarchy:cheep",
"antarchy:broodfruit",
"antarchy:raw_bug_meat",
"antarchy:cooked_bug_meat",
"antarchy:raw_venison",
"antarchy:cooked_venison",
"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"
]
}