From 7457bb5f78628fb136805258ea61473d97b7f7d5 Mon Sep 17 00:00:00 2001 From: Leclowndu93150 Date: Sun, 6 Oct 2024 16:01:01 +0200 Subject: [PATCH] Let's go --- LICENSE | 11 ++++++++ TEMPLATE_LICENSE.txt | 24 ---------------- .../moreplates/MorePlatesMod.java | 7 +++-- .../moreplates/content/items/HammerItem.java | 5 ---- .../moreplates/registries/MPCreativeTabs.java | 4 ++- .../moreplates/registries/MPItems.java | 5 ---- .../models/item/infinity_plate.json | 6 ---- .../textures/item/infinity_plate.png | Bin 2346 -> 0 bytes .../textures/item/infinity_plate.png.mcmeta | 26 ------------------ 9 files changed, 18 insertions(+), 70 deletions(-) create mode 100644 LICENSE delete mode 100644 TEMPLATE_LICENSE.txt delete mode 100644 src/main/resources/assets/moreplates/models/item/infinity_plate.json delete mode 100644 src/main/resources/assets/moreplates/textures/item/infinity_plate.png delete mode 100644 src/main/resources/assets/moreplates/textures/item/infinity_plate.png.mcmeta diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5bf1352 --- /dev/null +++ b/LICENSE @@ -0,0 +1,11 @@ +All Rights Reserved + +Copyright (c) 2024 Leclowndu93150 + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/TEMPLATE_LICENSE.txt b/TEMPLATE_LICENSE.txt deleted file mode 100644 index b64bc64..0000000 --- a/TEMPLATE_LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -MIT License - -Copyright (c) 2023 NeoForged project - -This license applies to the template files as supplied by github.com/NeoForged/MDK - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/src/main/java/com/portingdeadmods/moreplates/MorePlatesMod.java b/src/main/java/com/portingdeadmods/moreplates/MorePlatesMod.java index f42c173..4324066 100644 --- a/src/main/java/com/portingdeadmods/moreplates/MorePlatesMod.java +++ b/src/main/java/com/portingdeadmods/moreplates/MorePlatesMod.java @@ -33,10 +33,11 @@ public MorePlatesMod(IEventBus modEventBus, ModContainer modContainer) { } public static void onCreativeTab(BuildCreativeModeTabContentsEvent event) { - if(event.getTab() == MPCreativeTabs.MORE_PLATES_TAB.get()){ + if (event.getTab() == MPCreativeTabs.MORE_PLATES_TAB.get()) { BuiltInRegistries.ITEM.stream() - .filter(rs -> rs.getDescriptionId().contains(MorePlatesMod.MODID)) - .forEach(rs -> event.accept(rs.asItem())); + .filter(item -> item.getDescriptionId().contains(MorePlatesMod.MODID) && !item.equals(MPItems.HAMMER.get())) + .forEach(item -> event.accept(item.asItem())); + event.accept(MPItems.HAMMER.get().asItem()); } } diff --git a/src/main/java/com/portingdeadmods/moreplates/content/items/HammerItem.java b/src/main/java/com/portingdeadmods/moreplates/content/items/HammerItem.java index e406db8..41be9f9 100644 --- a/src/main/java/com/portingdeadmods/moreplates/content/items/HammerItem.java +++ b/src/main/java/com/portingdeadmods/moreplates/content/items/HammerItem.java @@ -24,11 +24,6 @@ public boolean isBarVisible(ItemStack stack) { return stack.isDamaged(); } - @Override - public int getBarColor(ItemStack stack) { - return 0x0000FF + (0xFF0000 - 0x0000FF) * stack.getDamageValue() / stack.getMaxDamage(); - } - @Override public @NotNull ItemStack getCraftingRemainingItem(ItemStack itemStack) { ItemStack hammer = itemStack.copy(); diff --git a/src/main/java/com/portingdeadmods/moreplates/registries/MPCreativeTabs.java b/src/main/java/com/portingdeadmods/moreplates/registries/MPCreativeTabs.java index ab6db12..1ef6ad4 100644 --- a/src/main/java/com/portingdeadmods/moreplates/registries/MPCreativeTabs.java +++ b/src/main/java/com/portingdeadmods/moreplates/registries/MPCreativeTabs.java @@ -4,7 +4,9 @@ import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.Item; import net.minecraft.world.item.Items; import net.neoforged.neoforge.registries.DeferredRegister; @@ -15,7 +17,7 @@ public class MPCreativeTabs { public static final Supplier MORE_PLATES_TAB = CREATIVE_MODE_TABS.register("moreplatestab", () -> CreativeModeTab.builder() .title(Component.literal("More Plates")) - .icon(() -> MPItems.INFINITY_PLATE.get().getDefaultInstance()) + .icon(() -> BuiltInRegistries.ITEM.get(ResourceLocation.parse("moreplates:gold_plate")).getDefaultInstance()) .displayItems((params, output) -> { }) .build()); diff --git a/src/main/java/com/portingdeadmods/moreplates/registries/MPItems.java b/src/main/java/com/portingdeadmods/moreplates/registries/MPItems.java index 81fba0a..e26f32e 100644 --- a/src/main/java/com/portingdeadmods/moreplates/registries/MPItems.java +++ b/src/main/java/com/portingdeadmods/moreplates/registries/MPItems.java @@ -14,8 +14,6 @@ public class MPItems { public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(MorePlatesMod.MODID); - public static final DeferredItem INFINITY_PLATE = ITEMS.register("infinity_plate", () -> new Item(new Item.Properties())); - public static final DeferredItem HAMMER = ITEMS.register("hammer", () -> new HammerItem(new Item.Properties())); public static void registerCustomItems(List customItems) { @@ -25,19 +23,16 @@ public static void registerCustomItems(List customItems) { String namespace = parts[0]; String itemID = parts[1]; - // Register Plate String plateId = itemID + "_plate"; DeferredItem plate = ITEMS.register(plateId, () -> new Item(new Item.Properties())); MPConfig.saveIngotPlatePair(ResourceLocation.parse(namespace + ":" + itemID), ResourceLocation.parse(MorePlatesMod.MODID + ":" + plateId)); - // Register Gear String gearId = itemID + "_gear"; DeferredItem gear = ITEMS.register(gearId, () -> new Item(new Item.Properties())); MPConfig.saveIngotGearPair(ResourceLocation.parse(namespace + ":" + itemID), ResourceLocation.parse(MorePlatesMod.MODID + ":" + gearId)); - // Register Rod String rodId = itemID + "_rod"; DeferredItem rod = ITEMS.register(rodId, () -> new Item(new Item.Properties())); diff --git a/src/main/resources/assets/moreplates/models/item/infinity_plate.json b/src/main/resources/assets/moreplates/models/item/infinity_plate.json deleted file mode 100644 index 214665a..0000000 --- a/src/main/resources/assets/moreplates/models/item/infinity_plate.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "minecraft:item/generated", - "textures": { - "layer0": "moreplates:item/infinity_plate" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/moreplates/textures/item/infinity_plate.png b/src/main/resources/assets/moreplates/textures/item/infinity_plate.png deleted file mode 100644 index bfd4ee452479627236c5921368de66335abe4ef0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2346 zcmV+_3Dx$AP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT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K7JV5fGclZhL0UkJY=?x+YNa@xd%NIJXqb< z10Tw17p^-wz*X{~XJdk%uLYPH-_8S<lZ|@de; z_){@l8~cysL8y)gBeDmdFNR&i1Cj^(cj5t%cR*9Y1G#NI7##&tV3-gMLuwJ!MQB+i z=g)D;SmK<9@Ic? z56Wq9-J$$^(8dI9F9w*oR>K4TrUwWQETFmM!2#T`8xLYwoShaPcy$@*wd&7;?)DRf?3yti=&0fXMm^;DHBu! zTGHT$YsR|d0b4vs2jPVwpyUB4+%5CqQ*}IO(qN_FL8PV!R6if&wFn9eVjU~13wce&jv_LhiPgzNV3HP_f`)m|Nnts_JErt*$e6pJaDl1%}NZrBZq>+*zBBW z#jPI9)$!nQ$%DaupqdB$!h_Tn4_0b;(7jG#@gBa8N85wh%QZY`2eZ&;BmoP8CWJ)M zpZf`t2ZJYT53^D@9}tEkNjTCCe;%(kg}c(9bQfci6QwXXO&t#oKV7=>LVGD5rs%$}i8(k}Z1BTE_!4;0n+OYfB(J za1ZWBqnS1|;=l$F%5CugEmDwZ^&05+pz9dWhMOiJ2WZTa!@x!AHYi8I)gdQPV!#9h z0)@@S09=5=0uRWMBTFZ7Ks{Q;gREwv2@jGeBsM)@2OfaMbz;~E50E@S^1!H)AgmQU zcoNA2BoB~0@F6_d(n!}49^fN`hk54c#Kg}!3GU(J06GJhMl0?#kDLcYMHzXBsgP|4 zOZ5E~4;;yZzHiDNAUdPH#!$ogRLGA z5lOCz?K}p!D}RFpQdv;6k_S=+6F@-3hJXZ7N#TkESutcY8e+DEc5@KBTgnT~PkNjr3uH_wi{|9yY;$0jEy)Q)3L% QHvj+t07*qoM6N<$f=+!tIRF3v diff --git a/src/main/resources/assets/moreplates/textures/item/infinity_plate.png.mcmeta b/src/main/resources/assets/moreplates/textures/item/infinity_plate.png.mcmeta deleted file mode 100644 index 0bab216..0000000 --- a/src/main/resources/assets/moreplates/textures/item/infinity_plate.png.mcmeta +++ /dev/null @@ -1,26 +0,0 @@ -{ - "animation": { - "interpolate": true, - "frametime": 30, - "frames": [ - { "index": 0, "time": 3 }, - { "index": 1, "time": 3 }, - { "index": 2, "time": 3 }, - { - "index": 3, "time": 2 }, - { - "index": 4, "time": 2 }, - 5, - 6, - 7, - 8, - 7, - 6, - 5, - { "index": 4, "time": 2 }, - { "index": 3, "time": 2 }, - { "index": 2, "time": 3 }, - { "index": 1, "time": 3 } - ] - } -}