-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow protection on wolf armor, add enchantment glint, tweak netherit…
…e recipe to require blacksmith station, 1.4.0 v bump
- Loading branch information
Showing
11 changed files
with
127 additions
and
23 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
42 changes: 42 additions & 0 deletions
42
src/main/java/draylar/wolveswitharmor/client/WolfArmorModel.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,42 @@ | ||
package draylar.wolveswitharmor.client; | ||
|
||
import net.minecraft.client.model.ModelPart; | ||
import net.minecraft.client.render.entity.model.WolfEntityModel; | ||
import net.minecraft.entity.passive.WolfEntity; | ||
|
||
public class WolfArmorModel extends WolfEntityModel<WolfEntity> { | ||
|
||
public WolfArmorModel(float extra) { | ||
this.head = new ModelPart(this, 0, 0); | ||
this.head.setPivot(-1.0F, 13.5F, -7.0F); | ||
this.field_20788 = new ModelPart(this, 0, 0); | ||
this.field_20788.addCuboid(-2.0F, -3.0F, -2.0F, 6.0F, 6.0F, 4.0F, extra); | ||
this.head.addChild(this.field_20788); | ||
this.torso = new ModelPart(this, 18, 14); | ||
this.torso.addCuboid(-3.0F, -2.0F, -3.0F, 6.0F, 9.0F, 6.0F, extra); | ||
this.torso.setPivot(0.0F, 14.0F, 2.0F); | ||
this.neck = new ModelPart(this, 21, 0); | ||
this.neck.addCuboid(-3.0F, -3.0F, -3.0F, 8.0F, 6.0F, 7.0F, extra); | ||
this.neck.setPivot(-1.0F, 14.0F, 2.0F); | ||
this.rightBackLeg = new ModelPart(this, 0, 18); | ||
this.rightBackLeg.addCuboid(0.0F, 0.0F, -1.0F, 2.0F, 8.0F, 2.0F, extra); | ||
this.rightBackLeg.setPivot(-2.5F, 16.0F, 7.0F); | ||
this.leftBackLeg = new ModelPart(this, 0, 18); | ||
this.leftBackLeg.addCuboid(0.0F, 0.0F, -1.0F, 2.0F, 8.0F, 2.0F, extra); | ||
this.leftBackLeg.setPivot(0.5F, 16.0F, 7.0F); | ||
this.rightFrontLeg = new ModelPart(this, 0, 18); | ||
this.rightFrontLeg.addCuboid(0.0F, 0.0F, -1.0F, 2.0F, 8.0F, 2.0F, extra); | ||
this.rightFrontLeg.setPivot(-2.5F, 16.0F, -4.0F); | ||
this.leftFrontLeg = new ModelPart(this, 0, 18); | ||
this.leftFrontLeg.addCuboid(0.0F, 0.0F, -1.0F, 2.0F, 8.0F, 2.0F, extra); | ||
this.leftFrontLeg.setPivot(0.5F, 16.0F, -4.0F); | ||
this.tail = new ModelPart(this, 9, 18); | ||
this.tail.setPivot(-1.0F, 12.0F, 8.0F); | ||
this.field_20789 = new ModelPart(this, 9, 18); | ||
this.field_20789.addCuboid(0.0F, 0.0F, -1.0F, 2.0F, 8.0F, 2.0F, extra); | ||
this.tail.addChild(this.field_20789); | ||
this.field_20788.setTextureOffset(16, 14).addCuboid(-2.0F, -5.0F, 0.0F, 2.0F, 2.0F, 1.0F, 0.0F); | ||
this.field_20788.setTextureOffset(16, 14).addCuboid(2.0F, -5.0F, 0.0F, 2.0F, 2.0F, 1.0F, 0.0F); | ||
this.field_20788.setTextureOffset(0, 10).addCuboid(-0.5F, 0.0F, -5.0F, 3.0F, 3.0F, 4.0F, 0.0F); | ||
} | ||
} |
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
25 changes: 25 additions & 0 deletions
25
src/main/java/draylar/wolveswitharmor/mixin/EnchantmentMixin.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,25 @@ | ||
package draylar.wolveswitharmor.mixin; | ||
|
||
import draylar.wolveswitharmor.item.WolfArmorItem; | ||
import net.minecraft.enchantment.Enchantment; | ||
import net.minecraft.enchantment.ProtectionEnchantment; | ||
import net.minecraft.item.ItemStack; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(Enchantment.class) | ||
public class EnchantmentMixin { | ||
|
||
@Inject( | ||
method = "isAcceptableItem", | ||
at = @At("HEAD"), | ||
cancellable = true | ||
) | ||
private void wolfArmorProtection(ItemStack stack, CallbackInfoReturnable<Boolean> cir) { | ||
if((Object) this instanceof ProtectionEnchantment && stack.getItem() instanceof WolfArmorItem) { | ||
cir.setReturnValue(true); | ||
} | ||
} | ||
} |
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
20 changes: 7 additions & 13 deletions
20
src/main/resources/data/wolveswitharmor/recipes/netherite_wolf_armor.json
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 |
---|---|---|
@@ -1,18 +1,12 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"pattern": [ | ||
"dgd" | ||
], | ||
"key": { | ||
"d": { | ||
"item": "minecraft:netherite_ingot" | ||
}, | ||
"g": { | ||
"item": "minecraft:gold_ingot" | ||
} | ||
"type": "minecraft:smithing", | ||
"base": { | ||
"item": "wolveswitharmor:diamond_wolf_armor" | ||
}, | ||
"addition": { | ||
"item": "minecraft:netherite_ingot" | ||
}, | ||
"result": { | ||
"item": "wolveswitharmor:netherite_wolf_armor", | ||
"count": 1 | ||
"item": "wolveswitharmor:netherite_wolf_armor" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
accessWidener v1 named | ||
|
||
accessible field net/minecraft/client/render/entity/model/WolfEntityModel head Lnet/minecraft/client/model/ModelPart; | ||
mutable field net/minecraft/client/render/entity/model/WolfEntityModel head Lnet/minecraft/client/model/ModelPart; | ||
|
||
accessible field net/minecraft/client/render/entity/model/WolfEntityModel field_20788 Lnet/minecraft/client/model/ModelPart; | ||
mutable field net/minecraft/client/render/entity/model/WolfEntityModel field_20788 Lnet/minecraft/client/model/ModelPart; | ||
|
||
accessible field net/minecraft/client/render/entity/model/WolfEntityModel torso Lnet/minecraft/client/model/ModelPart; | ||
mutable field net/minecraft/client/render/entity/model/WolfEntityModel torso Lnet/minecraft/client/model/ModelPart; | ||
|
||
accessible field net/minecraft/client/render/entity/model/WolfEntityModel rightBackLeg Lnet/minecraft/client/model/ModelPart; | ||
mutable field net/minecraft/client/render/entity/model/WolfEntityModel rightBackLeg Lnet/minecraft/client/model/ModelPart; | ||
|
||
accessible field net/minecraft/client/render/entity/model/WolfEntityModel leftBackLeg Lnet/minecraft/client/model/ModelPart; | ||
mutable field net/minecraft/client/render/entity/model/WolfEntityModel leftBackLeg Lnet/minecraft/client/model/ModelPart; | ||
|
||
accessible field net/minecraft/client/render/entity/model/WolfEntityModel rightFrontLeg Lnet/minecraft/client/model/ModelPart; | ||
mutable field net/minecraft/client/render/entity/model/WolfEntityModel rightFrontLeg Lnet/minecraft/client/model/ModelPart; | ||
|
||
accessible field net/minecraft/client/render/entity/model/WolfEntityModel leftFrontLeg Lnet/minecraft/client/model/ModelPart; | ||
mutable field net/minecraft/client/render/entity/model/WolfEntityModel leftFrontLeg Lnet/minecraft/client/model/ModelPart; | ||
|
||
accessible field net/minecraft/client/render/entity/model/WolfEntityModel tail Lnet/minecraft/client/model/ModelPart; | ||
mutable field net/minecraft/client/render/entity/model/WolfEntityModel tail Lnet/minecraft/client/model/ModelPart; | ||
|
||
accessible field net/minecraft/client/render/entity/model/WolfEntityModel field_20789 Lnet/minecraft/client/model/ModelPart; | ||
mutable field net/minecraft/client/render/entity/model/WolfEntityModel field_20789 Lnet/minecraft/client/model/ModelPart; | ||
|
||
accessible field net/minecraft/client/render/entity/model/WolfEntityModel neck Lnet/minecraft/client/model/ModelPart; | ||
mutable field net/minecraft/client/render/entity/model/WolfEntityModel neck Lnet/minecraft/client/model/ModelPart; |