Skip to content

Commit

Permalink
bug fixes galore!
Browse files Browse the repository at this point in the history
  • Loading branch information
Lance5057 committed Oct 3, 2024
1 parent d405719 commit 8d4771c
Show file tree
Hide file tree
Showing 35 changed files with 421 additions and 247 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21 2024-09-29T02:45:08.8914904 Tags for minecraft:item mod id butchercraft
// 1.21 2024-10-03T12:40:29.0084616 Tags for minecraft:item mod id butchercraft
30a75bd3037b0669d289c837537799f29679938f data/butchercraft/tags/item/chicken_carcass.json
ad32ce5cf7c36e45d2d8fa6e09ca02427ef9d21a data/butchercraft/tags/item/cow_carcass.json
66da3e39032bb6edf49b68f597c0d5f9b7cb5166 data/butchercraft/tags/item/gelatin_provider.json
Expand All @@ -9,7 +9,7 @@ ba91febf26e7f478d42fd17fe7cdb3313be8f1c2 data/butchercraft/tags/item/rabbit_carc
0e3627197ab0855eec5ca3eaee114fd6aed5ef68 data/butchercraft/tags/item/sausage_casing.json
08ddda1e7c354e6560543656eaf127f5d0a55af0 data/butchercraft/tags/item/sheep_carcass.json
cd09d0bd2502f17520be606eac462355e2cedb8d data/c/tags/item/slimeballs.json
03707a6b20761eda068121dc7b842aead0bbeebc data/c/tags/item/strings.json
c67f57f80b8d9192f9f4b901ee868ead87fbe3cb data/c/tags/item/strings.json
4d14da7bfe744c1214acbc992e7c84590b6bae0c data/forge/tags/item/beef.json
7c34feb7999db0080e990e60acb78469847f4027 data/forge/tags/item/beef/cooked.json
74979ec88b7a8386f80fe37dd9fe1d275e7f6668 data/forge/tags/item/beef/cubed.json
Expand Down Expand Up @@ -66,6 +66,8 @@ f8c21306d13555a9183e44a2b38e740e2390b46c data/forge/tags/item/chicken/thigh/raw.
e085719176ec93767abf014f4c304cfea279668e data/forge/tags/item/chicken/wing.json
387a597b5fa4b822a93ba60687c0254c1a6e55f8 data/forge/tags/item/chicken/wing/cooked.json
a1b0f316cb8185f0967a2976f9f9251b71c82306 data/forge/tags/item/chicken/wing/raw.json
cd09d0bd2502f17520be606eac462355e2cedb8d data/forge/tags/item/fat.json
91107a7a1edc1c44bc0f55123d9c0fb3cb132104 data/forge/tags/item/gelatin.json
1ad4c8db62378a31c21184f40190b477673673a8 data/forge/tags/item/goat.json
08735afac2cef1f92bb31363ca51cd6482ca531f data/forge/tags/item/goat/cooked.json
8cee75627771a6b98e8515e9d86515fac3d65827 data/forge/tags/item/goat/cubed.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// 1.21 2024-09-29T02:45:08.8984968 Recipes
// 1.21 2024-10-03T12:35:58.8770856 Recipes
009b90db535ceb2eb701ac7cd86c302fc39a939a data/butchercraft/advancement/recipes/building_blocks/barn_wood.json
7cb5335ac1b376a042395aa3747785dd553fd1a5 data/butchercraft/advancement/recipes/building_blocks/barn_wood_door.json
f19c8abd45dff40239f68fe75e34d1cdd278976f data/butchercraft/advancement/recipes/building_blocks/barn_wood_fence.json
26700fc6578b0a9c93a4b825ad60d4e00ed88ff7 data/butchercraft/advancement/recipes/building_blocks/barn_wood_fence_gate.json
3f817b92b73f5450705550e5a42cae1f2c7504ba data/butchercraft/advancement/recipes/building_blocks/barn_wood_slab.json
1d873a8d47944757e92d6dce3788a082db495b49 data/butchercraft/advancement/recipes/building_blocks/barn_wood_stairs.json
35511fbea06158001fba7547eb4529778f3daf7f data/butchercraft/advancement/recipes/building_blocks/barn_wood_trapdoor.json
b0d1dba977d2b347fbeaa361307a6a2f5869671b data/butchercraft/advancement/recipes/building_blocks/fat_candle.json
8163540318252c0856ae8f9552199db15bc8c50b data/butchercraft/advancement/recipes/building_blocks/trimmed_barn_wood.json
d6018078f76a278e7a4419ad0f7764716300e978 data/butchercraft/advancement/recipes/combat/apron.json
a37638afbc10526e1888b8f4508906d86dad5d0a data/butchercraft/advancement/recipes/combat/boots.json
Expand Down Expand Up @@ -305,6 +306,7 @@ a4bb6a85383b33bbd0145a9cc8582bc65c6053a8 data/butchercraft/advancement/recipes/m
415762ace39c94faa03f9579f0e19704176599c2 data/butchercraft/advancement/recipes/meat_hook/white_rabbit_head.json
9b35f16cf1177a02d0749d5477394c8415f770c8 data/butchercraft/advancement/recipes/misc/blood_dye.json
8de5d9875569d77256355a6afda6086e5b3c9dfb data/butchercraft/advancement/recipes/misc/leather_cord.json
387c0571fa998e29d1e419dbc50bf52ca26a3c56 data/butchercraft/advancement/recipes/misc/leather_from_scrap.json
15aa6bbb18b8b3812e7a39b8542ecfc9afca65d9 data/butchercraft/advancement/recipes/tools/blood_bottle.json
c8978bea7386f0eef311af474bf51f837e4206fa data/butchercraft/advancement/recipes/tools/blood_bucket.json
a4df493fbda458ce39c4ad129b592044ff9a282c data/butchercraft/advancement/recipes/tools/bone_saw.json
Expand Down Expand Up @@ -561,6 +563,7 @@ a7162c782ea32af4161c9eee7dfb5c65049e17a9 data/butchercraft/recipe/cooked_tripe_f
b36065a699f13e7605d574532da3f5397b4add7a data/butchercraft/recipe/cow_hide.json
76e1ba708706cba9fc1d826f6def6af454ffd131 data/butchercraft/recipe/cow_hood.json
4dee398bf56e88eeaf5650ea22ef955168a4ead2 data/butchercraft/recipe/extruder_tip.json
cd3991e944b3f78484852f78c55c9f78763e8e4b data/butchercraft/recipe/fat_candle.json
c9f5120de1084b9a4bcb235907811257bae60d56 data/butchercraft/recipe/gloves.json
06efec4bd9f785d5d2456dc41505652079d9e868 data/butchercraft/recipe/goat.json
9b8f7151ee1548bf9b19d987256e8097e613f7f0 data/butchercraft/recipe/goat_block.json
Expand All @@ -586,6 +589,7 @@ faf485517cdfbeed44a28eebfba6e7e5e0916ddd data/butchercraft/recipe/lard_from_camp
fc73cef59cc37178ab9bdef2d24f0ad57cb2620d data/butchercraft/recipe/lard_from_smelting.json
8cf41fc2521b4689b9c8db0c97e970268794d40b data/butchercraft/recipe/lard_from_smoking.json
eb4c752d9a0ab8dfc869e05094aea22890697593 data/butchercraft/recipe/leather_cord.json
1ee249214b4b491ab06755e8c8d5729844f59021 data/butchercraft/recipe/leather_from_scrap.json
28e8018c66cb919cec97be114faa946876a69837 data/butchercraft/recipe/mask.json
bb2f9fbd7b2f19bd3bdce5821fd0cb3acd5b3ea4 data/butchercraft/recipe/meat_hook.json
be0a1e06f922c63cdda4fdaf82e481aa0b6e2588 data/butchercraft/recipe/mutton_cubes.json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_fat": {
"conditions": {
"items": [
{
"items": "butchercraft:fat"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "butchercraft:fat_candle"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_fat"
]
],
"rewards": {
"recipes": [
"butchercraft:fat_candle"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_leather": {
"conditions": {
"items": [
{
"items": "butchercraft:leather_scrap"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "butchercraft:leather_from_scrap"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_leather"
]
],
"rewards": {
"recipes": [
"butchercraft:leather_from_scrap"
]
}
}
20 changes: 20 additions & 0 deletions src/generated/resources/data/butchercraft/recipe/fat_candle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"category": "building",
"key": {
"s": {
"tag": "c:strings"
},
"t": {
"item": "butchercraft:fat"
}
},
"pattern": [
"s",
"t"
],
"result": {
"count": 1,
"id": "minecraft:candle"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "butchercraft:leather_scrap"
},
{
"item": "butchercraft:leather_scrap"
},
{
"item": "butchercraft:leather_scrap"
},
{
"item": "butchercraft:leather_scrap"
},
{
"item": "butchercraft:leather_scrap"
},
{
"item": "butchercraft:leather_scrap"
},
{
"item": "butchercraft:leather_scrap"
},
{
"item": "butchercraft:leather_scrap"
},
{
"item": "butchercraft:leather_scrap"
}
],
"result": {
"count": 1,
"id": "minecraft:leather"
}
}
3 changes: 2 additions & 1 deletion src/generated/resources/data/c/tags/item/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"values": [
"butchercraft:sinew",
"butchercraft:leather_cord",
"butchercraft:sinew"
"butchercraft:sinew",
"butchercraft:leather_cord"
]
}
5 changes: 5 additions & 0 deletions src/generated/resources/data/forge/tags/item/fat.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"butchercraft:fat"
]
}
5 changes: 5 additions & 0 deletions src/generated/resources/data/forge/tags/item/gelatin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"butchercraft:gelatin"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.lance5057.butchercraft.workstations.hook.MeatHookRenderer;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.inventory.MerchantScreen;
import net.minecraft.client.model.SkullModel;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderers;
import net.minecraft.client.renderer.blockentity.SkullBlockRenderer;
Expand All @@ -31,6 +32,7 @@
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.client.event.EntityRenderersEvent;
import net.neoforged.neoforge.client.event.ModelEvent;
import net.neoforged.neoforge.client.event.ScreenEvent;

@EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT, modid = Butchercraft.MOD_ID)
public class ButchercraftClient {
Expand All @@ -57,7 +59,8 @@ public static void RegisterExtraModels(ModelEvent.RegisterAdditional event) {

s = s.substring(s.indexOf('/') + 1, s.indexOf('.'));

ModelResourceLocation rl2 = ModelResourceLocation.standalone(ResourceLocation.fromNamespaceAndPath(rl.getNamespace(), s));
ModelResourceLocation rl2 = ModelResourceLocation
.standalone(ResourceLocation.fromNamespaceAndPath(rl.getNamespace(), s));

event.register(rl2);
});
Expand Down Expand Up @@ -138,5 +141,4 @@ public static void registerSkulls(EntityRenderersEvent.CreateSkullModels event)
ResourceLocation.withDefaultNamespace("textures/entity/rabbit/white.png"));
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class ButchercraftConfig {
.defineInRange("armyHoodChanceMultiplier", 0.1, 0, 1);
Builder.pop();

Builder.comment("Mobs").push(CATEGORY_MOBS);
Builder.comment("Gear").push(CATEGORY_GEAR);
CARCASS_EFFECT_CHANCE = Builder.comment(
"Chance that a carcass applies its bloody effects per inventory tick. (Default 1/1000) Raising this can decrease server lag.")
.defineInRange("armyHoodChanceMultiplier", 1000, 1, Integer.MAX_VALUE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.client.event.ScreenEvent;

@EventBusSubscriber(bus = EventBusSubscriber.Bus.GAME, value = Dist.CLIENT, modid = Butchercraft.MOD_ID)
@EventBusSubscriber(value = Dist.CLIENT, modid = Butchercraft.MOD_ID)
public class ButchercraftForgeClientEvents {
@SubscribeEvent
public static void cancelTrade(ScreenEvent.Opening event) {
Expand All @@ -19,4 +19,5 @@ public static void cancelTrade(ScreenEvent.Opening event) {
}
}
}

}
Original file line number Diff line number Diff line change
@@ -1,17 +1,89 @@
package com.lance5057.butchercraft;

import com.lance5057.butchercraft.armor.models.ApronModel;
import com.lance5057.butchercraft.armor.models.BootsModel;
import com.lance5057.butchercraft.armor.models.BunnyEarsModel;
import com.lance5057.butchercraft.armor.models.BunnyTailModel;
import com.lance5057.butchercraft.armor.models.ChickenMaskModel;
import com.lance5057.butchercraft.armor.models.CowHoodModel;
import com.lance5057.butchercraft.armor.models.GlovesModel;
import com.lance5057.butchercraft.armor.models.GoatHoodModel;
import com.lance5057.butchercraft.armor.models.MaskModel;
import com.lance5057.butchercraft.armor.models.PaperHatModel;
import com.lance5057.butchercraft.armor.models.PigHoodModel;
import com.lance5057.butchercraft.armor.models.SheepHoodModel;
import com.lance5057.butchercraft.client.block_models.ChickenHeadModel;
import com.lance5057.butchercraft.client.block_models.ChickenSkullHeadModel;
import com.lance5057.butchercraft.client.block_models.CowHeadModel;
import com.lance5057.butchercraft.client.block_models.CowSkullHeadModel;
import com.lance5057.butchercraft.client.block_models.GoatHeadModel;
import com.lance5057.butchercraft.client.block_models.GoatSkullHeadModel;
import com.lance5057.butchercraft.client.block_models.PigHeadModel;
import com.lance5057.butchercraft.client.block_models.PigSkullHeadModel;
import com.lance5057.butchercraft.client.block_models.RabbitHeadModel;
import com.lance5057.butchercraft.client.block_models.RabbitSkullHeadModel;
import com.lance5057.butchercraft.client.block_models.SheepHeadModel;
import com.lance5057.butchercraft.client.block_models.SheepSkullHeadModel;

import net.minecraft.client.model.geom.LayerDefinitions;
import net.minecraft.client.model.geom.builders.LayerDefinition;
import net.minecraft.core.component.DataComponents;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.client.event.EntityRenderersEvent;
import net.neoforged.neoforge.client.event.RegisterColorHandlersEvent;

@EventBusSubscriber(modid = Butchercraft.MOD_ID, bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class ButchercraftModClientEvents {
@SubscribeEvent
public static void registerColorHandlers(RegisterColorHandlersEvent.Item event) {
event.register((stack, tintIndex) -> {
return stack.has(DataComponents.DYED_COLOR) ? stack.get(DataComponents.DYED_COLOR).rgb() : 0xFFFFFF;
}, ButchercraftItems.SHEEP_HOOD);
}
@SubscribeEvent
public static void registerColorHandlers(RegisterColorHandlersEvent.Item event) {
event.register((stack, tintIndex) -> {
return stack.has(DataComponents.DYED_COLOR) ? stack.get(DataComponents.DYED_COLOR).rgb() : 0xFFFFFF;
}, ButchercraftItems.SHEEP_HOOD);
}

@SubscribeEvent
public static void registerLayerDefinitions(EntityRenderersEvent.RegisterLayerDefinitions event) {
event.registerLayerDefinition(PaperHatModel.LAYER_LOCATION, () -> LayerDefinition
.create(PaperHatModel.createLayer(LayerDefinitions.INNER_ARMOR_DEFORMATION), 32, 32));
event.registerLayerDefinition(ApronModel.LAYER_LOCATION,
() -> LayerDefinition.create(ApronModel.createLayer(LayerDefinitions.OUTER_ARMOR_DEFORMATION), 32, 32));
event.registerLayerDefinition(GlovesModel.LAYER_LOCATION, () -> LayerDefinition
.create(GlovesModel.createLayer(LayerDefinitions.OUTER_ARMOR_DEFORMATION), 32, 32));
event.registerLayerDefinition(BootsModel.LAYER_LOCATION,
() -> LayerDefinition.create(BootsModel.createLayer(LayerDefinitions.OUTER_ARMOR_DEFORMATION), 32, 32));
event.registerLayerDefinition(MaskModel.LAYER_LOCATION,
() -> LayerDefinition.create(MaskModel.createLayer(LayerDefinitions.OUTER_ARMOR_DEFORMATION), 32, 32));
event.registerLayerDefinition(BunnyEarsModel.LAYER_LOCATION, () -> LayerDefinition
.create(BunnyEarsModel.createLayer(LayerDefinitions.INNER_ARMOR_DEFORMATION), 16, 16));
event.registerLayerDefinition(BunnyTailModel.LAYER_LOCATION, () -> LayerDefinition
.create(BunnyTailModel.createLayer(LayerDefinitions.INNER_ARMOR_DEFORMATION), 16, 16));
event.registerLayerDefinition(PigHoodModel.LAYER_LOCATION, () -> LayerDefinition
.create(PigHoodModel.createLayer(LayerDefinitions.OUTER_ARMOR_DEFORMATION), 64, 64));
event.registerLayerDefinition(GoatHoodModel.LAYER_LOCATION, () -> LayerDefinition
.create(GoatHoodModel.createLayer(LayerDefinitions.OUTER_ARMOR_DEFORMATION), 64, 64));
event.registerLayerDefinition(CowHoodModel.LAYER_LOCATION, () -> LayerDefinition
.create(CowHoodModel.createLayer(LayerDefinitions.OUTER_ARMOR_DEFORMATION), 64, 64));
event.registerLayerDefinition(SheepHoodModel.LAYER_LOCATION, () -> LayerDefinition
.create(SheepHoodModel.createLayer(LayerDefinitions.OUTER_ARMOR_DEFORMATION), 64, 64));
event.registerLayerDefinition(ChickenMaskModel.LAYER_LOCATION, () -> LayerDefinition
.create(ChickenMaskModel.createLayer(LayerDefinitions.OUTER_ARMOR_DEFORMATION), 64, 32));

event.registerLayerDefinition(CowHeadModel.LAYER_LOCATION, () -> CowHeadModel.createBodyLayer());
event.registerLayerDefinition(ChickenHeadModel.LAYER_LOCATION, () -> ChickenHeadModel.createBodyLayer());
event.registerLayerDefinition(SheepHeadModel.LAYER_LOCATION, () -> SheepHeadModel.createBodyLayer());
event.registerLayerDefinition(PigHeadModel.LAYER_LOCATION, () -> PigHeadModel.createBodyLayer());
event.registerLayerDefinition(GoatHeadModel.LAYER_LOCATION, () -> GoatHeadModel.createBodyLayer());
event.registerLayerDefinition(RabbitHeadModel.LAYER_LOCATION, () -> RabbitHeadModel.createBodyLayer());

event.registerLayerDefinition(CowSkullHeadModel.LAYER_LOCATION, () -> CowSkullHeadModel.createBodyLayer());
event.registerLayerDefinition(SheepSkullHeadModel.LAYER_LOCATION, () -> SheepSkullHeadModel.createBodyLayer());
event.registerLayerDefinition(PigSkullHeadModel.LAYER_LOCATION, () -> PigSkullHeadModel.createBodyLayer());
event.registerLayerDefinition(ChickenSkullHeadModel.LAYER_LOCATION,
() -> ChickenSkullHeadModel.createBodyLayer());
event.registerLayerDefinition(GoatSkullHeadModel.LAYER_LOCATION, () -> GoatSkullHeadModel.createBodyLayer());
event.registerLayerDefinition(RabbitSkullHeadModel.LAYER_LOCATION,
() -> RabbitSkullHeadModel.createBodyLayer());
}
}
Loading

0 comments on commit 8d4771c

Please sign in to comment.