Skip to content

Commit

Permalink
fix some bugs and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
augustresende committed Oct 28, 2020
1 parent 87df4bf commit 4f47505
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
This version (0.2.5) fix some bugs when the mod runs with custom world generation settings.

===============================================================================

This version (0.2.4) fix another weird bug that crashes on Server Fabric version.

===============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public ZeroTickAbstractPlantPartBlock(Settings settings) {

@Inject(at = @At("TAIL"), method = "scheduledTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Ljava/util/Random;)V")
public void scheduledTick(final BlockState state, final ServerWorld world, final BlockPos pos, final Random random, CallbackInfo info) {
if (!state.canPlaceAt(world, pos)) {
world.breakBlock(pos, true);
return;
}

if(!world.isAir(pos.down())) {
this.randomTick(state, world, pos, random);
}
Expand Down
2 changes: 1 addition & 1 deletion forge/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
org.gradle.jvmargs=-Xmx4G
org.gradle.daemon=false

mod_version=0.2.4
mod_version=0.2.5
mod_id=vanillaexperience
mc_version=1.16.3
forge_version=34.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public ZeroTickAbstractPlantBlock(Properties propertiesIn) {

@Inject(at = @At("TAIL"), method = "tick(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/server/ServerWorld;Lnet/minecraft/util/math/BlockPos;Ljava/util/Random;)V")
public void tick(final BlockState state, final ServerWorld world, final BlockPos pos, final Random random, CallbackInfo info) {
if (!state.isValidPosition(world, pos)) {
world.destroyBlock(pos, true);
return;
}

if(!world.isAirBlock(pos.down())) {
this.randomTick(state, world, pos, random);
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx4G
org.gradle.daemon=false
mod_version=0.2.4
mod_version=0.2.5
mod_id=vanillaexperience
mc_version=1.16.3
forge_version=34.1.0
Expand Down

0 comments on commit 4f47505

Please sign in to comment.