Skip to content

Commit

Permalink
Update to Mc1.19.3
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Dec 31, 2022
1 parent e683eda commit 9f5d1ae
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.19
yarn_mappings=1.19+build.4
loader_version=0.14.5
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.5
loader_version=0.14.11
# Mod Properties
mod_version=0.2.0
maven_group=hibi
archives_base_name=blahaj
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.58.0+1.19
fabric_version=0.68.0+1.19.3
25 changes: 15 additions & 10 deletions src/main/java/hibi/blahaj/Blahaj.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package hibi.blahaj;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.fabricmc.fabric.api.loot.v2.LootTableEvents;
import net.fabricmc.fabric.api.object.builder.v1.trade.TradeOfferHelper;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.item.*;
import net.minecraft.loot.LootPool;
import net.minecraft.loot.LootTables;
import net.minecraft.loot.entry.ItemEntry;
import net.minecraft.registry.Registry;
import net.minecraft.registry.Registries;
import net.minecraft.util.Identifier;
import net.minecraft.util.Rarity;
import net.minecraft.util.registry.Registry;
import net.minecraft.village.TradeOffer;
import net.minecraft.village.VillagerProfession;

Expand All @@ -33,15 +32,21 @@ public class Blahaj implements ModInitializer {

@Override
public void onInitialize() {
Item.Settings settings = new Item.Settings().maxCount(1).group(ItemGroup.MISC).rarity(Rarity.RARE);
Item.Settings settings = new Item.Settings().maxCount(1).rarity(Rarity.RARE);

Item grayShark = new CuddlyItem(settings, String.format(TOOLTIP_PRE, KLAPPAR_HAJ_ID.getPath()));
Item grayShark = new CuddlyItem(settings, String.format(TOOLTIP_PRE, KLAPPAR_HAJ_ID));
Item blueShark = new CuddlyItem(settings, String.format(TOOLTIP_PRE, BLAHAJ_ID));
Item bread = new CuddlyItem(settings, null);

Registry.register(Registry.ITEM, KLAPPAR_HAJ_ID, grayShark);
Registry.register(Registry.ITEM, BLAHAJ_ID, blueShark);
Registry.register(Registry.ITEM, BREAD_ID, bread);
Registry.register(Registries.ITEM, KLAPPAR_HAJ_ID, grayShark);
Registry.register(Registries.ITEM, BLAHAJ_ID, blueShark);
Registry.register(Registries.ITEM, BREAD_ID, bread);

ItemGroupEvents.modifyEntriesEvent(ItemGroups.TOOLS).register(c -> {
c.add(blueShark);
c.add(grayShark);
c.add(bread);
});

LootTableEvents.MODIFY.register((resourceManager, lootManager, identifier, builder, lootTableSource) -> {
if (!lootTableSource.isBuiltin()) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"depends": {
"fabricloader": ">=0.14.11",
"fabric": "*",
"minecraft": ">=1.19 <1.19.3"
"minecraft": ">=1.19.3"
}
}

0 comments on commit 9f5d1ae

Please sign in to comment.