Skip to content

Commit

Permalink
updated the mod to 1.19.4
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeCraftPlugin committed May 28, 2023
1 parent 6f4a03a commit 1e4b3df
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 34 deletions.
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.28
loader_version=0.14.12
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.2
loader_version=0.14.21
# Mod Properties
mod_version=1.19.2-1.3.0
mod_version=1.19.4-1.0.0
maven_group=me.codecraft
archives_base_name=eatmobmod
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.70.0+1.19.2
registery_lib_version = 1.19.2-1.0.1
modmenu_version = 4.1.2
fabric_version=0.82.0+1.19.4
registery_lib_version = 1.19.4-1.1.0
modmenu_version = 6.2.2
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 3 additions & 4 deletions src/main/java/me/codecraft/eatmobmod/items/GroupItem.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package me.codecraft.eatmobmod.items;

import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
import io.github.codecraftplugin.registrylib.utils.Registry;
import me.codecraft.eatmobmod.EatMobMod;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;

public class GroupItem {
public static final ItemGroup EATMOB = FabricItemGroupBuilder.build(new Identifier("eatmobmod", "eatmob"), () -> new ItemStack(Items.EDIBLE_COW));
public static final ItemGroup EATMOB = Registry.registerItemGroup("eatmob", EatMobMod.MOD_ID,Items.EDIBLE_COW);
}
32 changes: 16 additions & 16 deletions src/main/java/me/codecraft/eatmobmod/items/Items.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
import net.minecraft.item.Item;

public class Items {
public static final Item EDIBLE_COW = Registry.registerItems("edible_cow", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB).food(FoodBulder.EDIBLE)));
public static final Item EDIBLE_PIG = Registry.registerItems("edible_pig", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB).food(FoodBulder.EDIBLE)));
public static final Item EDIBLE_DRAGON = Registry.registerItems("edible_dragon", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB).food(FoodBulder.EDIBLE)));
public static final Item EDIBLE_CREEPER = Registry.registerItems("edible_creeper", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB).food(FoodBulder.EDIBLE)));
public static final Item EDIBLE_SPIDER = Registry.registerItems("edible_spider", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB).food(FoodBulder.EDIBLE)));
public static final Item EDIBLE_CHICKEN = Registry.registerItems("edible_chicken", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB).food(FoodBulder.EDIBLE)));
public static final Item EDIBLE_GOLEM = Registry.registerItems("edible_golem", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB).food(FoodBulder.EDIBLE)));
public static final Item EDIBLE_BLAZE = Registry.registerItems("edible_blaze", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB).food(FoodBulder.EDIBLE)));
public static final Item EDIBLE_COW = Registry.registerItems("edible_cow", EatMobMod.MOD_ID, new Item(new FabricItemSettings().food(FoodBulder.EDIBLE)),GroupItem.EATMOB);
public static final Item EDIBLE_PIG = Registry.registerItems("edible_pig", EatMobMod.MOD_ID, new Item(new FabricItemSettings().food(FoodBulder.EDIBLE)),GroupItem.EATMOB);
public static final Item EDIBLE_DRAGON = Registry.registerItems("edible_dragon", EatMobMod.MOD_ID, new Item(new FabricItemSettings().food(FoodBulder.EDIBLE)),GroupItem.EATMOB);
public static final Item EDIBLE_CREEPER = Registry.registerItems("edible_creeper", EatMobMod.MOD_ID, new Item(new FabricItemSettings().food(FoodBulder.EDIBLE)),GroupItem.EATMOB);
public static final Item EDIBLE_SPIDER = Registry.registerItems("edible_spider", EatMobMod.MOD_ID, new Item(new FabricItemSettings().food(FoodBulder.EDIBLE)),GroupItem.EATMOB);
public static final Item EDIBLE_CHICKEN = Registry.registerItems("edible_chicken", EatMobMod.MOD_ID, new Item(new FabricItemSettings().food(FoodBulder.EDIBLE)),GroupItem.EATMOB);
public static final Item EDIBLE_GOLEM = Registry.registerItems("edible_golem", EatMobMod.MOD_ID, new Item(new FabricItemSettings().food(FoodBulder.EDIBLE)),GroupItem.EATMOB);
public static final Item EDIBLE_BLAZE = Registry.registerItems("edible_blaze", EatMobMod.MOD_ID, new Item(new FabricItemSettings().food(FoodBulder.EDIBLE)),GroupItem.EATMOB);

public static final Item INEDIBLE_PIG = Registry.registerItems("inedible_pig", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB)));
public static final Item INEDIBLE_COW = Registry.registerItems("inedible_cow", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB)));
public static final Item INEDIBLE_DRAGON = Registry.registerItems("inedible_dragon", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB)));
public static final Item INEDIBLE_CREEPER = Registry.registerItems("inedible_creeper", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB)));
public static final Item INEDIBLE_SPIDER = Registry.registerItems("inedible_spider", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB)));
public static final Item INEDIBLE_CHICKEN = Registry.registerItems("inedible_chicken", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB)));
public static final Item INEDIBLE_GOLEM = Registry.registerItems("inedible_golem", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB)));
public static final Item INEDIBLE_BLAZE = Registry.registerItems("inedible_blaze", EatMobMod.MOD_ID, new Item(new FabricItemSettings().group(GroupItem.EATMOB)));
public static final Item INEDIBLE_PIG = Registry.registerItems("inedible_pig", EatMobMod.MOD_ID, new Item(new FabricItemSettings()),GroupItem.EATMOB);
public static final Item INEDIBLE_COW = Registry.registerItems("inedible_cow", EatMobMod.MOD_ID, new Item(new FabricItemSettings()),GroupItem.EATMOB);
public static final Item INEDIBLE_DRAGON = Registry.registerItems("inedible_dragon", EatMobMod.MOD_ID, new Item(new FabricItemSettings()),GroupItem.EATMOB);
public static final Item INEDIBLE_CREEPER = Registry.registerItems("inedible_creeper", EatMobMod.MOD_ID, new Item(new FabricItemSettings()),GroupItem.EATMOB);
public static final Item INEDIBLE_SPIDER = Registry.registerItems("inedible_spider", EatMobMod.MOD_ID, new Item(new FabricItemSettings()),GroupItem.EATMOB);
public static final Item INEDIBLE_CHICKEN = Registry.registerItems("inedible_chicken", EatMobMod.MOD_ID, new Item(new FabricItemSettings()),GroupItem.EATMOB);
public static final Item INEDIBLE_GOLEM = Registry.registerItems("inedible_golem", EatMobMod.MOD_ID, new Item(new FabricItemSettings()),GroupItem.EATMOB);
public static final Item INEDIBLE_BLAZE = Registry.registerItems("inedible_blaze", EatMobMod.MOD_ID, new Item(new FabricItemSettings()),GroupItem.EATMOB);

public static void init() {

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/me/codecraft/eatmobmod/mixin/PlayerEatMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private void tick(CallbackInfo ci) {
double x = playerEntity.getX() + playerDirection.x;
double y = playerEntity.getY() + playerDirection.y;
double z = playerEntity.getZ() + playerDirection.z;
playerEntity.world.createExplosion(playerEntity, x, y, z, 3, false, Explosion.DestructionType.NONE);
playerEntity.world.createExplosion(playerEntity, x, y, z, 3, false, World.ExplosionSourceType.TNT);
return TypedActionResult.success(playerEntity.getMainHandStack());
});
}
Expand All @@ -114,10 +114,10 @@ private void tick(CallbackInfo ci) {

if (player.isSneaking()&&spider) {
// Get the block the player is standing on
BlockPos blockPosx = new BlockPos(player.getX()-1, player.getY(), player.getZ());
BlockPos blockPosz = new BlockPos(player.getX(), player.getY(), player.getZ()-1);
BlockPos blockPosx2 = new BlockPos(player.getX()+1, player.getY(), player.getZ());
BlockPos blockPosz2 = new BlockPos(player.getX(), player.getY(), player.getZ()+1);
BlockPos blockPosx = new BlockPos((int) player.getX()-1, (int)player.getY(), (int)player.getZ());
BlockPos blockPosz = new BlockPos((int)player.getX(), (int)player.getY(), (int)player.getZ()-1);
BlockPos blockPosx2 = new BlockPos((int)player.getX()+1, (int)player.getY(), (int)player.getZ());
BlockPos blockPosz2 = new BlockPos((int)player.getX(), (int)player.getY(), (int)player.getZ()+1);
BlockState blockStatex = player.world.getBlockState(blockPosx);
BlockState blockStatez = player.world.getBlockState(blockPosz);
BlockState blockStatex1 = player.world.getBlockState(blockPosx2);
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 @@ -26,7 +26,7 @@
"depends": {
"fabricloader": ">=0.14.9",
"fabric": "*",
"minecraft": "1.19.2",
"minecraft": "1.19.4",
"registrylib": ">=1.0.0"
}
}

0 comments on commit 1e4b3df

Please sign in to comment.