Skip to content

Commit

Permalink
Merge branch 'refs/heads/architectury-1.20.2' into architectury-1.20.4
Browse files Browse the repository at this point in the history
# Conflicts:
#	common/src/main/java/com/unlikepaladin/pfm/registry/dynamic/LateBlockRegistry.java
  • Loading branch information
UnlikePaladin committed Jan 1, 2025
2 parents 5f9237b + e941d66 commit 0bfdb49
Show file tree
Hide file tree
Showing 73 changed files with 536 additions and 150 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,24 @@ public static void spawnParticles(Direction facing, World world, BlockPos pos) {
if (world.isClient) {
int x = pos.getX(), y = pos.getY(), z = pos.getZ();
if (facing == Direction.EAST) {
world.addParticle(ParticleIDs.WATER_DROP, x + 0.76, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.76, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.76, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.76, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.76, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.76, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
}
else if (facing == Direction.SOUTH){
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 1.19, z + 0.76, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 1.19, z + 0.76, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 1.19, z + 0.76, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 1.19, z + 0.76, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 1.19, z + 0.76, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 1.19, z + 0.76, 0.0, 0.0, 0.0);
}
else if (facing == Direction.NORTH){
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 1.19, z + 0.24, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 1.19, z + 0.24, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 1.19, z + 0.24, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 1.19, z + 0.24, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 1.19, z + 0.24, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 1.19, z + 0.24, 0.0, 0.0, 0.0);
}
else {
world.addParticle(ParticleIDs.WATER_DROP, x + 0.24, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.24, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.24, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.24, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.24, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.24, y + 1.19, z + 0.5, 0.0, 0.0, 0.0);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,24 +325,24 @@ public static void spawnParticles(Direction facing, World world, BlockPos pos) {
if (world.isClient) {
int x = pos.getX(), y = pos.getY(), z = pos.getZ();
if (facing == Direction.EAST) {
world.addParticle(ParticleIDs.WATER_DROP, x + 0.76, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.76, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.76, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.76, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.76, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.76, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
}
else if (facing == Direction.SOUTH){
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 0.8, z + 0.76, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 0.8, z + 0.76, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 0.8, z + 0.76, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 0.8, z + 0.76, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 0.8, z + 0.76, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 0.8, z + 0.76, 0.0, 0.0, 0.0);
}
else if (facing == Direction.NORTH){
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 0.8, z + 0.24, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 0.8, z + 0.24, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.5, y + 0.8, z + 0.24, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 0.8, z + 0.24, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 0.8, z + 0.24, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.5, y + 0.8, z + 0.24, 0.0, 0.0, 0.0);
}
else {
world.addParticle(ParticleIDs.WATER_DROP, x + 0.24, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.24, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + 0.24, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.24, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.24, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + 0.24, y + 0.8, z + 0.5, 0.0, 0.0, 0.0);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,24 @@ public static void addShowerParticles(World world, BlockPos pos, float[] offset,
int x = pos.getX(), y = pos.getY(), z = pos.getZ();
Random rand = world.random;
if (rand.nextBoolean()) {
world.addParticle(ParticleIDs.WATER_DROP, x + (offset[0] - difference[0]), y + (offset[1] - difference[1]), z + (offset[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + (offset[0] - difference[0]), y + (offset[1] - difference[1]), z + (offset[2]), 0.0, 0.0, 0.0);
} else {
world.addParticle(ParticleIDs.WATER_DROP, x + (offset[0] - difference[0]), y + (offset[1] - difference[1]), z + (offset[2] - difference[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + (offset[0] - difference[0]), y + (offset[1] - difference[1]), z + (offset[2] - difference[2]), 0.0, 0.0, 0.0);
}

if (rand.nextBoolean()) {
world.addParticle(ParticleIDs.WATER_DROP, x + (offset[0] - difference[0]), y + (offset[1] - difference[1]), z + (offset[2] + difference[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + (offset[0] - difference[0]), y + (offset[1] - difference[1]), z + (offset[2] + difference[2]), 0.0, 0.0, 0.0);
} else {
world.addParticle(ParticleIDs.WATER_DROP, x + (offset[0]), y + (offset[1] - difference[1]), z + (offset[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + (offset[0]), y + (offset[1] - difference[1]), z + (offset[2] - difference[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + (offset[0]), y + (offset[1] - difference[1]), z + (offset[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + (offset[0]), y + (offset[1] - difference[1]), z + (offset[2] - difference[2]), 0.0, 0.0, 0.0);
}

if (rand.nextBoolean()) {
world.addParticle(ParticleIDs.WATER_DROP, x + (offset[0]), y + (offset[1] - difference[1]), z + (offset[2] + difference[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + (offset[0] + difference[0]), y + (offset[1] - difference[1]), z + (offset[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + (offset[0]), y + (offset[1] - difference[1]), z + (offset[2] + difference[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + (offset[0] + difference[0]), y + (offset[1] - difference[1]), z + (offset[2]), 0.0, 0.0, 0.0);
} else {
world.addParticle(ParticleIDs.WATER_DROP, x + (offset[0] + difference[0]), y + (offset[1] - difference[1]), z + (offset[2] - difference[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, x + (offset[0] + difference[0]), y + (offset[1] - difference[1]), z + (offset[2] + difference[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + (offset[0] + difference[0]), y + (offset[1] - difference[1]), z + (offset[2] - difference[2]), 0.0, 0.0, 0.0);
world.addParticle(ParticleIDs.WATER_DROP, true, x + (offset[0] + difference[0]), y + (offset[1] - difference[1]), z + (offset[2] + difference[2]), 0.0, 0.0, 0.0);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public static Identifier getTextureId(Block block, String postfix) {
}
}
}
} else if (postfix.equals("top") && !PFMDataGenerator.areAssetsRunning()) {
} else if (postfix.equals("_top") && !PFMDataGenerator.areAssetsRunning()) {
BakedModel model = MinecraftClient.getInstance().getBakedModelManager().getBlockModels().getModel(block.getDefaultState());
if (model != null) {
List<BakedQuad> quadList = model.getQuads(block.getDefaultState(), Direction.UP, Random.create(42L));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ public class ExtraCounterVariant extends VariantBase<ExtraCounterVariant> {
public static ExtraCounterVariant CONCRETE = new ExtraCounterVariant(Blocks.WHITE_CONCRETE, null, "concrete");
public static ExtraCounterVariant SMOOTH_STONE = new ExtraCounterVariant(Blocks.WHITE_CONCRETE, Blocks.SMOOTH_STONE,"smooth_stone");
public static ExtraCounterVariant DEEPSLATE_TILE = new ExtraCounterVariant(Blocks.QUARTZ_BLOCK, Blocks.DEEPSLATE_TILES,"deepslate_tile");
public static ExtraCounterVariant GRANITE_TERRACOTTA = new ExtraCounterVariant(Blocks.WHITE_TERRACOTTA, Blocks.POLISHED_GRANITE,"granite_terracotta");
public static ExtraCounterVariant ANDESITE_OAK = new ExtraCounterVariant(Blocks.STRIPPED_OAK_LOG, Blocks.POLISHED_ANDESITE,"andesite_oak");
public static ExtraCounterVariant DEEPSLATE_DARK_OAK = new ExtraCounterVariant(Blocks.DARK_OAK_PLANKS, Blocks.POLISHED_DEEPSLATE,"deepslate_dark_oak");
public static ExtraCounterVariant BLACKSTONE_CRIMSON = new ExtraCounterVariant(Blocks.CRIMSON_PLANKS, Blocks.POLISHED_BLACKSTONE,"blackstone_crimson");

private final String name;
private final Block baseBlock;
static final List<ExtraCounterVariant> DEFAULT_VARIANTS = new ArrayList<>();
Expand All @@ -33,6 +38,10 @@ public static List<ExtraCounterVariant> values() {
DEFAULT_VARIANTS.add(CONCRETE);
DEFAULT_VARIANTS.add(SMOOTH_STONE);
DEFAULT_VARIANTS.add(DEEPSLATE_TILE);
DEFAULT_VARIANTS.add(GRANITE_TERRACOTTA);
DEFAULT_VARIANTS.add(ANDESITE_OAK);
DEFAULT_VARIANTS.add(DEEPSLATE_DARK_OAK);
DEFAULT_VARIANTS.add(BLACKSTONE_CRIMSON);
}
return DEFAULT_VARIANTS;
}
Expand Down Expand Up @@ -99,7 +108,7 @@ public List<FeatureFlag> getFeatureList() {

@Override
public Block mainChild() {
return baseBlock;
return this.baseBlock;
}

@Environment(EnvType.CLIENT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ protected boolean canPlace(ItemPlacementContext context, BlockState state) {
WorldView world = context.getWorld();
Direction side = context.getSide();
NbtList lights = getLights(context.getStack());
boolean canPlace = state.getBlock().canPlaceAt(state, world, pos) && side.getAxis().isHorizontal();

if (!canPlace) {
return false;
}
if (lights != null) {
ArrayList<BlockPos> removedLights = new ArrayList<>();
ArrayList<BlockPos> lightOffsets = new ArrayList<>();
Expand All @@ -105,7 +110,7 @@ protected boolean canPlace(ItemPlacementContext context, BlockState state) {
context.getPlayer().sendMessage(Text.translatable("message.pfm.light_switch_far", removedLights.toString()), false);
}
}
return state.getBlock().canPlaceAt(state, world, pos) && side.getAxis().isHorizontal();
return true;
}

private void addLight(ItemStack stack, BlockPos pos)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ protected boolean canPlace(ItemPlacementContext context, BlockState state) {
Direction playerFacing = context.getHorizontalPlayerFacing();
Direction placeDirection = context.getSide();

boolean canPlace = state.getBlock().canPlaceAt(state, world, pos) && placeDirection.getAxis().isHorizontal();
if (!canPlace) {
return false;
}
if (showerHeadLong != null) {
BlockPos headPos = BlockPos.fromLong(showerHeadLong.longValue());
BlockPos placedPos = pos.offset(playerFacing);
Expand All @@ -81,7 +85,7 @@ protected boolean canPlace(ItemPlacementContext context, BlockState state) {
}
return state.getBlock().canPlaceAt(state, world, pos) && placeDirection.getAxis().isHorizontal();
}
return state.getBlock().canPlaceAt(state, world, pos) && placeDirection.getAxis().isHorizontal();
return true;
}

private void setShowerHeadPosNBT(ItemStack stack, BlockPos pos)
Expand Down
Loading

0 comments on commit 0bfdb49

Please sign in to comment.