summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/keuin/ohmyvanillamc/mixin/Mc113809BambooBlockMixin.java30
-rw-r--r--src/main/resources/ohmyvanillamc.mixins.json1
2 files changed, 16 insertions, 15 deletions
diff --git a/src/main/java/com/keuin/ohmyvanillamc/mixin/Mc113809BambooBlockMixin.java b/src/main/java/com/keuin/ohmyvanillamc/mixin/Mc113809BambooBlockMixin.java
index ef4b9c1..07db52f 100644
--- a/src/main/java/com/keuin/ohmyvanillamc/mixin/Mc113809BambooBlockMixin.java
+++ b/src/main/java/com/keuin/ohmyvanillamc/mixin/Mc113809BambooBlockMixin.java
@@ -34,21 +34,6 @@ public abstract class Mc113809BambooBlockMixin extends Block {
protected abstract void updateLeaves(BlockState state, World world, BlockPos pos, Random random, int height);
/**
- * Reintroduce the MC-113809 glitch for bamboo. The implementation is identical to Minecraft 1.15.2.
- *
- * @author trueKeuin
- * @reason reintroduce MC-113809 for bamboo.
- */
- @Overwrite
- public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
- if (!state.canPlaceAt(world, pos)) {
- world.breakBlock(pos, true);
- } else if (OhMyVanillaMinecraft.getConfiguration().isReintroduceZeroTickFarm()) {
- realGrow(state, world, pos, random);
- }
- }
-
- /**
* Reintroduce the base class's implementation.
*
* @reason reintroduce base class's implementation.
@@ -76,6 +61,21 @@ public abstract class Mc113809BambooBlockMixin extends Block {
}
}
+ /**
+ * Reintroduce the MC-113809 glitch for bamboo. The implementation is identical to Minecraft 1.15.2.
+ *
+ * @author trueKeuin
+ * @reason reintroduce MC-113809 for bamboo.
+ */
+ @Overwrite
+ public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
+ if (!state.canPlaceAt(world, pos)) {
+ world.breakBlock(pos, true);
+ } else if (OhMyVanillaMinecraft.getConfiguration().isReintroduceZeroTickFarm()) {
+ realGrow(state, world, pos, random);
+ }
+ }
+
private void realGrow(BlockState state, ServerWorld world, BlockPos pos, Random random) {
if (state.get(STAGE) == 0) {
if (random.nextInt(3) == 0 && world.isAir(pos.up()) && world.getBaseLightLevel(pos.up(), 0) >= 9) {
diff --git a/src/main/resources/ohmyvanillamc.mixins.json b/src/main/resources/ohmyvanillamc.mixins.json
index ce61122..24537c7 100644
--- a/src/main/resources/ohmyvanillamc.mixins.json
+++ b/src/main/resources/ohmyvanillamc.mixins.json
@@ -12,6 +12,7 @@
"Mc113809SugarCaneBlockMixin",
"Mc113809CactusBlockMixin",
"Mc113809ChorusFlowerBlockMixin",
+ "Mc113809BambooBlockMixin",
"Mc113809AbstractPlantStemBlockMixin"
],
"injectors": {