mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
it compiles \o/
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Cows eat mushrooms
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cow.java b/src/main/java/net/minecraft/world/entity/animal/Cow.java
|
||||
index 8229a99d4454df64def52bbf686183284d62c900..7f7d68d09b070c24ba1567967c5d228c73fd14b9 100644
|
||||
index 8229a99d4454df64def52bbf686183284d62c900..e6fa66a8c88d4f20a7383e8fd5b3df44718478fa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Cow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Cow.java
|
||||
@@ -74,7 +74,7 @@ public class Cow extends Animal {
|
||||
@@ -58,14 +58,14 @@ index 8229a99d4454df64def52bbf686183284d62c900..7f7d68d09b070c24ba1567967c5d228c
|
||||
+ }
|
||||
+ return InteractionResult.CONSUME; // require 5 mushrooms to transform (prevents mushroom duping)
|
||||
+ }
|
||||
+ MushroomCow mooshroom = EntityType.MOOSHROOM.create(level());
|
||||
+ MushroomCow mooshroom = EntityType.MOOSHROOM.create(level(), EntitySpawnReason.CONVERSION);
|
||||
+ if (mooshroom == null) {
|
||||
+ return InteractionResult.PASS;
|
||||
+ }
|
||||
+ if (stack.getItem() == net.minecraft.world.level.block.Blocks.BROWN_MUSHROOM.asItem()) {
|
||||
+ mooshroom.setVariant(MushroomCow.MushroomType.BROWN);
|
||||
+ mooshroom.setVariant(MushroomCow.Variant.BROWN);
|
||||
+ } else {
|
||||
+ mooshroom.setVariant(MushroomCow.MushroomType.RED);
|
||||
+ mooshroom.setVariant(MushroomCow.Variant.RED);
|
||||
+ }
|
||||
+ mooshroom.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
|
||||
+ mooshroom.setHealth(this.getHealth());
|
||||
@@ -96,7 +96,7 @@ index 8229a99d4454df64def52bbf686183284d62c900..7f7d68d09b070c24ba1567967c5d228c
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 7da688e575a1c4ca35c0d23401bf52f3bbbed6ae..4d85d928c05d488b5fc6efa96e65a5e31455d261 100644
|
||||
index 026593b70b3311c8427d8157225dbc0988b82d4c..15e730fd73a9ceb25a4635a59c0b7b35c99a2da7 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -390,6 +390,7 @@ public class PurpurWorldConfig {
|
||||
|
||||
Reference in New Issue
Block a user