diff --git a/build.gradle b/build.gradle index 670a6d8..af32e9d 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,9 @@ version = project.mod_version group = project.maven_group dependencies { - //to change the versions see the gradle.properties file + implementation 'org.jetbrains:annotations:15.0' + + //to change the versions see the gradle.properties file minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" diff --git a/gradle.properties b/gradle.properties index 351bfc2..8ee095d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.8.8+build.202 # Mod Properties - mod_version = 1.1.1 + mod_version = beta-1.1.2 maven_group = com.oroarmor archives_base_name = netherite-plus-mod-trinkets diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4b4429..c4573c3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Thu Jul 23 21:34:18 PDT 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip diff --git a/local.properties b/local.properties new file mode 100644 index 0000000..1f5d9fe --- /dev/null +++ b/local.properties @@ -0,0 +1,8 @@ +## This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# For customization when using a Version Control System, please read the +# header note. +#Thu Jul 23 21:07:26 PDT 2020 +sdk.dir=C\:\\Users\\Alex Stedman\\AppData\\Local\\Android\\Sdk diff --git a/src/main/java/com/oroarmor/netherite_plus/NetheritePlusClientMod.java b/src/main/java/com/oroarmor/netherite_plus/NetheritePlusClientMod.java index dd3a9fe..2374189 100644 --- a/src/main/java/com/oroarmor/netherite_plus/NetheritePlusClientMod.java +++ b/src/main/java/com/oroarmor/netherite_plus/NetheritePlusClientMod.java @@ -16,6 +16,12 @@ import net.minecraft.util.Identifier; public class NetheritePlusClientMod implements ClientModInitializer { + public static final SpriteIdentifier NETHERITE_SHIELD_BASE = new SpriteIdentifier( + SpriteAtlasTexture.BLOCK_ATLAS_TEX, new Identifier("netherite_plus", "entity/netherite_shield_base")); + + public static final SpriteIdentifier NETHERITE_SHIELD_BASE_NO_PATTERN = new SpriteIdentifier( + SpriteAtlasTexture.BLOCK_ATLAS_TEX, + new Identifier("netherite_plus", "entity/netherite_shield_base_nopattern")); public static final Identifier SHULKER_BOXES_ATLAS_TEXTURE = new Identifier("netherite_plus", "textures/atlas/shulker_boxes.png"); @@ -26,7 +32,9 @@ public void onInitializeClient() { NetheriteShulkerBoxBlockEntityRenderer::new); ClientSpriteRegistryCallback.event(SHULKER_BOXES_ATLAS_TEXTURE) - .register(NetheritePlusClientMod::registerSprites); + .register(NetheritePlusClientMod::registerShulkerBoxTextures); + ClientSpriteRegistryCallback.event(SpriteAtlasTexture.BLOCK_ATLAS_TEX) + .register(NetheritePlusClientMod::registerShieldTextures); NetheritePlusModItems.registerItemsAsDamagable(); } @@ -47,8 +55,15 @@ private static String makePath(DyeColor color) { } @SuppressWarnings("unused") - public static void registerSprites(SpriteAtlasTexture atlas, ClientSpriteRegistryCallback.Registry registry) { + public static void registerShulkerBoxTextures(SpriteAtlasTexture atlas, ClientSpriteRegistryCallback.Registry registry) { registry.register(new Identifier("netherite_plus", makePath(null))); Arrays.stream(DyeColor.values()).forEach(c -> registry.register(new Identifier("netherite_plus", makePath(c)))); } + + @SuppressWarnings("unused") + public static void registerShieldTextures(SpriteAtlasTexture atlas, + ClientSpriteRegistryCallback.Registry registry) { + registry.register(NETHERITE_SHIELD_BASE.getTextureId()); + registry.register(NETHERITE_SHIELD_BASE_NO_PATTERN.getTextureId()); + } } diff --git a/src/main/java/com/oroarmor/netherite_plus/NetheritePlusMod.java b/src/main/java/com/oroarmor/netherite_plus/NetheritePlusMod.java index 5940ee3..6b4a6ad 100644 --- a/src/main/java/com/oroarmor/netherite_plus/NetheritePlusMod.java +++ b/src/main/java/com/oroarmor/netherite_plus/NetheritePlusMod.java @@ -6,6 +6,7 @@ import net.fabricmc.api.ModInitializer; public class NetheritePlusMod implements ModInitializer { + @Override public void onInitialize() { NetheritePlusModItems.registerItems(); diff --git a/src/main/java/com/oroarmor/netherite_plus/item/NetheritePlusModItems.java b/src/main/java/com/oroarmor/netherite_plus/item/NetheritePlusModItems.java index ece5808..0a84985 100644 --- a/src/main/java/com/oroarmor/netherite_plus/item/NetheritePlusModItems.java +++ b/src/main/java/com/oroarmor/netherite_plus/item/NetheritePlusModItems.java @@ -4,7 +4,6 @@ import java.util.Map; import com.google.common.collect.Maps; -import com.mojang.realmsclient.client.RealmsClient.Environment; import com.oroarmor.netherite_plus.block.NetheritePlusModBlocks; import com.oroarmor.util.item.UniqueItemRegistry; @@ -17,6 +16,7 @@ import net.minecraft.item.FishingRodItem; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; +import net.minecraft.item.Items; import net.minecraft.util.Identifier; import net.minecraft.util.Rarity; import net.minecraft.util.registry.Registry; @@ -26,9 +26,13 @@ public class NetheritePlusModItems { public static final Item NETHERITE_ELYTRA = register(new Identifier("netherite_plus", "netherite_elytra"), new NetheriteElytraItem(new Item.Settings().maxDamage(864).group(ItemGroup.TRANSPORTATION) .rarity(Rarity.UNCOMMON).fireproof())); + public static final Item NETHERITE_FISHING_ROD = register(new Identifier("netherite_plus", "netherite_fishing_rod"), new NetheriteFishingRodItem(new Item.Settings().maxDamage(128).group(ItemGroup.TOOLS).fireproof())); + public static final Item NETHERITE_SHIELD = register(new Identifier("netherite_plus", "netherite_shield"), + new NetheriteShieldItem(new Item.Settings().maxDamage(672).group(ItemGroup.COMBAT).fireproof())); + public static final Item.Settings NETHERITE_SHULKER_BOX_ITEM_SETTINGS = new Item.Settings().maxCount(1) .group(ItemGroup.DECORATIONS).fireproof(); @@ -70,6 +74,7 @@ public class NetheritePlusModItems { static { UniqueItemRegistry.ELYTRA.addItemToRegistry(NETHERITE_ELYTRA); UniqueItemRegistry.FISHING_ROD.addItemToRegistry(NETHERITE_FISHING_ROD); + UniqueItemRegistry.SHIELD.addItemToRegistry(NETHERITE_SHIELD); } public static void registerItems() { @@ -82,6 +87,8 @@ public static void registerItemsAsDamagable() { f.setAccessible(true); registerElytraAsDamageable(f); registerFishingRodAsDamageable(f); + // TODO get this working + registerShieldAsDamageable(f); } catch (Exception e) { e.printStackTrace(); } @@ -97,6 +104,17 @@ public static void registerElytraAsDamageable(Field f) throws IllegalAccessExcep }); } + @SuppressWarnings("unchecked") + public static void registerShieldAsDamageable(Field f) throws IllegalAccessException { + ((Map>) f.get(new Object())) + .computeIfAbsent(NETHERITE_SHIELD, (itemx) -> { + return Maps.newHashMap(); + }).put(new Identifier("blocking"), (itemStack, clientWorld, livingEntity) -> { + return livingEntity != null && livingEntity.isUsingItem() + && livingEntity.getActiveItem() == itemStack ? 1.0F : 0.0F; + }); + } + @SuppressWarnings("unchecked") public static void registerFishingRodAsDamageable(Field f) throws IllegalAccessException { ((Map>) f.get(new Object())) diff --git a/src/main/java/com/oroarmor/netherite_plus/item/NetheriteShieldItem.java b/src/main/java/com/oroarmor/netherite_plus/item/NetheriteShieldItem.java new file mode 100644 index 0000000..dca0604 --- /dev/null +++ b/src/main/java/com/oroarmor/netherite_plus/item/NetheriteShieldItem.java @@ -0,0 +1,29 @@ +package com.oroarmor.netherite_plus.item; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ShieldItem; +import net.minecraft.util.Hand; +import net.minecraft.util.TypedActionResult; +import net.minecraft.util.UseAction; +import net.minecraft.world.World; + +public class NetheriteShieldItem extends ShieldItem { + public NetheriteShieldItem(Settings settings) { + super(settings); + } + + @Override + public UseAction getUseAction(ItemStack stack) { + return UseAction.BLOCK; + } + + @Override + public TypedActionResult use(World world, PlayerEntity user, Hand hand) { + ItemStack itemStack = user.getStackInHand(hand); + user.setCurrentHand(hand); + System.out.println("used"); + return TypedActionResult.consume(itemStack); + } + +} diff --git a/src/main/java/com/oroarmor/netherite_plus/mixin/BuiltinModelItemRendererMixin.java b/src/main/java/com/oroarmor/netherite_plus/mixin/BuiltinModelItemRendererMixin.java index f7cbd7d..6f53fac 100644 --- a/src/main/java/com/oroarmor/netherite_plus/mixin/BuiltinModelItemRendererMixin.java +++ b/src/main/java/com/oroarmor/netherite_plus/mixin/BuiltinModelItemRendererMixin.java @@ -2,32 +2,48 @@ import java.util.Arrays; import java.util.Comparator; +import java.util.List; 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.CallbackInfo; +import com.mojang.datafixers.util.Pair; +import com.oroarmor.netherite_plus.NetheritePlusClientMod; import com.oroarmor.netherite_plus.block.NetheriteShulkerBoxBlock; import com.oroarmor.netherite_plus.block.entity.NetheriteShulkerBoxBlockEntity; +import com.oroarmor.netherite_plus.item.NetheritePlusModItems; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.block.entity.BannerBlockEntity; +import net.minecraft.block.entity.BannerPattern; import net.minecraft.block.entity.BlockEntity; +import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.block.entity.BannerBlockEntityRenderer; import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; +import net.minecraft.client.render.entity.model.ShieldEntityModel; import net.minecraft.client.render.item.BuiltinModelItemRenderer; +import net.minecraft.client.render.item.ItemRenderer; +import net.minecraft.client.render.model.ModelLoader; import net.minecraft.client.render.model.json.ModelTransformation; +import net.minecraft.client.texture.SpriteAtlasTexture; +import net.minecraft.client.util.SpriteIdentifier; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.ShieldItem; import net.minecraft.util.DyeColor; +import net.minecraft.util.Identifier; @Environment(EnvType.CLIENT) @Mixin(BuiltinModelItemRenderer.class) public class BuiltinModelItemRendererMixin { + private final ShieldEntityModel modelShield = new ShieldEntityModel(); private static final NetheriteShulkerBoxBlockEntity[] RENDER_NETHERITE_SHULKER_BOX_DYED = Arrays .stream(DyeColor.values()).sorted(Comparator.comparingInt(DyeColor::getId)) .map(NetheriteShulkerBoxBlockEntity::new).toArray((i) -> { @@ -55,6 +71,26 @@ public void render(ItemStack stack, ModelTransformation.Mode mode, MatrixStack m BlockEntityRenderDispatcher.INSTANCE.renderEntity(blockEntity9, matrixStack, vertexConsumerProvider, i, j); info.cancel(); + } else if (item == NetheritePlusModItems.NETHERITE_SHIELD) { + boolean bl = stack.getSubTag("BlockEntityTag") != null; + matrixStack.push(); + matrixStack.scale(1.0F, -1.0F, -1.0F); + SpriteIdentifier spriteIdentifier = bl ? NetheritePlusClientMod.NETHERITE_SHIELD_BASE + : NetheritePlusClientMod.NETHERITE_SHIELD_BASE_NO_PATTERN; + VertexConsumer vertexConsumer = spriteIdentifier.getSprite() + .getTextureSpecificVertexConsumer(ItemRenderer.method_29711(vertexConsumerProvider, + this.modelShield.getLayer(spriteIdentifier.getAtlasId()), true, stack.hasGlint())); + this.modelShield.method_23775().render(matrixStack, vertexConsumer, i, j, 1.0F, 1.0F, 1.0F, 1.0F); + if (bl) { + List> list = BannerBlockEntity.method_24280(ShieldItem.getColor(stack), + BannerBlockEntity.getPatternListTag(stack)); + BannerBlockEntityRenderer.renderCanvas(matrixStack, vertexConsumerProvider, i, j, + this.modelShield.method_23774(), spriteIdentifier, false, list, stack.hasGlint()); + } else { + this.modelShield.method_23774().render(matrixStack, vertexConsumer, i, j, 1.0F, 1.0F, 1.0F, 1.0F); + } + + matrixStack.pop(); } } diff --git a/src/main/java/com/oroarmor/netherite_plus/mixin/FishingBobberEntityRendererMixin.java b/src/main/java/com/oroarmor/netherite_plus/mixin/FishingBobberEntityRendererMixin.java new file mode 100644 index 0000000..23b7c1a --- /dev/null +++ b/src/main/java/com/oroarmor/netherite_plus/mixin/FishingBobberEntityRendererMixin.java @@ -0,0 +1,20 @@ +package com.oroarmor.netherite_plus.mixin; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +import com.oroarmor.util.item.UniqueItemRegistry; + +import net.minecraft.client.render.entity.FishingBobberEntityRenderer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +@Mixin(FishingBobberEntityRenderer.class) +public class FishingBobberEntityRendererMixin { + + @Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;getItem()Lnet/minecraft/item/Item;")) + private Item getItem(ItemStack stack) { + return UniqueItemRegistry.FISHING_ROD.getDefaultItem(stack.getItem()); + } +} diff --git a/src/main/java/com/oroarmor/netherite_plus/mixin/ModelLoaderMixin.java b/src/main/java/com/oroarmor/netherite_plus/mixin/ModelLoaderMixin.java new file mode 100644 index 0000000..2d7d11b --- /dev/null +++ b/src/main/java/com/oroarmor/netherite_plus/mixin/ModelLoaderMixin.java @@ -0,0 +1,4 @@ +package com.oroarmor.netherite_plus.mixin; + +public class ModelLoaderMixin { +} diff --git a/src/main/java/com/oroarmor/netherite_plus/mixin/PlayerEntityMixin.java b/src/main/java/com/oroarmor/netherite_plus/mixin/PlayerEntityMixin.java index 55518ef..47edd2b 100644 --- a/src/main/java/com/oroarmor/netherite_plus/mixin/PlayerEntityMixin.java +++ b/src/main/java/com/oroarmor/netherite_plus/mixin/PlayerEntityMixin.java @@ -17,4 +17,9 @@ public abstract class PlayerEntityMixin { private Item tickMovement(ItemStack stack) { return UniqueItemRegistry.ELYTRA.getDefaultItem(stack.getItem()); } + + @Redirect(method = "damageShield(F)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;getItem()Lnet/minecraft/item/Item;")) + private Item shields(ItemStack stack) { + return UniqueItemRegistry.SHIELD.getDefaultItem(stack.getItem()); + } } diff --git a/src/main/java/com/oroarmor/netherite_plus/recipe/NetheritePlusRecipeSerializer.java b/src/main/java/com/oroarmor/netherite_plus/recipe/NetheritePlusRecipeSerializer.java index 28b2117..25ea295 100644 --- a/src/main/java/com/oroarmor/netherite_plus/recipe/NetheritePlusRecipeSerializer.java +++ b/src/main/java/com/oroarmor/netherite_plus/recipe/NetheritePlusRecipeSerializer.java @@ -10,6 +10,9 @@ public class NetheritePlusRecipeSerializer { public static final SpecialRecipeSerializer NETHERITE_SHULKER_BOX = register( "crafting_special_netheriteshulkerboxcoloring", new SpecialRecipeSerializer<>(NetheriteShulkerBoxColoringRecipe::new)); + public static final SpecialRecipeSerializer NETHERITE_SHIELD = register( + "crafting_special_netheriteshielddecoration", + new SpecialRecipeSerializer<>(NetheriteShieldDecorationRecipe::new)); public static , T extends Recipe> S register(String id, S serializer) { return Registry.register(Registry.RECIPE_SERIALIZER, new Identifier("netherite_plus", id), serializer); diff --git a/src/main/java/com/oroarmor/netherite_plus/recipe/NetheriteShieldDecorationRecipe.java b/src/main/java/com/oroarmor/netherite_plus/recipe/NetheriteShieldDecorationRecipe.java new file mode 100644 index 0000000..cff9ac7 --- /dev/null +++ b/src/main/java/com/oroarmor/netherite_plus/recipe/NetheriteShieldDecorationRecipe.java @@ -0,0 +1,96 @@ +package com.oroarmor.netherite_plus.recipe; + +import com.oroarmor.netherite_plus.item.NetheritePlusModItems; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.inventory.CraftingInventory; +import net.minecraft.item.BannerItem; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.recipe.RecipeSerializer; +import net.minecraft.recipe.SpecialCraftingRecipe; +import net.minecraft.util.Identifier; +import net.minecraft.world.World; + +public class NetheriteShieldDecorationRecipe extends SpecialCraftingRecipe { + public NetheriteShieldDecorationRecipe(Identifier identifier) { + super(identifier); + } + + @Override + public boolean matches(CraftingInventory craftingInventory, World world) { + ItemStack itemStack = ItemStack.EMPTY; + ItemStack itemStack2 = ItemStack.EMPTY; + + for (int i = 0; i < craftingInventory.size(); ++i) { + ItemStack itemStack3 = craftingInventory.getStack(i); + if (!itemStack3.isEmpty()) { + if (itemStack3.getItem() instanceof BannerItem) { + if (!itemStack2.isEmpty()) { + return false; + } + + itemStack2 = itemStack3; + } else { + if (itemStack3.getItem() != NetheritePlusModItems.NETHERITE_SHIELD) { + return false; + } + + if (!itemStack.isEmpty()) { + return false; + } + + if (itemStack3.getSubTag("BlockEntityTag") != null) { + return false; + } + + itemStack = itemStack3; + } + } + } + + if (!itemStack.isEmpty() && !itemStack2.isEmpty()) { + return true; + } + return false; + + } + + @Override + public ItemStack craft(CraftingInventory craftingInventory) { + ItemStack itemStack = ItemStack.EMPTY; + ItemStack itemStack2 = ItemStack.EMPTY; + + for (int i = 0; i < craftingInventory.size(); ++i) { + ItemStack itemStack3 = craftingInventory.getStack(i); + if (!itemStack3.isEmpty()) { + if (itemStack3.getItem() instanceof BannerItem) { + itemStack = itemStack3; + } else if (itemStack3.getItem() == NetheritePlusModItems.NETHERITE_SHIELD) { + itemStack2 = itemStack3.copy(); + } + } + } + + if (itemStack2.isEmpty()) { + return itemStack2; + } + CompoundTag compoundTag = itemStack.getSubTag("BlockEntityTag"); + CompoundTag compoundTag2 = compoundTag == null ? new CompoundTag() : compoundTag.copy(); + compoundTag2.putInt("Base", ((BannerItem) itemStack.getItem()).getColor().getId()); + itemStack2.putSubTag("BlockEntityTag", compoundTag2); + return itemStack2; + } + + @Override + @Environment(EnvType.CLIENT) + public boolean fits(int width, int height) { + return width * height >= 2; + } + + @Override + public RecipeSerializer getSerializer() { + return RecipeSerializer.SHIELD_DECORATION; + } +} diff --git a/src/main/java/com/oroarmor/util/item/UniqueItemRegistry.java b/src/main/java/com/oroarmor/util/item/UniqueItemRegistry.java index 54af456..4a88dea 100644 --- a/src/main/java/com/oroarmor/util/item/UniqueItemRegistry.java +++ b/src/main/java/com/oroarmor/util/item/UniqueItemRegistry.java @@ -12,7 +12,8 @@ public class UniqueItemRegistry { private Item defaultItem; public static UniqueItemRegistry ELYTRA = new UniqueItemRegistry(Items.ELYTRA), - FISHING_ROD = new UniqueItemRegistry(Items.FISHING_ROD); + FISHING_ROD = new UniqueItemRegistry(Items.FISHING_ROD), + SHIELD = new UniqueItemRegistry(Items.SHIELD); private UniqueItemRegistry(Item defaultItem) { this.defaultItem = defaultItem; diff --git a/src/main/resources/assets/netherite_plus/lang/en_us.json b/src/main/resources/assets/netherite_plus/lang/en_us.json index 35f8ea6..c56813c 100644 --- a/src/main/resources/assets/netherite_plus/lang/en_us.json +++ b/src/main/resources/assets/netherite_plus/lang/en_us.json @@ -18,5 +18,22 @@ "block.netherite_plus.netherite_brown_shulker_box": "Brown Netherite Shulker Box", "block.netherite_plus.netherite_green_shulker_box": "Green Netherite Shulker Box", "block.netherite_plus.netherite_red_shulker_box": "Red Netherite Shulker Box", - "block.netherite_plus.netherite_black_shulker_box": "Black NetheriteShulker Box" + "block.netherite_plus.netherite_black_shulker_box": "Black Netherite Shulker Box", + "item.netherite_plus.netherite_shield": "Netherite Shield", + "item.netherite_plus.netherite_shield.black": "Black Netherite Shield", + "item.netherite_plus.netherite_shield.red": "Red Netherite Shield", + "item.netherite_plus.netherite_shield.green": "Green Netherite Shield", + "item.netherite_plus.netherite_shield.brown": "Brown Netherite Shield", + "item.netherite_plus.netherite_shield.blue": "Blue Netherite Shield", + "item.netherite_plus.netherite_shield.purple": "Purple Netherite Shield", + "item.netherite_plus.netherite_shield.cyan": "Cyan Netherite Shield", + "item.netherite_plus.netherite_shield.light_gray": "Light Gray Netherite Shield", + "item.netherite_plus.netherite_shield.gray": "Gray Netherite Shield", + "item.netherite_plus.netherite_shield.pink": "Pink Netherite Shield", + "item.netherite_plus.netherite_shield.lime": "Lime Netherite Shield", + "item.netherite_plus.netherite_shield.yellow": "Yellow Netherite Shield", + "item.netherite_plus.netherite_shield.light_blue": "Light Blue Netherite Shield", + "item.netherite_plus.netherite_shield.magenta": "Magenta Netherite Shield", + "item.netherite_plus.netherite_shield.orange": "Orange Netherite Shield", + "item.netherite_plus.netherite_shield.white": "White Netherite Shield" } \ No newline at end of file diff --git a/src/main/resources/assets/netherite_plus/models/item/netherite_shield.json b/src/main/resources/assets/netherite_plus/models/item/netherite_shield.json new file mode 100644 index 0000000..1a87038 --- /dev/null +++ b/src/main/resources/assets/netherite_plus/models/item/netherite_shield.json @@ -0,0 +1,52 @@ +{ + "parent": "builtin/entity", + "gui_light": "front", + "textures": { + "particle": "block/dark_oak_planks" + }, + "display": { + "thirdperson_righthand": { + "rotation": [ 0, 90, 0 ], + "translation": [ 10, 6, -4 ], + "scale": [ 1, 1, 1 ] + }, + "thirdperson_lefthand": { + "rotation": [ 0, 90, 0 ], + "translation": [ 10, 6, 12 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 180, 5 ], + "translation": [ -10, 2, -10 ], + "scale": [ 1.25, 1.25, 1.25 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 180, 5 ], + "translation": [ 10, 0, -10 ], + "scale": [ 1.25, 1.25, 1.25 ] + }, + "gui": { + "rotation": [ 15, -25, -5 ], + "translation": [ 2, 3, 0 ], + "scale": [ 0.65, 0.65, 0.65 ] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ -2, 4, -5], + "scale":[ 0.5, 0.5, 0.5] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 4, 4, 2], + "scale":[ 0.25, 0.25, 0.25] + } + }, + "overrides": [ + { + "predicate": { + "blocking": 1 + }, + "model": "netherite_plus:item/netherite_shield_blocking" + } + ] +} diff --git a/src/main/resources/assets/netherite_plus/models/item/netherite_shield_blocking.json b/src/main/resources/assets/netherite_plus/models/item/netherite_shield_blocking.json new file mode 100644 index 0000000..1affe4d --- /dev/null +++ b/src/main/resources/assets/netherite_plus/models/item/netherite_shield_blocking.json @@ -0,0 +1,34 @@ +{ + "parent": "builtin/entity", + "gui_light": "front", + "textures": { + "particle": "block/dark_oak_planks" + }, + "display": { + "thirdperson_righthand": { + "rotation": [ 45, 135, 0 ], + "translation": [ 3.51, 11, -2 ], + "scale": [ 1, 1, 1 ] + }, + "thirdperson_lefthand": { + "rotation": [ 45, 135, 0 ], + "translation": [ 13.51, 3, 5 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 180, -5 ], + "translation": [ -15, 5, -11 ], + "scale": [ 1.25, 1.25, 1.25 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 180, -5 ], + "translation": [ 5, 5, -11 ], + "scale": [ 1.25, 1.25, 1.25 ] + }, + "gui": { + "rotation": [ 15, -25, -5 ], + "translation": [ 2, 3, 0 ], + "scale": [ 0.65, 0.65, 0.65 ] + } + } +} diff --git a/src/main/resources/assets/netherite_plus/textures/entity/netherite_shield_base.png b/src/main/resources/assets/netherite_plus/textures/entity/netherite_shield_base.png new file mode 100644 index 0000000..235e514 Binary files /dev/null and b/src/main/resources/assets/netherite_plus/textures/entity/netherite_shield_base.png differ diff --git a/src/main/resources/assets/netherite_plus/textures/entity/netherite_shield_base_nopattern.png b/src/main/resources/assets/netherite_plus/textures/entity/netherite_shield_base_nopattern.png new file mode 100644 index 0000000..82a3077 Binary files /dev/null and b/src/main/resources/assets/netherite_plus/textures/entity/netherite_shield_base_nopattern.png differ diff --git a/src/main/resources/data/netherite_plus/recipes/netherite_shield.json b/src/main/resources/data/netherite_plus/recipes/netherite_shield.json new file mode 100644 index 0000000..35fbe53 --- /dev/null +++ b/src/main/resources/data/netherite_plus/recipes/netherite_shield.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:smithing", + "base": { + "item": "minecraft:shield" + }, + "addition": { + "item": "minecraft:netherite_ingot" + }, + "result": { + "item": "netherite_plus:netherite_shield" + } +} \ No newline at end of file diff --git a/src/main/resources/data/netherite_plus/recipes/netherite_shield_decoration.json b/src/main/resources/data/netherite_plus/recipes/netherite_shield_decoration.json new file mode 100644 index 0000000..0b570f2 --- /dev/null +++ b/src/main/resources/data/netherite_plus/recipes/netherite_shield_decoration.json @@ -0,0 +1,3 @@ +{ + "type": "netherite_plus:crafting_special_netheriteshielddecoration" +} \ No newline at end of file diff --git a/src/main/resources/netherite_plus.mixins.json b/src/main/resources/netherite_plus.mixins.json index 20524ed..2ae1c7f 100644 --- a/src/main/resources/netherite_plus.mixins.json +++ b/src/main/resources/netherite_plus.mixins.json @@ -16,7 +16,8 @@ "BlockEntityRenderDispatcherMixin", "TexturedRenderLayersMixin", "ClientPlayerEntityMixin", - "BuiltinModelItemRendererMixin" + "BuiltinModelItemRendererMixin", + "FishingBobberEntityRendererMixin" ], "injectors": { "defaultRequire": 1