Skip to content

Commit

Permalink
update to sync with 1.19 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Flooflez committed Aug 14, 2023
1 parent 8ab1f54 commit f2820aa
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 36 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.14.22

# Mod Properties
mod_version = 1.20.1-1.0.0
mod_version = 1.20.1-1.0.2
maven_group = net.chexmix.mod
archives_base_name = chexmix-mod

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/net/chexmix/mod/ChexmixMod.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package net.chexmix.mod;

import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Random;

public class ChexmixMod implements ModInitializer {
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/net/chexmix/mod/ItemInit.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ public static void init(){
RegisterFood("wheat_chex", WHEAT_CHEX);

RegisterFood("chexmix", CHEXMIX);

/**
Registry.register(Registries.ITEM, new Identifier(MODID, "circle_pretzel"), CIRCLE_PRETZEL);
Registry.register(Registries.ITEM, new Identifier(MODID, "corn_chex"), CORN_CHEX);
Registry.register(Registries.ITEM, new Identifier(MODID, "breadstick"), BREADSTICK);
Registry.register(Registries.ITEM, new Identifier(MODID, "rye_cracker"), RYE_CRACKER);
Registry.register(Registries.ITEM, new Identifier(MODID, "square_pretzel"), SQUARE_PRETZEL);
Registry.register(Registries.ITEM, new Identifier(MODID, "wheat_chex"), WHEAT_CHEX);
Registry.register(Registries.ITEM, new Identifier(MODID, "chexmix"), CHEXMIX);
**/

}

private static void RegisterFood(String path, Item item){
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/net/chexmix/mod/item/Breadstick.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.minecraft.item.FoodComponent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;

public class Breadstick extends Item {
public Breadstick() {
//super(new Item.Settings().group(ItemGroup.FOOD).food(new FoodComponent.Builder().hunger(3).saturationModifier(0.9f).snack().build()));

super(new FabricItemSettings().food(new FoodComponent.Builder().hunger(3).saturationModifier(0.9f).snack().build()));
}
}
10 changes: 5 additions & 5 deletions src/main/java/net/chexmix/mod/item/Chexmix.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
import net.chexmix.mod.ItemInit;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.FoodComponent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
Expand All @@ -19,9 +17,7 @@

public class Chexmix extends Item {
public Chexmix() {
//super(new Item.Settings().group(ItemGroup.FOOD));

super(new FabricItemSettings().maxCount(1));
super(new FabricItemSettings().maxCount(1).maxDamage(256));
}

@Override
Expand All @@ -38,6 +34,10 @@ public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand han

user.getItemCooldownManager().set(this, 20);

itemStack.damage(1, user, (p) -> {
p.sendToolBreakStatus(user.getActiveHand());
});

return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, itemStack);
}

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/net/chexmix/mod/item/CirclePretzel.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.minecraft.item.FoodComponent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;

public class CirclePretzel extends Item {
public CirclePretzel() {
//super(new Item.Settings().group(ItemGroup.FOOD).food(new FoodComponent.Builder().hunger(2).saturationModifier(0.3f).snack().build()));

super(new FabricItemSettings().food(new FoodComponent.Builder().hunger(2).saturationModifier(0.3f).snack().build()));
}
}
2 changes: 0 additions & 2 deletions src/main/java/net/chexmix/mod/item/CornChex.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.minecraft.item.FoodComponent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;

public class CornChex extends Item {
public CornChex() {
//super(new Item.Settings().group(ItemGroup.FOOD).food(new FoodComponent.Builder().hunger(2).saturationModifier(1.5f).snack().build()));
super(new FabricItemSettings().food(new FoodComponent.Builder().hunger(2).saturationModifier(1.5f).snack().build()));
}
}
2 changes: 0 additions & 2 deletions src/main/java/net/chexmix/mod/item/RyeCracker.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.minecraft.item.FoodComponent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;

public class RyeCracker extends Item {
public RyeCracker() {
//super(new Item.Settings().group(ItemGroup.FOOD).food(new FoodComponent.Builder().hunger(3).saturationModifier(2f).snack().build()));
super(new FabricItemSettings().food(new FoodComponent.Builder().hunger(3).saturationModifier(2f).snack().build()));
}
}
2 changes: 0 additions & 2 deletions src/main/java/net/chexmix/mod/item/SquarePretzel.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.minecraft.item.FoodComponent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;

public class SquarePretzel extends Item {
public SquarePretzel() {
super(new FabricItemSettings().food(new FoodComponent.Builder().hunger(2).saturationModifier(0.6f).snack().build()));

}
}
3 changes: 1 addition & 2 deletions src/main/java/net/chexmix/mod/item/WheatChex.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.minecraft.item.FoodComponent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;


public class WheatChex extends Item {
public WheatChex() {
//super(new Item.Settings().group(ItemGroup.FOOD).food(new FoodComponent.Builder().hunger(2).saturationModifier(1.5f).snack().build()));
super(new FabricItemSettings().food(new FoodComponent.Builder().hunger(2).saturationModifier(1.5f).snack().build()));
}
}
Binary file modified src/main/resources/assets/chexmixmod/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "chexmixmod",
"version": "1.0.0",
"version": "1.0.2",

"name": "Chexmix Mod",
"description": "This mod adds Chexmix to Minecraft",
Expand Down

0 comments on commit f2820aa

Please sign in to comment.