Skip to content

Commit 14a03db

Browse files
committed
chore: remove unused/legacy item
1 parent 542a991 commit 14a03db

File tree

11 files changed

+8
-151
lines changed

11 files changed

+8
-151
lines changed

src/datagen/java/com/github/elenterius/biomancy/datagen/lang/EnglishLangProvider.java

-4
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,6 @@ private void addItemTranslations() {
509509
510510
Furthermore it has the ability to convert patches of dirt into grass or force spread mycelium.
511511
""");
512-
addItem(ModItems.GIFT_SAC, "Gift Sac", """
513-
Looks like some objects are wrapped in an organic layer of skin. Might be filled with items or toxin if your language is set to German.
514-
515-
Right Click the Sac to retrieve the Items.""");
516512
addItem(ModItems.ACID_BUCKET, "Gastric Acid Bucket");
517513
addItem(ModItems.GELLING_AGENT, "Gellant", "A gelatinous substance which turns liquids into a gel without altering its taste and other major properties.\nUseful for increasing the stability of volatile things.");
518514
addItem(ModItems.GRENADE_CASING, "Grenade Casing", "Outer grenade casing made of a hard organic material designed to rupture or detonate on impact.");

src/datagen/java/com/github/elenterius/biomancy/datagen/lang/PirateLangProvider.java

-4
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,6 @@ private void addItemTranslations() {
437437
- Sailin' through: Increasin' ta' chance to get through yer target's armor
438438
- Numbin' Hands: Preventin' ya from hurtin' the thing ya be injectin'""");
439439
addItem(ModItems.FERTILIZER, "Witches' Fertilizer", "Fertilizer that causes yer plants ta' grow quickly, even for Sugar reeds, cactus, verruca o' nether and tall one's flower.");
440-
addItem(ModItems.GIFT_SAC, "Sac o' Giftin'", """
441-
It be lookin' like some loot be wrapped in a layer o' skin. Might be filled with loot if ye be German.
442-
443-
Right Click ta' Sac to retrieve yer loot.""");
444440
addItem(ModItems.ACID_BUCKET, "Bucket o' Acid");
445441

446442
addItem(ModItems.RAVENOUS_CLAWS, "Multi-Cutlass o' Hunger", """

src/datagen/java/com/github/elenterius/biomancy/datagen/models/ModItemModelProvider.java

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ protected void registerModels() {
8989
basicItem(ModItems.NUTRIENT_BAR);
9090
basicItem(ModItems.BLOOMBERRY);
9191
serumItem(ModItems.VIAL);
92-
basicItem(ModItems.GIFT_SAC);
9392
basicItem(ModItems.FERTILIZER);
9493
overlayItem(ModItems.ESSENCE);
9594

src/generated/resources/assets/biomancy/lang/en_pt.json

-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@
7474
"item.biomancy.injector.tooltip": "A simple tool that be usin' a sharp needle ta' quickly and forcefully inject Serums inta Mobs an' Players.\n\nCan be infused with:\n - Sailin' through: Increasin' ta' chance to get through yer target's armor\n - Numbin' Hands: Preventin' ya from hurtin' the thing ya be injectin'",
7575
"item.biomancy.fertilizer": "Witches' Fertilizer",
7676
"item.biomancy.fertilizer.tooltip": "Fertilizer that causes yer plants ta' grow quickly, even for Sugar reeds, cactus, verruca o' nether and tall one's flower.",
77-
"item.biomancy.gift_sac": "Sac o' Giftin'",
78-
"item.biomancy.gift_sac.tooltip": "It be lookin' like some loot be wrapped in a layer o' skin. Might be filled with loot if ye be German.\n\nRight Click ta' Sac to retrieve yer loot.",
7977
"item.biomancy.acid_bucket": "Bucket o' Acid",
8078
"item.biomancy.ravenous_claws": "Multi-Cutlass o' Hunger",
8179
"item.biomancy.ravenous_claws.tooltip": "Extremely hungry an' vicious Claws forged by starvin' yer livin' flesh and slappin' claws onto it.\n\nRepair yer famished claws by feedin' them wit' grub in yer inventory, as ya' would fill a Pouch.\n\nKillin' Mobs with these claws be grantin' ya' humors, which allow ya' to use ta' Berserker's Rage.",

src/generated/resources/assets/biomancy/lang/en_us.json

-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@
7474
"item.biomancy.injector.tooltip": "A simple device which utilizes a razor sharp needle to quickly and forcefully inject Serums into Mobs and Players.\n\nCan be enchanted with:\n - Piercing: Increases the chance to pierce through armor\n - Anesthetic Touch: Nullifies the damage from the needle",
7575
"item.biomancy.fertilizer": "Bio-Alchemical Fertilizer",
7676
"item.biomancy.fertilizer.tooltip": "The Fertilizer induces hyper-growth in plants maturing them fully. It even affects bone-meal resistant plants such as:\n- sugarcane\n- cactus\n- nether wart\n- chorus\n\nFurthermore it has the ability to convert patches of dirt into grass or force spread mycelium.\n",
77-
"item.biomancy.gift_sac": "Gift Sac",
78-
"item.biomancy.gift_sac.tooltip": "Looks like some objects are wrapped in an organic layer of skin. Might be filled with items or toxin if your language is set to German.\n\nRight Click the Sac to retrieve the Items.",
7977
"item.biomancy.acid_bucket": "Gastric Acid Bucket",
8078
"item.biomancy.gelling_agent": "Gellant",
8179
"item.biomancy.gelling_agent.tooltip": "A gelatinous substance which turns liquids into a gel without altering its taste and other major properties.\nUseful for increasing the stability of volatile things.",

src/generated/resources/assets/biomancy/models/item/gift_sac.json

-6
This file was deleted.

src/main/java/com/github/elenterius/biomancy/BiomancyMod.java

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public static String createRLString(String path) {
8585
.icon(() -> new ItemStack(ModItems.LIVING_FLESH.get()))
8686
.displayItems((params, output) -> {
8787
Set<RegistryObject<? extends Item>> hiddenItems = Set.of(
88-
ModItems.GIFT_SAC,
8988
ModItems.ESSENCE,
9089
ModItems.GUIDE_BOOK,
9190
ModItems.DEV_ARM_CANNON

src/main/java/com/github/elenterius/biomancy/init/ModItems.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ public final class ModItems {
8888
public static final RegistryObject<SimpleItem> PRIMORDIAL_CORE = registerSimpleItem("primordial_core", ModRarities.VERY_RARE);
8989
public static final RegistryObject<SimpleItem> LIVING_FLESH = registerItem("living_flesh", props -> new SimpleItem(props.food(ModFoods.LIVING_FLESH).rarity(ModRarities.VERY_RARE)));
9090
public static final RegistryObject<EssenceItem> ESSENCE = registerItem("essence", EssenceItem::new);
91-
public static final RegistryObject<GiftSacItem> GIFT_SAC = registerItem("gift_sac", props -> new GiftSacItem(props.stacksTo(1).rarity(ModRarities.ULTRA_RARE)));
9291

9392
//# Tools
9493
public static final RegistryObject<GuideBookItem> GUIDE_BOOK = registerItem("guide_book", props -> new GuideBookItem(props.stacksTo(1).rarity(ModRarities.RARE)));
@@ -97,7 +96,6 @@ public final class ModItems {
9796
public static final RegistryObject<InjectorItem> INJECTOR = registerItem("injector", props -> new InjectorItem(props.durability(200).rarity(ModRarities.RARE)));
9897
public static final RegistryObject<RavenousClawsItem> RAVENOUS_CLAWS = registerItem("ravenous_claws", props -> new RavenousClawsItem(ModTiers.BIOFLESH, 4f, 3.5f, 250, props.rarity(ModRarities.VERY_RARE)));
9998
public static final RegistryObject<CausticGunbladeItem> CAUSTIC_GUNBLADE = registerItem("caustic_gunblade", props -> new CausticGunbladeItem(200, props.stacksTo(1).rarity(ModRarities.VERY_RARE)));
100-
public static final RegistryObject<DevArmCannonItem> DEV_ARM_CANNON = registerItem("dev_arm_cannon", props -> new DevArmCannonItem(props.stacksTo(1).durability(ModTiers.BIOFLESH.getUses()).rarity(ModRarities.ULTRA_RARE)));
10199
public static final RegistryObject<SimpleItem> GRENADE_CASING = registerSimpleItem("grenade_casing");
102100
public static final RegistryObject<GrenadeItem> TOXIN_GRENADE = registerItem("toxin_grenade", GrenadeItem::new);
103101
public static final RegistryObject<GrenadeItem> ACID_GRENADE = registerItem("acid_grenade", GrenadeItem::new);
@@ -124,6 +122,9 @@ public final class ModItems {
124122

125123
public static final RegistryObject<MaykerBannerPatternItem> MASCOT_BANNER_PATTERNS = registerItem("mascot_patterns", props -> new MaykerBannerPatternItem(ModBannerPatterns.TAG_MASCOT, props));
126124

125+
//## Dev
126+
public static final RegistryObject<DevArmCannonItem> DEV_ARM_CANNON = registerItem("dev_arm_cannon", props -> new DevArmCannonItem(props.stacksTo(1).durability(ModTiers.BIOFLESH.getUses()).rarity(ModRarities.ULTRA_RARE)));
127+
127128
//# Block Items
128129

129130
//## Machine

src/main/java/com/github/elenterius/biomancy/inventory/FixedSizeItemStackHandler.java

+5-32
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
package com.github.elenterius.biomancy.inventory;
22

3-
import com.github.elenterius.biomancy.init.ModItems;
4-
import com.github.elenterius.biomancy.item.GiftSacItem;
53
import net.minecraft.nbt.CompoundTag;
64
import net.minecraft.nbt.ListTag;
75
import net.minecraft.nbt.Tag;
86
import net.minecraft.world.item.ItemStack;
97
import net.minecraftforge.items.ItemStackHandler;
108

11-
import java.util.ArrayList;
12-
import java.util.List;
13-
149
public class FixedSizeItemStackHandler extends ItemStackHandler implements SerializableItemHandler {
1510

1611
public FixedSizeItemStackHandler(int size) {
@@ -40,36 +35,14 @@ public void deserializeNBT(CompoundTag tag) {
4035
setSize(stacks.size()); //fixed size
4136

4237
ListTag list = tag.getList("Items", Tag.TAG_COMPOUND);
43-
boolean isOverloaded = list.size() > stacks.size();
44-
45-
if (!isOverloaded) {
46-
for (int i = 0; i < list.size(); i++) {
47-
CompoundTag itemTag = list.getCompound(i);
48-
int slotIndex = itemTag.getInt("Slot");
49-
50-
if (slotIndex >= 0 && slotIndex < stacks.size()) {
51-
stacks.set(slotIndex, ItemStack.of(itemTag));
52-
}
53-
}
54-
}
55-
else {
56-
List<CompoundTag> overloadedItems = new ArrayList<>();
57-
int maxIndex = stacks.size() - 1;
5838

59-
for (int i = 0; i < list.size(); i++) {
60-
CompoundTag itemTag = list.getCompound(i);
61-
int slotIndex = itemTag.getInt("Slot");
39+
for (int i = 0; i < list.size(); i++) {
40+
CompoundTag itemTag = list.getCompound(i);
41+
int slotIndex = itemTag.getInt("Slot");
6242

63-
if (slotIndex >= 0 && slotIndex < maxIndex) {
64-
stacks.set(slotIndex, ItemStack.of(itemTag));
65-
}
66-
else {
67-
overloadedItems.add(itemTag.copy());
68-
}
43+
if (slotIndex >= 0 && slotIndex < stacks.size()) {
44+
stacks.set(slotIndex, ItemStack.of(itemTag));
6945
}
70-
71-
ItemStack giftSac = GiftSacItem.createFromItemTags(ModItems.GIFT_SAC.get(), overloadedItems);
72-
stacks.set(maxIndex, giftSac);
7346
}
7447

7548
onLoad();

src/main/java/com/github/elenterius/biomancy/item/GiftSacItem.java

-97
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)