Skip to content

Commit

Permalink
Update to 1.19.4
Browse files Browse the repository at this point in the history
- Updated to 1.19.4
  • Loading branch information
Hugman76 committed Mar 26, 2023
1 parent f22bdd3 commit 3716d9d
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 43 deletions.
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,27 @@ github_name=Promenade
# CurseForge Metadata
curseforge_slug=promenade
curseforge_id=399648
curseforge_game_versions=1.19.3, Java 17, Fabric, Quilt
curseforge_game_versions=1.19.4, Java 17, Fabric, Quilt
curseforge_required_dependencies=fabric-api, dawn
curseforge_optional_dependencies=columns, farming-for-blockheads-fabric, terrablender-fabric

# Modrinth Metadata
modrinth_slug=promenade
modrinth_id=GuE5FpvB
modrinth_game_versions=1.19.3
modrinth_game_versions=1.19.4
modrinth_mod_loaders=fabric, quilt
modrinth_required_dependencies=fabric-api, dawn
modrinth_optional_dependencies=farming-for-blockheads

# check these on https://fabricmc.net/versions.html
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.5
loader_version=0.14.12
fabric_version=0.72.0+1.19.3
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.1
loader_version=0.14.18
fabric_version=0.76.0+1.19.4
# https://github.com/DawnTeamMC/DawnAPI
dawn_version=4.1.1
dawn_version=4.2.0

# https://www.curseforge.com/minecraft/mc-mods/terrablender-fabric
terrablender_version=1.19.3-2.1.0.134
terrablender_version=1.19.4-2.2.0.154
# https://www.curseforge.com/minecraft/mc-mods/columns
columns_version=3836307
2 changes: 1 addition & 1 deletion src/main/java/fr/hugman/promenade/block/DyliumBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ public void grow(ServerWorld world, Random random, BlockPos pos, BlockState stat

@Override
public boolean canSpreadAt(BlockView world, BlockPos pos) {
return world.getBlockState(pos).isIn(PromenadeBlockTags.CAN_SPREAD_BLACK_DYLIUM) && world.getBlockState(pos.up()).isTranslucent(world, pos);
return world.getBlockState(pos).isIn(PromenadeBlockTags.CAN_SPREAD_BLACK_DYLIUM) && world.getBlockState(pos.up()).isAir();
}
}
2 changes: 1 addition & 1 deletion src/main/java/fr/hugman/promenade/block/MoaiBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected void appendProperties(StateManager.Builder<Block, BlockState> builder)
public BlockState getPlacementState(ItemPlacementContext context) {
var world = context.getWorld();
boolean sneaking = context.shouldCancelInteraction(); // stupid yarn name
var direction = context.getPlayerFacing().getOpposite();
var direction = context.getPlayerLookDirection().getOpposite();
var hitSide = context.getSide();

var posBelow = context.getBlockPos().down();
Expand Down
15 changes: 7 additions & 8 deletions src/main/java/fr/hugman/promenade/block/WitherRosePileBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import net.minecraft.block.Blocks;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.particle.ParticleTypes;
Expand All @@ -22,25 +21,25 @@ public WitherRosePileBlock(Settings builder) {
}

@Override
public boolean canPlantOnTop(BlockState state, BlockView worldIn, BlockPos pos) {
return super.canPlantOnTop(state, worldIn, pos) || state.getBlock() == Blocks.SOUL_SAND;
public boolean canPlantOnTop(BlockState state, BlockView world, BlockPos pos) {
return super.canPlantOnTop(state, world, pos) || state.getBlock() == Blocks.SOUL_SAND;
}

@Override
@Environment(EnvType.CLIENT)
public void randomDisplayTick(BlockState stateIn, World worldIn, BlockPos pos, Random rand) {
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random rand) {
for(int i = 0; i < 5; ++i) {
if(rand.nextBoolean()) {
worldIn.addParticle(ParticleTypes.SMOKE, (double) pos.getX() + (double) (rand.nextInt(17) / 16), (double) pos.getY() + (0.5D - (double) rand.nextFloat()), (double) pos.getZ() + (double) (rand.nextInt(17) / 16), 0.0D, 0.0D, 0.0D);
world.addParticle(ParticleTypes.SMOKE, (double) pos.getX() + (double) (rand.nextInt(17) / 16), (double) pos.getY() + (0.5D - (double) rand.nextFloat()), (double) pos.getZ() + (double) (rand.nextInt(17) / 16), 0.0D, 0.0D, 0.0D);
}
}
}

@Override
public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) {
if(!worldIn.isClient && worldIn.getDifficulty() != Difficulty.PEACEFUL) {
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entityIn) {
if(!world.isClient && world.getDifficulty() != Difficulty.PEACEFUL) {
if(entityIn instanceof LivingEntity livingentity) {
if(!livingentity.isInvulnerableTo(DamageSource.WITHER)) {
if(!livingentity.isInvulnerableTo(world.getDamageSources().wither())) {
livingentity.addStatusEffect(new StatusEffectInstance(StatusEffects.WITHER, 40));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public SunkenSkeletonRenderer(EntityRendererFactory.Context context) {

public SunkenSkeletonRenderer(EntityRendererFactory.Context ctx, EntityModelLayer layer, EntityModelLayer legArmorLayer, EntityModelLayer bodyArmorLayer) {
super(ctx, new SunkenSkeletonModel(ctx.getPart(layer)), 0.5F);
this.addFeature(new ArmorFeatureRenderer<>(this, new SunkenSkeletonModel(ctx.getPart(legArmorLayer)), new SunkenSkeletonModel(ctx.getPart(bodyArmorLayer))));
this.addFeature(new ArmorFeatureRenderer<>(this, new SunkenSkeletonModel(ctx.getPart(legArmorLayer)), new SunkenSkeletonModel(ctx.getPart(bodyArmorLayer)), ctx.getModelManager()));
}

@Override
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/fr/hugman/promenade/entity/CapybaraBrain.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private static void addCoreActivities(Brain<CapybaraEntity> brain) {

private static void addIdleActivities(Brain<CapybaraEntity> brain) {
brain.setTaskList(Activity.IDLE, ImmutableList.of(
Pair.of(0, FollowMobWithIntervalTask.follow(EntityType.PLAYER, 6.0f, UniformIntProvider.create(30, 60))),
Pair.of(0, LookAtMobWithIntervalTask.follow(EntityType.PLAYER, 6.0f, UniformIntProvider.create(30, 60))),
Pair.of(1, new BreedTask(AnimalContent.CAPYBARA, 1.0f)),
Pair.of(2, new TemptTask(entity -> 1.5f)),
Pair.of(3, TaskTriggerer.runIf(Predicate.not(CapybaraEntity::isStationary), WalkTowardClosestAdultTask.create(WALK_TOWARD_ADULT_RANGE, 1.5f))),
Expand All @@ -92,7 +92,7 @@ public static void updateActivities(CapybaraEntity capybara) {
capybara.getBrain().resetPossibleActivities(ImmutableList.of(Activity.IDLE));
}

public static class WalkTask extends net.minecraft.entity.ai.brain.task.WalkTask {
public static class WalkTask extends FleeTask {
public WalkTask(float speed) {
super(speed);
}
Expand All @@ -116,7 +116,7 @@ public SleepTask(int lastPoseSecondsDelta) {

@Override
protected boolean shouldRun(ServerWorld world, CapybaraEntity capybara) {
return !capybara.isTouchingWater() && capybara.getLastStateTickDelta() >= (long) this.lastPoseTickDelta && !capybara.isLeashed() && capybara.isOnGround() && !capybara.hasPrimaryPassenger();
return !capybara.isTouchingWater() && capybara.getLastStateTickDelta() >= (long) this.lastPoseTickDelta && !capybara.isLeashed() && capybara.isOnGround() && !capybara.hasControllingPassenger();
}

@Override
Expand All @@ -140,7 +140,7 @@ public FartTask(int lastPoseSecondsDelta) {

@Override
protected boolean shouldRun(ServerWorld world, CapybaraEntity capybara) {
return capybara.canFart() && !capybara.isTouchingWater() && capybara.getLastStateTickDelta() >= (long) this.lastPoseTickDelta && !capybara.isLeashed() && capybara.isOnGround() && !capybara.hasPrimaryPassenger();
return capybara.canFart() && !capybara.isTouchingWater() && capybara.getLastStateTickDelta() >= (long) this.lastPoseTickDelta && !capybara.isLeashed() && capybara.isOnGround() && !capybara.hasControllingPassenger();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private void updateAnimations() {

switch(this.getState()) {
case STANDING -> {
this.walkingAnimationState.setRunning((this.onGround || this.hasPrimaryPassenger()) && this.getVelocity().horizontalLengthSquared() > 1.0E-6, this.age);
this.walkingAnimationState.setRunning((this.onGround || this.hasControllingPassenger()) && this.getVelocity().horizontalLengthSquared() > 1.0E-6, this.age);
this.fallToSleepAnimState.stop();
this.sleepingAnimState.stop();
this.wakeUpAnimState.stop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void attack(LivingEntity target, float pullProgress) {
this.shoot(this, 1.6F);
}
else {
ItemStack itemStack = this.getArrowType(this.getStackInHand(ProjectileUtil.getHandPossiblyHolding(this, Items.BOW)));
ItemStack itemStack = this.getProjectileType(this.getStackInHand(ProjectileUtil.getHandPossiblyHolding(this, Items.BOW)));
PersistentProjectileEntity persistentProjectileEntity = this.createArrowProjectile(itemStack, pullProgress);
double d = target.getX() - this.getX();
double e = target.getBodyY(0.3333333333333333D) - persistentProjectileEntity.getY();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import fr.hugman.promenade.registry.content.CommonContent;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.intprovider.IntProvider;
import net.minecraft.util.math.random.Random;
Expand All @@ -12,8 +11,6 @@
import net.minecraft.world.gen.foliage.FoliagePlacer;
import net.minecraft.world.gen.foliage.FoliagePlacerType;

import java.util.function.BiConsumer;

public class PalmFoliagePlacer extends FoliagePlacer {
public static final Codec<PalmFoliagePlacer> CODEC = RecordCodecBuilder.create(instance ->
PalmFoliagePlacer.fillFoliagePlacerFields(instance)
Expand All @@ -29,16 +26,16 @@ protected FoliagePlacerType<?> getType() {
}

@Override
protected void generate(TestableWorld world, BiConsumer<BlockPos, BlockState> replacer, Random random, TreeFeatureConfig config, int trunkHeight, TreeNode treeNode, int foliageHeight, int radius, int offset) {
protected void generate(TestableWorld world, BlockPlacer placer, Random random, TreeFeatureConfig config, int trunkHeight, TreeNode treeNode, int foliageHeight, int radius, int offset) {
boolean bl = treeNode.isGiantTrunk();
BlockPos blockPos = treeNode.getCenter().down();

int i = radius + treeNode.getFoliageRadius();
if(i > 1) this.generateSquare(world, replacer, random, config, blockPos, i, 2, bl);
this.generateSquare(world, replacer, random, config, blockPos, i + 1, 1, bl);
this.generateSquare(world, replacer, random, config, blockPos, i + 2, 0, bl);
this.generateSquare(world, replacer, random, config, blockPos, i + 2, -1, bl);
this.generateSquare(world, replacer, random, config, blockPos, i + 1, -2, bl);
if(i > 1) this.generateSquare(world, placer, random, config, blockPos, i, 2, bl);
this.generateSquare(world, placer, random, config, blockPos, i + 1, 1, bl);
this.generateSquare(world, placer, random, config, blockPos, i + 2, 0, bl);
this.generateSquare(world, placer, random, config, blockPos, i + 2, -1, bl);
this.generateSquare(world, placer, random, config, blockPos, i + 1, -2, bl);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import fr.hugman.promenade.registry.content.GlaglaglaContent;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.registry.tag.EntityTypeTags;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -19,7 +18,7 @@ private void tickMovement(CallbackInfo ci) {
if(GlaglaglaContent.canFreezeFromBiomeAndWeather(entity)) {
entity.setFrozenTicks(Math.min(entity.getMinFreezeDamageTicks(), frozenTicks + 1));
if (entity.age % 40 == 0 && entity.isFrozen()) {
entity.damage(DamageSource.FREEZE, entity.getType().isIn(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES) ? 5 : 1);
entity.damage(entity.getDamageSources().freeze(), entity.getType().isIn(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES) ? 5 : 1);
}
ci.cancel();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"temperature": 0.6,
"downfall": 0.4,
"precipitation": "rain",
"has_precipitation": true,
"effects": {
"sky_color": 8037887,
"fog_color": 12638463,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"temperature": 1.2,
"downfall": 0.9,
"precipitation": "rain",
"has_precipitation": true,
"effects": {
"sky_color": 7907327,
"fog_color": 12638463,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"temperature": 0.6,
"downfall": 0.4,
"precipitation": "rain",
"has_precipitation": true,
"effects": {
"sky_color": 8037887,
"fog_color": 12638463,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"temperature": 0.5,
"downfall": 0.5,
"precipitation": "none",
"has_precipitation": false,
"effects": {
"sky_color": 0,
"fog_color": 10518688,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"temperature": -0.7,
"downfall": 0.8,
"precipitation": "snow",
"has_precipitation": true,
"effects": {
"sky_color": 7897269,
"fog_color": 10138064,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"temperature": 0.5,
"downfall": 0.5,
"precipitation": "none",
"has_precipitation": false,
"effects": {
"sky_color": 0,
"fog_color": 10518688,
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"depends": {
"fabric": "*",
"cloth-config": "*",
"dawn": ">=4.1.1"
"dawn": ">=4.2.0"
},
"suggests": {
"columns": "*",
Expand Down

0 comments on commit 3716d9d

Please sign in to comment.