-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add convince method for TameableEntity setTamed
- Loading branch information
Showing
10 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
iCommon-API/src/main/java/me/isaiah/common/cmixin/IMixinTameableEntity.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,11 @@ | ||
package me.isaiah.common.cmixin; | ||
|
||
public interface IMixinTameableEntity { | ||
|
||
/** | ||
* convince method for TameableEntity#setTamed | ||
* second argument only used for 1.20.5+ | ||
*/ | ||
public void IC$set_tamed(boolean tamed, boolean update_attributes); | ||
|
||
} |
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
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
16 changes: 16 additions & 0 deletions
16
iCommon-Fabric-1.18.2/src/main/java/me/isaiah/common/mixin/R1_18/MixinTameableEntity.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,16 @@ | ||
package me.isaiah.common.mixin.R1_18; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
import me.isaiah.common.cmixin.IMixinTameableEntity; | ||
import net.minecraft.entity.passive.TameableEntity; | ||
|
||
@Mixin(TameableEntity.class) | ||
public class MixinTameableEntity implements IMixinTameableEntity { | ||
|
||
@Override | ||
public void IC$set_tamed(boolean tamed, boolean update_attributes) { | ||
((TameableEntity)(Object)this).setTamed(tamed); | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
iCommon-Fabric-1.19.4/src/main/java/me/isaiah/common/mixin/R1_19/MixinTameableEntity.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,16 @@ | ||
package me.isaiah.common.mixin.R1_19; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
import me.isaiah.common.cmixin.IMixinTameableEntity; | ||
import net.minecraft.entity.passive.TameableEntity; | ||
|
||
@Mixin(TameableEntity.class) | ||
public class MixinTameableEntity implements IMixinTameableEntity { | ||
|
||
@Override | ||
public void IC$set_tamed(boolean tamed, boolean update_attributes) { | ||
((TameableEntity)(Object)this).setTamed(tamed); | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
iCommon-Fabric-1.19/src/main/java/me/isaiah/common/mixin/R1_19/MixinTameableEntity.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,16 @@ | ||
package me.isaiah.common.mixin.R1_19; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
import me.isaiah.common.cmixin.IMixinTameableEntity; | ||
import net.minecraft.entity.passive.TameableEntity; | ||
|
||
@Mixin(TameableEntity.class) | ||
public class MixinTameableEntity implements IMixinTameableEntity { | ||
|
||
@Override | ||
public void IC$set_tamed(boolean tamed, boolean update_attributes) { | ||
((TameableEntity)(Object)this).setTamed(tamed); | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
iCommon-Fabric-1.20.1/src/main/java/me/isaiah/common/mixin/R1_20/MixinTameableEntity.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,16 @@ | ||
package me.isaiah.common.mixin.R1_20; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
import me.isaiah.common.cmixin.IMixinTameableEntity; | ||
import net.minecraft.entity.passive.TameableEntity; | ||
|
||
@Mixin(TameableEntity.class) | ||
public class MixinTameableEntity implements IMixinTameableEntity { | ||
|
||
@Override | ||
public void IC$set_tamed(boolean tamed, boolean update_attributes) { | ||
((TameableEntity)(Object)this).setTamed(tamed); | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
iCommon-Fabric-1.20.2/src/main/java/me/isaiah/common/mixin/R1_20/MixinTameableEntity.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,16 @@ | ||
package me.isaiah.common.mixin.R1_20; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
import me.isaiah.common.cmixin.IMixinTameableEntity; | ||
import net.minecraft.entity.passive.TameableEntity; | ||
|
||
@Mixin(TameableEntity.class) | ||
public class MixinTameableEntity implements IMixinTameableEntity { | ||
|
||
@Override | ||
public void IC$set_tamed(boolean tamed, boolean update_attributes) { | ||
((TameableEntity)(Object)this).setTamed(tamed); | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
iCommon-Fabric-1.20.5/src/main/java/me/isaiah/common/mixin/R1_20/MixinTameableEntity.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,16 @@ | ||
package me.isaiah.common.mixin.R1_20; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
import me.isaiah.common.cmixin.IMixinTameableEntity; | ||
import net.minecraft.entity.passive.TameableEntity; | ||
|
||
@Mixin(TameableEntity.class) | ||
public class MixinTameableEntity implements IMixinTameableEntity { | ||
|
||
@Override | ||
public void IC$set_tamed(boolean tamed, boolean update_attributes) { | ||
((TameableEntity)(Object)this).setTamed(tamed, update_attributes); | ||
} | ||
|
||
} |