Skip to content

Commit

Permalink
remove mixin extras
Browse files Browse the repository at this point in the history
  • Loading branch information
Treetrain1 committed Dec 4, 2023
1 parent 234ad19 commit 09a2060
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 22 deletions.
5 changes: 1 addition & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,11 @@ dependencies {
// TerraBlender
modCompileOnlyApi("com.github.glitchfiend:TerraBlender-fabric:${terrablender_version}")

// CaffeineConfig
//modImplementation("net.caffeinemc:mixin-config:1.0.0+1.17")?.let { include(it) }

// Particle Rain
modCompileOnly("maven.modrinth:particle-rain:v2.0.5")

// MixinExtras
implementation("io.github.llamalad7.mixinextras:mixinextras-fabric:$mixin_extras_version")?.let { annotationProcessor(it); }
modApi("io.github.llamalad7:mixinextras-fabric:$mixin_extras_version")?.let { annotationProcessor(it) }

// Sodium
modCompileOnly("maven.modrinth:sodium:${sodium_version}")
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
minecraft_version=1.20.2
quilt_mappings=1.20.2+build.2
parchment_mappings=1.20.2:2023.10.22
loader_version=0.14.24
loader_version=0.15.0

# Mod Properties
mod_id = wilderwild
Expand All @@ -23,8 +23,8 @@
archives_base_name = WilderWild

# Dependencies
fabric_api_version=0.91.0+1.20.2
mixin_extras_version=0.2.1
fabric_api_version=0.91.1+1.20.2
mixin_extras_version=0.3.1
fabric_asm_version=v2.3
frozenlib_version=1.4.5-mc1.20.2

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-rc-4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ public boolean isBonemealSuccess(@NotNull Level level, @NotNull RandomSource ran

@Override
public void performBonemeal(@NotNull ServerLevel level, @NotNull RandomSource random, @NotNull BlockPos pos, @NotNull BlockState state) {
level.setBlock(pos.below(), RegisterBlocks.BAOBAB_NUT.getDefaultHangingState(), 2);
level.setBlock(pos.below(), RegisterBlocks.BAOBAB_NUT.getDefaultHangingState(), UPDATE_CLIENTS);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void randomTick(@NotNull BlockState state, @NotNull ServerLevel level, @N
}
} else {
if (random.nextDouble() < 0.4 && !isFullyGrown(state)) {
level.setBlock(pos, state.cycle(AGE), 2);
level.setBlock(pos, state.cycle(AGE), UPDATE_CLIENTS);
}
}
}
Expand All @@ -127,7 +127,7 @@ public boolean isBonemealSuccess(@NotNull Level level, @NotNull RandomSource ran
@Override
public void performBonemeal(@NotNull ServerLevel level, @NotNull RandomSource random, @NotNull BlockPos pos, @NotNull BlockState state) {
if (state.is(this) && isHanging(state) && !isFullyGrown(state)) {
level.setBlock(pos, state.cycle(AGE), 2);
level.setBlock(pos, state.cycle(AGE), UPDATE_CLIENTS);
} else {
super.performBonemeal(level, random, pos, state);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static BlockState getHangingState(int age) {

public void advanceTree(@NotNull ServerLevel level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull RandomSource random) {
if (state.getValue(STAGE) == 0) {
level.setBlock(pos, state.cycle(STAGE), 4);
level.setBlock(pos, state.cycle(STAGE), UPDATE_INVISIBLE);
} else {
this.treeGrower.growTree(level, level.getChunkSource().getGenerator(), pos, state, random);
}
Expand Down Expand Up @@ -165,7 +165,7 @@ public void randomTick(@NotNull BlockState state, @NotNull ServerLevel level, @N
}
} else {
if (random.nextDouble() < 0.4 && !isFullyGrown(state)) {
level.setBlock(pos, state.cycle(AGE), 2);
level.setBlock(pos, state.cycle(AGE), UPDATE_CLIENTS);
}
}
}
Expand All @@ -184,7 +184,7 @@ public boolean isBonemealSuccess(@NotNull Level level, @NotNull RandomSource ran
@Override
public void performBonemeal(@NotNull ServerLevel level, @NotNull RandomSource random, @NotNull BlockPos pos, @NotNull BlockState state) {
if (isHanging(state) && !isFullyGrown(state)) {
level.setBlock(pos, state.cycle(AGE), 2);
level.setBlock(pos, state.cycle(AGE), UPDATE_CLIENTS);
} else {
this.advanceTree(level, pos, state, random);
}
Expand Down Expand Up @@ -238,7 +238,7 @@ public void tick(@NotNull BlockState state, @NotNull ServerLevel level, @NotNull
@Override
public void onLand(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull BlockState replaceableState, @NotNull FallingBlockEntity fallingBlock) {
if (!level.isClientSide) {
level.setBlock(pos, replaceableState, 3);
level.setBlock(pos, replaceableState, UPDATE_ALL);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void animateTick(@NotNull BlockState state, @NotNull Level level, @NotNul
mutable.set(i + Mth.nextInt(random, -10, 10), j - random.nextInt(10), k + Mth.nextInt(random, -10, 10));
BlockState blockState = level.getBlockState(mutable);
if (!blockState.isCollisionShapeFullBlock(level, mutable) && !level.isRainingAt(mutable)) {
level.addParticle(RegisterParticles.POLLEN, (double) mutable.getX() + random.nextDouble(), (double) mutable.getY() + random.nextDouble(), (double) mutable.getZ() + random.nextDouble(), 0.0D, 0.0D, 0.0D);
level.addParticle(RegisterParticles.POLLEN, mutable.getX() + random.nextDouble(), mutable.getY() + random.nextDouble(), mutable.getZ() + random.nextDouble(), 0.0D, 0.0D, 0.0D);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,8 @@ public boolean isValidBonemealTarget(@NotNull LevelReader level, @NotNull BlockP

@Override
public void randomTick(@NotNull BlockState state, @NotNull ServerLevel level, @NotNull BlockPos pos, @NotNull RandomSource random) {
if (!isFullyGrown(state)) {
if (random.nextInt(0, 3) == 0) {
level.setBlockAndUpdate(pos, state.setValue(AGE, state.getValue(AGE) + 1));
}
if (!isFullyGrown(state) && random.nextInt(0, 3) == 0) {
level.setBlockAndUpdate(pos, state.setValue(AGE, state.getValue(AGE) + 1));
}
}

Expand All @@ -86,7 +84,7 @@ public VoxelShape getShape(@NotNull BlockState state, @NotNull BlockGetter level

@Override
public void entityInside(@NotNull BlockState state, @NotNull Level level, @NotNull BlockPos pos, @NotNull Entity entity) {
entity.makeStuckInBlock(state, new Vec3(0.800000011920929, 0.75, 0.800000011920929));
entity.makeStuckInBlock(state, new Vec3(0.8, 0.75, 0.8));
if (!(entity instanceof ItemEntity)) {
entity.hurt(level.damageSources().cactus(), 0.5F);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ public class TermiteMoundBlock extends BaseEntityBlock {

public TermiteMoundBlock(@NotNull Properties settings) {
super(settings);
this.registerDefaultState(this.stateDefinition.any().setValue(RegisterProperties.NATURAL, false).setValue(RegisterProperties.TERMITES_AWAKE, false).setValue(RegisterProperties.CAN_SPAWN_TERMITE, false));
this.registerDefaultState(
this.stateDefinition.any()
.setValue(RegisterProperties.NATURAL, false)
.setValue(RegisterProperties.TERMITES_AWAKE, false)
.setValue(RegisterProperties.CAN_SPAWN_TERMITE, false)
);
}

public static boolean canTermitesWaken(@NotNull Level level, @NotNull BlockPos pos) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import net.frozenblock.wilderwild.block.property.BubbleDirection;
import net.frozenblock.wilderwild.block.property.FlowerColor;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.block.state.properties.EnumProperty;
import net.minecraft.world.level.block.state.properties.IntegerProperty;
Expand Down

0 comments on commit 09a2060

Please sign in to comment.