Skip to content

Commit

Permalink
Revert some stuff for a bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Traister101 committed Oct 6, 2024
1 parent 6c74927 commit 1064ed9
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 168 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,26 +119,27 @@ protected void buildRecipes(final Consumer<FinishedRecipe> writer) {
.unlockedBy("has_leather", has(Items.LEATHER))
.unlockedBy("has_sewing_needle", has(TFCTags.Items.SEWING_NEEDLES))
.save(writer);

ShapedRecipeBuilder.shaped(SNSItems.MOB_NET_ITEM.get())
.pattern("R R", " R ", "R R")
.define('R', SNSItems.REINFORCED_FIBER.get())
.unlockedBy("has_reinforced_fiber", has(SNSItems.REINFORCED_FIBER.get()))
.save(writer);

{
final var wroughtIronRodsTag = TagKey.create(Registries.ITEM, new ResourceLocation("forge", "rods/wrought_iron"));
final var wroughtIronSheetsTag = TagKey.create(Registries.ITEM, new ResourceLocation("forge", "sheets/wrought_iron"));
ShapedRecipeBuilder.shaped(SNSItems.LUNCHBOX.get())
.pattern("RRR", "SFS", " S ")
.define('R', wroughtIronRodsTag)
.define('S', wroughtIronSheetsTag)
.define('F', SNSItems.REINFORCED_FABRIC.get())
.unlockedBy("has_wrought_iron_rods", has(wroughtIronRodsTag))
.unlockedBy("has_wrought_iron_sheets", has(wroughtIronSheetsTag))
.unlockedBy("has_reinforced_fabric", has(SNSItems.REINFORCED_FABRIC.get()))
.save(writer);
}
// TODO add this back when the content is finished
//
// ShapedRecipeBuilder.shaped(SNSItems.MOB_NET_ITEM.get())
// .pattern("R R", " R ", "R R")
// .define('R', SNSItems.REINFORCED_FIBER.get())
// .unlockedBy("has_reinforced_fiber", has(SNSItems.REINFORCED_FIBER.get()))
// .save(writer);
//
// {
// final var wroughtIronRodsTag = TagKey.create(Registries.ITEM, new ResourceLocation("forge", "rods/wrought_iron"));
// final var wroughtIronSheetsTag = TagKey.create(Registries.ITEM, new ResourceLocation("forge", "sheets/wrought_iron"));
// ShapedRecipeBuilder.shaped(SNSItems.LUNCHBOX.get())
// .pattern("RRR", "SFS", " S ")
// .define('R', wroughtIronRodsTag)
// .define('S', wroughtIronSheetsTag)
// .define('F', SNSItems.REINFORCED_FABRIC.get())
// .unlockedBy("has_wrought_iron_rods", has(wroughtIronRodsTag))
// .unlockedBy("has_wrought_iron_sheets", has(wroughtIronSheetsTag))
// .unlockedBy("has_reinforced_fabric", has(SNSItems.REINFORCED_FABRIC.get()))
// .save(writer);
// }

writer.accept(new LeatherKnapping(SNSItems.UNFINISHED_LEATHER_SACK.get(), " XXX ", "XXXXX", "XXXXX", "XXXXX", " XXX "));
writer.accept(new Loom(new ItemStackIngredient(Ingredient.of(SNSItems.REINFORCED_FIBER.get()), 16), SNSItems.REINFORCED_FABRIC.get(), 1, 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public BuiltInItemTags(final PackOutput packOutput, final CompletableFuture<Prov
@Override
protected void addTags(final Provider provider) {
tag(SNSItemTags.PREVENTED_IN_ITEM_CONTAINERS).add(SNSItems.STRAW_BASKET.get(), SNSItems.LEATHER_SACK.get(), SNSItems.BURLAP_SACK.get(),
SNSItems.ORE_SACK.get(), SNSItems.SEED_POUCH.get(), SNSItems.FRAME_PACK.get(), SNSItems.LUNCHBOX.get());
SNSItems.ORE_SACK.get(), SNSItems.SEED_POUCH.get(),
SNSItems.FRAME_PACK.get()/*TODO add back when content done, SNSItems.LUNCHBOX.get()*/);
tag(SNSItemTags.ALLOWED_IN_SEED_POUCH).addTag(SNSItemTags.TFC_SEEDS);
tag(SNSItemTags.ALLOWED_IN_ORE_SACK).addTag(SNSItemTags.TFC_SMALL_ORE_PIECES).addTag(SNSItemTags.TFC_ORE_PIECES);
tag(SNSItemTags.LUNCHBOX_FOOD).add(TFCItems.FOOD.get(Food.BARLEY_BREAD_SANDWICH).get(),
Expand Down
2 changes: 0 additions & 2 deletions src/generated/resources/assets/sns/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"item.sns.burlap_sack": "Burlap Sack",
"item.sns.frame_pack": "Frame Pack",
"item.sns.leather_sack": "Leather Sack",
"item.sns.lunchbox": "Lunchbox",
"item.sns.mob_net": "Mob Net",
"item.sns.ore_sack": "Ore Sack",
"item.sns.pack_frame": "Pack Frame",
"item.sns.reinforced_fabric": "Reinforced Fabric",
Expand Down

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions src/generated/resources/data/sns/recipes/crafting/lunchbox.json

This file was deleted.

18 changes: 0 additions & 18 deletions src/generated/resources/data/sns/recipes/crafting/mob_net.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"sns:burlap_sack",
"sns:ore_sack",
"sns:seed_pouch",
"sns:frame_pack",
"sns:lunchbox"
"sns:frame_pack"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import mod.traister101.sns.common.capability.ILunchboxHandler.CycleDirection;
import mod.traister101.sns.common.capability.LunchboxCapability;
import mod.traister101.sns.common.items.SNSItems;
import mod.traister101.sns.config.SNSConfig;
import mod.traister101.sns.mixins.client.invoker.AddCustomNbtDataInvoker;
import mod.traister101.sns.network.*;
Expand Down Expand Up @@ -37,7 +36,8 @@ public static void init() {

eventBus.addListener(ClientForgeEventHandler::onKeyPress);
eventBus.addListener(ClientForgeEventHandler::onClickInput);
eventBus.addListener(ClientForgeEventHandler::onMouseScroll);
// TODO add back when content done
// eventBus.addListener(ClientForgeEventHandler::onMouseScroll);
}

public static void onKeyPress(final Key event) {
Expand Down Expand Up @@ -80,8 +80,9 @@ private static void onMouseScroll(final MouseScrollingEvent event) {
if (MC.player == null) return;

final ItemStack mainHandStack = MC.player.getMainHandItem();
// TODO add this back when the content is finished

if (!mainHandStack.is(SNSItems.LUNCHBOX.get())) return;
// if (!mainHandStack.is(SNSItems.LUNCHBOX.get())) return;

if (!MC.player.isShiftKeyDown()) return;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mod.traister101.sns.client;

import mod.traister101.sns.common.capability.LunchboxCapability;
import mod.traister101.sns.common.items.*;
import mod.traister101.sns.common.items.LunchBoxItem;
import mod.traister101.sns.util.SNSUtils;

import net.minecraft.client.Minecraft;
Expand All @@ -26,11 +26,13 @@ public enum SacksNSuchGuiOverlay {
final ItemStack currentItem;
{
final ItemStack mainHandItem = player.getMainHandItem();
if (!mainHandItem.is(SNSItems.LUNCHBOX.get())) {
// TODO add this back when the content is finished
/*if (!mainHandItem.is(SNSItems.LUNCHBOX.get())) {
final ItemStack offhandItem = player.getOffhandItem();
if (!offhandItem.is(SNSItems.LUNCHBOX.get())) return;
currentItem = offhandItem;
} else currentItem = mainHandItem;
} else */
currentItem = mainHandItem;
}

currentItem.getCapability(LunchboxCapability.LUNCHBOX).ifPresent(lunchboxHandler -> {
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/mod/traister101/sns/common/items/SNSItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ public final class SNSItems {
public static final RegistryObject<ContainerItem> SEED_POUCH = registerContainerItem(DefaultContainers.SEED_POUCH);
public static final RegistryObject<ContainerItem> FRAME_PACK = registerContainerItem(DefaultContainers.FRAME_PACK,
new Properties().stacksTo(1).rarity(Rarity.UNCOMMON));
public static final RegistryObject<LunchBoxItem> LUNCHBOX = register("lunchbox",
() -> new LunchBoxItem(new Properties(), DefaultContainers.LUNCHBOX));
// TODO add this back when the content is finished
// public static final RegistryObject<LunchBoxItem> LUNCHBOX = register("lunchbox",
// () -> new LunchBoxItem(new Properties(), DefaultContainers.LUNCHBOX));

public static final RegistryObject<MobNetItem> MOB_NET_ITEM = register("mob_net", () -> new MobNetItem(new Properties()));
// public static final RegistryObject<MobNetItem> MOB_NET_ITEM = register("mob_net", () -> new MobNetItem(new Properties()));

private static RegistryObject<ContainerItem> registerContainerItem(final ContainerType containerType) {
return registerContainerItem(containerType, new Properties().stacksTo(1));
Expand Down

0 comments on commit 1064ed9

Please sign in to comment.