-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/org/purpurmc/purpur/client/mixin/mob/MixinArmadillo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.purpurmc.purpur.client.mixin.mob; | ||
|
||
import net.minecraft.world.entity.Entity; | ||
import net.minecraft.world.entity.EntityType; | ||
import net.minecraft.world.entity.Mob; | ||
import net.minecraft.world.entity.animal.armadillo.Armadillo; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.phys.Vec3; | ||
import org.purpurmc.purpur.client.entity.RidableEntity; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
@Mixin(Armadillo.class) | ||
public abstract class MixinArmadillo extends Mob implements RidableEntity { | ||
public MixinArmadillo(EntityType<? extends Armadillo> entityType, Level world) { | ||
super(entityType, world); | ||
} | ||
|
||
@Override | ||
public Vec3 getPassengerRidingPosition(Entity passenger) { | ||
return super.getPassengerRidingPosition(passenger).add(getSeats().armadillo.x, getSeats().armadillo.y, getSeats().armadillo.z); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/org/purpurmc/purpur/client/mixin/mob/MixinBogged.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.purpurmc.purpur.client.mixin.mob; | ||
|
||
import net.minecraft.world.entity.Entity; | ||
import net.minecraft.world.entity.EntityType; | ||
import net.minecraft.world.entity.Mob; | ||
import net.minecraft.world.entity.monster.Bogged; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.phys.Vec3; | ||
import org.purpurmc.purpur.client.entity.RidableEntity; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
@Mixin(Bogged.class) | ||
public abstract class MixinBogged extends Mob implements RidableEntity { | ||
public MixinBogged(EntityType<? extends Bogged> entityType, Level world) { | ||
super(entityType, world); | ||
} | ||
|
||
@Override | ||
public Vec3 getPassengerRidingPosition(Entity passenger) { | ||
return super.getPassengerRidingPosition(passenger).add(getSeats().bogged.x, getSeats().bogged.y, getSeats().bogged.z); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/org/purpurmc/purpur/client/mixin/mob/MixinBreeze.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.purpurmc.purpur.client.mixin.mob; | ||
|
||
import net.minecraft.world.entity.Entity; | ||
import net.minecraft.world.entity.EntityType; | ||
import net.minecraft.world.entity.Mob; | ||
import net.minecraft.world.entity.monster.breeze.Breeze; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.phys.Vec3; | ||
import org.purpurmc.purpur.client.entity.RidableEntity; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
@Mixin(Breeze.class) | ||
public abstract class MixinBreeze extends Mob implements RidableEntity { | ||
public MixinBreeze(EntityType<? extends Breeze> entityType, Level world) { | ||
super(entityType, world); | ||
} | ||
|
||
@Override | ||
public Vec3 getPassengerRidingPosition(Entity passenger) { | ||
return super.getPassengerRidingPosition(passenger).add(getSeats().breeze.x, getSeats().breeze.y, getSeats().breeze.z); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/org/purpurmc/purpur/client/mixin/mob/MixinCamel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.purpurmc.purpur.client.mixin.mob; | ||
|
||
import net.minecraft.world.entity.Entity; | ||
import net.minecraft.world.entity.EntityType; | ||
import net.minecraft.world.entity.Mob; | ||
import net.minecraft.world.entity.animal.camel.Camel; | ||
import net.minecraft.world.entity.monster.breeze.Breeze; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.phys.Vec3; | ||
import org.purpurmc.purpur.client.entity.RidableEntity; | ||
import org.purpurmc.purpur.client.mixin.accessor.AccessAbstractPiglin; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
@Mixin(Breeze.class) | ||
public abstract class MixinCamel extends Mob implements RidableEntity { | ||
public MixinCamel(EntityType<? extends Camel> entityType, Level world) { | ||
super(entityType, world); | ||
} | ||
|
||
@Override | ||
public Vec3 getPassengerRidingPosition(Entity passenger) { | ||
return super.getPassengerRidingPosition(passenger).add(getSeats().camel.x, getSeats().camel.y, getSeats().camel.z); | ||
} | ||
|
||
@Override | ||
public boolean isNoAi() { | ||
// silly hack to stop camel from standing up on preview screen | ||
return ((AccessAbstractPiglin) this).getTimeInOverworld() < 0 || super.isNoAi(); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters