old-bugs

Minecraft: Better than Adventure! mod that brings back bugs from older versions
git clone git://memoryshards.xyz/old-bugs.git
Log | Files | Refs | README | LICENSE

EntityBoatMixin.java (612B)


      1 package ambos.oldbugs.mixin;
      2 
      3 import net.minecraft.core.entity.vehicle.EntityBoat;
      4 import org.spongepowered.asm.mixin.Mixin;
      5 import org.spongepowered.asm.mixin.injection.Constant;
      6 import org.spongepowered.asm.mixin.injection.ModifyConstant;
      7 
      8 import ambos.oldbugs.OldBugs;
      9 
     10 @Mixin(value = EntityBoat.class, remap = false)
     11 final class EntityBoatMixin {
     12     @ModifyConstant(method = "tick", constant = @Constant(doubleValue = 1.0, ordinal = 1))
     13     private double change(double d) {
     14         if (OldBugs.BOAT_ELEVATORS) {
     15             return Double.MAX_VALUE;
     16         } else {
     17             return d;
     18         }
     19     }
     20 }