diff --git a/gradle.properties b/gradle.properties index bd442b3..4b494cc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.21.1+build.3 loader_version=0.16.10 # Mod Properties -mod_version=0.6.0 +mod_version=1.0.0 maven_group=xyz.ibatv.nethercraft archives_base_name=nethercraft-classic diff --git a/src/main/generated/assets/nethercraft-classic/models/item/glow_apple.json b/src/main/generated/assets/nethercraft-classic/models/item/glow_apple.json new file mode 100644 index 0000000..5080dc8 --- /dev/null +++ b/src/main/generated/assets/nethercraft-classic/models/item/glow_apple.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "nethercraft-classic:item/glow_apple" + } +} \ No newline at end of file diff --git a/src/main/generated/data/nethercraft-classic/advancement/recipes/food/glow_apple.json b/src/main/generated/data/nethercraft-classic/advancement/recipes/food/glow_apple.json new file mode 100644 index 0000000..64035f7 --- /dev/null +++ b/src/main/generated/data/nethercraft-classic/advancement/recipes/food/glow_apple.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_apple": { + "conditions": { + "items": [ + { + "items": "minecraft:apple" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_foulite_dust": { + "conditions": { + "items": [ + { + "items": "nethercraft-classic:foulite_dust" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "nethercraft-classic:glow_apple" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_foulite_dust", + "has_apple" + ] + ], + "rewards": { + "recipes": [ + "nethercraft-classic:glow_apple" + ] + } +} \ No newline at end of file diff --git a/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/dark_wheat_seeds.json b/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/dark_wheat_seeds.json new file mode 100644 index 0000000..8175623 --- /dev/null +++ b/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/dark_wheat_seeds.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_foulite_dust": { + "conditions": { + "items": [ + { + "items": "nethercraft-classic:foulite_dust" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "nethercraft-classic:dark_wheat_seeds" + }, + "trigger": "minecraft:recipe_unlocked" + }, + "has_wheat_seeds": { + "conditions": { + "items": [ + { + "items": "minecraft:wheat_seeds" + } + ] + }, + "trigger": "minecraft:inventory_changed" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_foulite_dust", + "has_wheat_seeds" + ] + ], + "rewards": { + "recipes": [ + "nethercraft-classic:dark_wheat_seeds" + ] + } +} \ No newline at end of file diff --git a/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/imp_skin.json b/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/imp_skin.json new file mode 100644 index 0000000..782ac6f --- /dev/null +++ b/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/imp_skin.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_foulite_dust": { + "conditions": { + "items": [ + { + "items": "nethercraft-classic:foulite_dust" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_leather": { + "conditions": { + "items": [ + { + "items": "minecraft:leather" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "nethercraft-classic:imp_skin" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_foulite_dust", + "has_leather" + ] + ], + "rewards": { + "recipes": [ + "nethercraft-classic:imp_skin" + ] + } +} \ No newline at end of file diff --git a/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/glowood_stairs.json b/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/stairs_left.json similarity index 84% rename from src/main/generated/data/nethercraft-classic/advancement/recipes/misc/glowood_stairs.json rename to src/main/generated/data/nethercraft-classic/advancement/recipes/misc/stairs_left.json index 4141017..3e4c155 100644 --- a/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/glowood_stairs.json +++ b/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/stairs_left.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "nethercraft-classic:glowood_stairs" + "recipe": "nethercraft-classic:stairs_left" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "nethercraft-classic:glowood_stairs" + "nethercraft-classic:stairs_left" ] } } \ No newline at end of file diff --git a/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/stairs_right.json b/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/stairs_right.json new file mode 100644 index 0000000..850ee01 --- /dev/null +++ b/src/main/generated/data/nethercraft-classic/advancement/recipes/misc/stairs_right.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_glowood_planks": { + "conditions": { + "items": [ + { + "items": "nethercraft-classic:glowood_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "nethercraft-classic:stairs_right" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_glowood_planks" + ] + ], + "rewards": { + "recipes": [ + "nethercraft-classic:stairs_right" + ] + } +} \ No newline at end of file diff --git a/src/main/generated/data/nethercraft-classic/loot_table/blocks/nether_dirt_farmland.json b/src/main/generated/data/nethercraft-classic/loot_table/blocks/nether_dirt_farmland.json new file mode 100644 index 0000000..78c730c --- /dev/null +++ b/src/main/generated/data/nethercraft-classic/loot_table/blocks/nether_dirt_farmland.json @@ -0,0 +1,60 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + } + ], + "name": "nethercraft-classic:nether_dirt_farmland" + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 1.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + }, + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:ore_drops", + "function": "minecraft:apply_bonus" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "nethercraft-classic:nether_dirt" + } + ] + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/main/generated/data/nethercraft-classic/recipe/dark_wheat_seeds.json b/src/main/generated/data/nethercraft-classic/recipe/dark_wheat_seeds.json new file mode 100644 index 0000000..03f115d --- /dev/null +++ b/src/main/generated/data/nethercraft-classic/recipe/dark_wheat_seeds.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "nethercraft-classic:foulite_dust" + }, + { + "item": "minecraft:wheat_seeds" + } + ], + "result": { + "count": 1, + "id": "nethercraft-classic:dark_wheat_seeds" + } +} \ No newline at end of file diff --git a/src/main/generated/data/nethercraft-classic/recipe/glow_apple.json b/src/main/generated/data/nethercraft-classic/recipe/glow_apple.json new file mode 100644 index 0000000..89319a3 --- /dev/null +++ b/src/main/generated/data/nethercraft-classic/recipe/glow_apple.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "A": { + "item": "minecraft:apple" + }, + "f": { + "item": "nethercraft-classic:foulite_dust" + } + }, + "pattern": [ + "fff", + "fAf", + "fff" + ], + "result": { + "count": 1, + "id": "nethercraft-classic:glow_apple" + } +} \ No newline at end of file diff --git a/src/main/generated/data/nethercraft-classic/recipe/imp_skin.json b/src/main/generated/data/nethercraft-classic/recipe/imp_skin.json new file mode 100644 index 0000000..c8b3e47 --- /dev/null +++ b/src/main/generated/data/nethercraft-classic/recipe/imp_skin.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "nethercraft-classic:foulite_dust" + }, + { + "item": "minecraft:leather" + } + ], + "result": { + "count": 1, + "id": "nethercraft-classic:imp_skin" + } +} \ No newline at end of file diff --git a/src/main/generated/data/nethercraft-classic/recipe/lava_paper.json b/src/main/generated/data/nethercraft-classic/recipe/lava_paper.json index ec586cf..f46a40a 100644 --- a/src/main/generated/data/nethercraft-classic/recipe/lava_paper.json +++ b/src/main/generated/data/nethercraft-classic/recipe/lava_paper.json @@ -10,7 +10,7 @@ "lll" ], "result": { - "count": 1, + "count": 3, "id": "nethercraft-classic:lava_paper" } } \ No newline at end of file diff --git a/src/main/generated/data/nethercraft-classic/recipe/glowood_stairs.json b/src/main/generated/data/nethercraft-classic/recipe/stairs_left.json similarity index 100% rename from src/main/generated/data/nethercraft-classic/recipe/glowood_stairs.json rename to src/main/generated/data/nethercraft-classic/recipe/stairs_left.json diff --git a/src/main/generated/data/nethercraft-classic/recipe/stairs_right.json b/src/main/generated/data/nethercraft-classic/recipe/stairs_right.json new file mode 100644 index 0000000..d9b35ab --- /dev/null +++ b/src/main/generated/data/nethercraft-classic/recipe/stairs_right.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "W": { + "item": "nethercraft-classic:glowood_planks" + } + }, + "pattern": [ + " W", + " WW", + "WWW" + ], + "result": { + "count": 4, + "id": "nethercraft-classic:glowood_stairs" + } +} \ No newline at end of file diff --git a/src/main/java/xyz/ibatv/nethercraft/NethercraftClassic.java b/src/main/java/xyz/ibatv/nethercraft/NethercraftClassic.java index b2ea060..34888d3 100644 --- a/src/main/java/xyz/ibatv/nethercraft/NethercraftClassic.java +++ b/src/main/java/xyz/ibatv/nethercraft/NethercraftClassic.java @@ -2,8 +2,12 @@ package xyz.ibatv.nethercraft; import net.fabricmc.api.ModInitializer; +import net.minecraft.entity.SpawnLocationTypes; +import net.minecraft.entity.SpawnRestriction; +import net.minecraft.entity.mob.HostileEntity; import net.minecraft.item.Item; import net.minecraft.util.Identifier; +import net.minecraft.world.Heightmap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import xyz.ibatv.nethercraft.block.ModBlocks; @@ -19,6 +23,7 @@ import net.minecraft.registry.BuiltinRegistries; import net.minecraft.registry.RegistryKey; + public class NethercraftClassic implements ModInitializer { public static final String MOD_ID = "nethercraft-classic"; public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); diff --git a/src/main/java/xyz/ibatv/nethercraft/NethercraftClassicClient.java b/src/main/java/xyz/ibatv/nethercraft/NethercraftClassicClient.java index a6746fb..67c6b86 100644 --- a/src/main/java/xyz/ibatv/nethercraft/NethercraftClassicClient.java +++ b/src/main/java/xyz/ibatv/nethercraft/NethercraftClassicClient.java @@ -1,12 +1,17 @@ package xyz.ibatv.nethercraft; + import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; import net.minecraft.client.render.RenderLayer; +import net.minecraft.client.render.entity.model.EntityModelLayer; +import net.minecraft.util.Identifier; import xyz.ibatv.nethercraft.block.ModBlocks; public class NethercraftClassicClient implements ClientModInitializer { + public static final EntityModelLayer MODEL_DARK_ZOMBIE_LAYER = new EntityModelLayer(Identifier.of(NethercraftClassic.MOD_ID, "dark_zombie"), "main"); + @Override public void onInitializeClient() { BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.GLOWOOD_SAPLING, RenderLayer.getCutout()); diff --git a/src/main/java/xyz/ibatv/nethercraft/block/ModBlocks.java b/src/main/java/xyz/ibatv/nethercraft/block/ModBlocks.java index b2c92ef..26374d0 100644 --- a/src/main/java/xyz/ibatv/nethercraft/block/ModBlocks.java +++ b/src/main/java/xyz/ibatv/nethercraft/block/ModBlocks.java @@ -13,6 +13,7 @@ import net.minecraft.util.Identifier; import net.minecraft.util.math.intprovider.UniformIntProvider; import xyz.ibatv.nethercraft.NethercraftClassic; import xyz.ibatv.nethercraft.block.custom.DarkWheatCropBlock; +import xyz.ibatv.nethercraft.block.custom.LavaReedsBlock; import xyz.ibatv.nethercraft.block.custom.ModFarmBlock; import xyz.ibatv.nethercraft.block.custom.ModSaplingBlock; import xyz.ibatv.nethercraft.world.tree.ModSaplingGenerators; @@ -111,8 +112,14 @@ public class ModBlocks { new FlowerBlock(StatusEffects.GLOWING, 10, AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().noCollision().breakInstantly().pistonBehavior(PistonBehavior.DESTROY))); + //public static final Block LAVA_REEDS = registerBlock("lava_reeds", + // new SugarCaneBlock(AbstractBlock.Settings.copy(Blocks.SUGAR_CANE).noCollision().nonOpaque() + // .ticksRandomly().breakInstantly().pistonBehavior(PistonBehavior.DESTROY))); + + + public static final Block LAVA_REEDS = registerBlock("lava_reeds", - new SugarCaneBlock(AbstractBlock.Settings.copy(Blocks.SUGAR_CANE).noCollision().nonOpaque() + new LavaReedsBlock(AbstractBlock.Settings.copy(Blocks.SUGAR_CANE).noCollision().nonOpaque() .ticksRandomly().breakInstantly().pistonBehavior(PistonBehavior.DESTROY))); diff --git a/src/main/java/xyz/ibatv/nethercraft/block/custom/DarkWheatCropBlock.java b/src/main/java/xyz/ibatv/nethercraft/block/custom/DarkWheatCropBlock.java index dd09c0a..098a249 100644 --- a/src/main/java/xyz/ibatv/nethercraft/block/custom/DarkWheatCropBlock.java +++ b/src/main/java/xyz/ibatv/nethercraft/block/custom/DarkWheatCropBlock.java @@ -2,10 +2,14 @@ package xyz.ibatv.nethercraft.block.custom; import net.minecraft.block.Block; import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; import net.minecraft.block.CropBlock; import net.minecraft.item.ItemConvertible; import net.minecraft.state.StateManager; import net.minecraft.state.property.IntProperty; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.BlockView; +import xyz.ibatv.nethercraft.block.ModBlocks; import xyz.ibatv.nethercraft.item.ModItems; public class DarkWheatCropBlock extends CropBlock { @@ -16,6 +20,11 @@ public class DarkWheatCropBlock extends CropBlock { super(settings); } + @Override + protected boolean canPlantOnTop(BlockState floor, BlockView world, BlockPos pos) { + return floor.isOf(Blocks.FARMLAND) || floor.isOf(ModBlocks.NETHER_DIRT_FARMLAND); + } + @Override protected ItemConvertible getSeedsItem() { return ModItems.DARK_WHEAT_SEEDS; diff --git a/src/main/java/xyz/ibatv/nethercraft/block/custom/LavaReedsBlock.java b/src/main/java/xyz/ibatv/nethercraft/block/custom/LavaReedsBlock.java new file mode 100644 index 0000000..70c3617 --- /dev/null +++ b/src/main/java/xyz/ibatv/nethercraft/block/custom/LavaReedsBlock.java @@ -0,0 +1,39 @@ +package xyz.ibatv.nethercraft.block.custom; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.SugarCaneBlock; +import net.minecraft.fluid.Fluid; +import net.minecraft.fluid.FluidState; +import net.minecraft.registry.tag.BlockTags; +import net.minecraft.registry.tag.FluidTags; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.WorldView; + +public class LavaReedsBlock extends SugarCaneBlock { + public LavaReedsBlock(Settings settings) { + super(settings); + } + + @Override + protected boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { + BlockState blockState = world.getBlockState(pos.down()); + if (blockState.isOf(this)) { + return true; + } else { + if (blockState.isIn(BlockTags.DIRT) || blockState.isIn(BlockTags.SAND)) { + BlockPos blockPos = pos.down(); + + for(Direction direction : Direction.Type.HORIZONTAL) { + FluidState fluidState = world.getFluidState(blockPos.offset(direction)); + if (fluidState.isIn(FluidTags.LAVA)) { + return true; + } + } + } + + return false; + } + } +} diff --git a/src/main/java/xyz/ibatv/nethercraft/block/custom/ModFarmBlock.java b/src/main/java/xyz/ibatv/nethercraft/block/custom/ModFarmBlock.java index 01dfe1f..b204e55 100644 --- a/src/main/java/xyz/ibatv/nethercraft/block/custom/ModFarmBlock.java +++ b/src/main/java/xyz/ibatv/nethercraft/block/custom/ModFarmBlock.java @@ -61,6 +61,7 @@ public class ModFarmBlock extends Block { //FarmlandBlock return !blockState.isSolid() || blockState.getBlock() instanceof FenceGateBlock || blockState.getBlock() instanceof PistonExtensionBlock; } + @Override public BlockState getPlacementState(ItemPlacementContext ctx) { return !this.getDefaultState().canPlaceAt(ctx.getWorld(), ctx.getBlockPos()) ? ModBlocks.NETHER_DIRT.getDefaultState() : super.getPlacementState(ctx); } @@ -75,7 +76,7 @@ public class ModFarmBlock extends Block { //FarmlandBlock protected void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { if (!state.canPlaceAt(world, pos)) { - setToDirt((Entity)null, state, world, pos); + setToNetherDirt((Entity)null, state, world, pos); } } @@ -86,7 +87,7 @@ public class ModFarmBlock extends Block { //FarmlandBlock if (i > 0) { world.setBlockState(pos, (BlockState)state.with(MOISTURE, i - 1), 2); } else if (!hasCrop(world, pos)) { - setToDirt((Entity)null, state, world, pos); + setToNetherDirt((Entity)null, state, world, pos); } } else if (i < 7) { world.setBlockState(pos, (BlockState)state.with(MOISTURE, 7), 2); @@ -94,20 +95,24 @@ public class ModFarmBlock extends Block { //FarmlandBlock } + @Override public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { if (!world.isClient && world.random.nextFloat() < fallDistance - 0.5F && entity instanceof LivingEntity && (entity instanceof PlayerEntity || world.getGameRules().getBoolean(GameRules.DO_MOB_GRIEFING)) && entity.getWidth() * entity.getWidth() * entity.getHeight() > 0.512F) { - setToDirt(entity, ModBlocks.NETHER_DIRT.getDefaultState(), world, pos); + setToNetherDirt(entity, ModBlocks.NETHER_DIRT.getDefaultState(), world, pos); } super.onLandedUpon(world, ModBlocks.NETHER_DIRT.getDefaultState(), pos, entity, fallDistance); } - public static void setToDirt(@Nullable Entity entity, BlockState state, World world, BlockPos pos) { - BlockState blockState = pushEntitiesUpBeforeBlockChange(state, ModBlocks.NETHER_DIRT.getDefaultState(), world, pos); + + public static void setToNetherDirt(@Nullable Entity entity, BlockState state, World world, BlockPos pos) { + BlockState blockState = pushEntitiesUpBeforeBlockChange(ModBlocks.NETHER_DIRT.getDefaultState(), ModBlocks.NETHER_DIRT.getDefaultState(), world, pos); world.setBlockState(pos, blockState); - world.emitGameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Emitter.of(entity, blockState)); + world.emitGameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Emitter.of(entity, ModBlocks.NETHER_DIRT.getDefaultState())); } + + private static boolean hasCrop(BlockView world, BlockPos pos) { return world.getBlockState(pos.up()).isIn(BlockTags.MAINTAINS_FARMLAND); } diff --git a/src/main/java/xyz/ibatv/nethercraft/block/custom/testfarm.java b/src/main/java/xyz/ibatv/nethercraft/block/custom/testfarm.java new file mode 100644 index 0000000..4219d4e --- /dev/null +++ b/src/main/java/xyz/ibatv/nethercraft/block/custom/testfarm.java @@ -0,0 +1,18 @@ +package xyz.ibatv.nethercraft.block.custom; + +import net.minecraft.block.BlockState; +import net.minecraft.block.FarmlandBlock; +import net.minecraft.entity.Entity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class testfarm extends FarmlandBlock { + public testfarm(Settings settings) { + super(settings); + } + + @Override + public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { + super.onLandedUpon(world, state, pos, entity, fallDistance); + } +} diff --git a/src/main/java/xyz/ibatv/nethercraft/datagen/ModLootTableProvider.java b/src/main/java/xyz/ibatv/nethercraft/datagen/ModLootTableProvider.java index 1da2489..85f6d43 100644 --- a/src/main/java/xyz/ibatv/nethercraft/datagen/ModLootTableProvider.java +++ b/src/main/java/xyz/ibatv/nethercraft/datagen/ModLootTableProvider.java @@ -41,6 +41,7 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider { addDrop(ModBlocks.GLOWOOD_DOOR, doorDrops(ModBlocks.GLOWOOD_DOOR)); addDrop(ModBlocks.GLOWOOD_LADDER); addDrop(ModBlocks.NETHER_DIRT); + addDrop(ModBlocks.NETHER_DIRT_FARMLAND, multipleOreDrops(ModBlocks.NETHER_DIRT_FARMLAND, Item.fromBlock(ModBlocks.NETHER_DIRT), 1, 1)); addDrop(ModBlocks.GLOWOOD_LEAVES, leavesDrops(ModBlocks.GLOWOOD_LEAVES, ModBlocks.GLOWOOD_SAPLING, 0.0625f)); diff --git a/src/main/java/xyz/ibatv/nethercraft/datagen/ModModelProvider.java b/src/main/java/xyz/ibatv/nethercraft/datagen/ModModelProvider.java index bb0a8cd..df9000c 100644 --- a/src/main/java/xyz/ibatv/nethercraft/datagen/ModModelProvider.java +++ b/src/main/java/xyz/ibatv/nethercraft/datagen/ModModelProvider.java @@ -73,6 +73,7 @@ public class ModModelProvider extends FabricModelProvider { itemModelGenerator.register(ModItems.NETHERSTICK, Models.GENERATED); itemModelGenerator.register(ModItems.DARK_WHEAT, Models.GENERATED); itemModelGenerator.register(ModItems.DEVILBREAD, Models.GENERATED); + itemModelGenerator.register(ModItems.GLOW_APPLE, Models.GENERATED); itemModelGenerator.register(ModItems.GLOWSTEW, Models.GENERATED); itemModelGenerator.register(ModItems.FOULITE_DUST, Models.GENERATED); itemModelGenerator.register(ModItems.W_DUST, Models.GENERATED); diff --git a/src/main/java/xyz/ibatv/nethercraft/datagen/ModRecipeProvider.java b/src/main/java/xyz/ibatv/nethercraft/datagen/ModRecipeProvider.java index 9c0e1a2..ca0bd75 100644 --- a/src/main/java/xyz/ibatv/nethercraft/datagen/ModRecipeProvider.java +++ b/src/main/java/xyz/ibatv/nethercraft/datagen/ModRecipeProvider.java @@ -26,9 +26,6 @@ public class ModRecipeProvider extends FabricRecipeProvider { @Override public void generate(RecipeExporter recipeExporter) { - /*offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.PROSPERITY_SHARD, RecipeCategory.BUILDING_BLOCKS, ModBlocks.PROSPERITY_GEMSTONE_BLOCK); - offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.PROSPERITY_INGOT, RecipeCategory.BUILDING_BLOCKS, ModBlocks.PROSPERITY_INGOT_BLOCK); - */ ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.NERIDIUM_LIGHTER) .input(ModItems.NERIDIUM_INGOT) @@ -65,12 +62,18 @@ public class ModRecipeProvider extends FabricRecipeProvider { - ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.LAVA_PAPER) + ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.LAVA_PAPER, 3) .pattern("lll") .input('l', ModBlocks.LAVA_REEDS) .criterion(hasItem(ModBlocks.LAVA_REEDS), conditionsFromItem(ModBlocks.LAVA_REEDS)) .offerTo(recipeExporter); + ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.IMP_SKIN) + .input(ModItems.FOULITE_DUST) + .input(Items.LEATHER) + .criterion(hasItem(ModItems.FOULITE_DUST), conditionsFromItem(ModItems.FOULITE_DUST)) + .criterion(hasItem(Items.LEATHER), conditionsFromItem(Items.LEATHER)) + .offerTo(recipeExporter); // FOOD ShapedRecipeJsonBuilder.create(RecipeCategory.FOOD, ModItems.DEVILBREAD) @@ -79,6 +82,23 @@ public class ModRecipeProvider extends FabricRecipeProvider { .criterion(hasItem(ModBlocks.GLOWOOD_PLANKS), conditionsFromItem(ModBlocks.GLOWOOD_PLANKS)) .offerTo(recipeExporter); + ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.DARK_WHEAT_SEEDS) + .input(ModItems.FOULITE_DUST) + .input(Items.WHEAT_SEEDS) + .criterion(hasItem(ModItems.FOULITE_DUST), conditionsFromItem(ModItems.FOULITE_DUST)) + .criterion(hasItem(Items.WHEAT_SEEDS), conditionsFromItem(Items.WHEAT_SEEDS)) + .offerTo(recipeExporter); + + ShapedRecipeJsonBuilder.create(RecipeCategory.FOOD, ModItems.GLOW_APPLE) + .pattern("fff") + .pattern("fAf") + .pattern("fff") + .input('f', ModItems.FOULITE_DUST) + .input('A', Items.APPLE) + .criterion(hasItem(ModItems.FOULITE_DUST), conditionsFromItem(ModItems.FOULITE_DUST)) + .criterion(hasItem(Items.APPLE), conditionsFromItem(Items.APPLE)) + .offerTo(recipeExporter); + ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, ModItems.GLOWSTEW) .input(ModItems.GLOWOOD_BOWL) .input(ModBlocks.GREEN_GLOWSHROOM) @@ -105,7 +125,15 @@ public class ModRecipeProvider extends FabricRecipeProvider { .pattern("WWW") .input('W', ModBlocks.GLOWOOD_PLANKS) .criterion(hasItem(ModBlocks.GLOWOOD_PLANKS), conditionsFromItem(ModBlocks.GLOWOOD_PLANKS)) - .offerTo(recipeExporter); + .offerTo(recipeExporter, Identifier.of(NethercraftClassic.MOD_ID, "stairs_left")); + + ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModBlocks.GLOWOOD_STAIRS, 4) + .pattern(" W") + .pattern(" WW") + .pattern("WWW") + .input('W', ModBlocks.GLOWOOD_PLANKS) + .criterion(hasItem(ModBlocks.GLOWOOD_PLANKS), conditionsFromItem(ModBlocks.GLOWOOD_PLANKS)) + .offerTo(recipeExporter, Identifier.of(NethercraftClassic.MOD_ID, "stairs_right")); ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModBlocks.GLOWOOD_FENCE, 3) .pattern("WSW") @@ -177,7 +205,7 @@ public class ModRecipeProvider extends FabricRecipeProvider { .criterion(hasItem(Blocks.NETHERRACK), conditionsFromItem(Blocks.NETHERRACK)) .offerTo(recipeExporter); - // I don't know how to datagen smelting/blasting so theyre all located in + // I don't know how to datagen smelting/blasting so they're all located in // src/main/resources/data/nethercraft-classic/recipe offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.MISC, ModItems.LINIUM_INGOT, RecipeCategory.MISC, ModBlocks.LINIUM_BLOCK); diff --git a/src/main/java/xyz/ibatv/nethercraft/item/ModFoodComponents.java b/src/main/java/xyz/ibatv/nethercraft/item/ModFoodComponents.java index a9b9750..fc0807e 100644 --- a/src/main/java/xyz/ibatv/nethercraft/item/ModFoodComponents.java +++ b/src/main/java/xyz/ibatv/nethercraft/item/ModFoodComponents.java @@ -5,5 +5,6 @@ import net.minecraft.item.Items; public class ModFoodComponents { public static final FoodComponent DEVILBREAD = new FoodComponent.Builder().nutrition(5).saturationModifier(0.6f).build(); + public static final FoodComponent GLOW_APPLE = new FoodComponent.Builder().nutrition(4).saturationModifier(0.24f).build(); public static final FoodComponent GLOWSTEW = new FoodComponent.Builder().nutrition(6).saturationModifier(0.72f).usingConvertsTo(ModItems.GLOWOOD_BOWL).build(); } diff --git a/src/main/java/xyz/ibatv/nethercraft/item/ModItemGroups.java b/src/main/java/xyz/ibatv/nethercraft/item/ModItemGroups.java index cc7081d..33a5652 100644 --- a/src/main/java/xyz/ibatv/nethercraft/item/ModItemGroups.java +++ b/src/main/java/xyz/ibatv/nethercraft/item/ModItemGroups.java @@ -59,6 +59,7 @@ public class ModItemGroups { entries.add(ModItems.DARK_WHEAT_SEEDS); entries.add(ModItems.DARK_WHEAT); entries.add(ModItems.DEVILBREAD); + entries.add(ModItems.GLOW_APPLE); entries.add(ModItems.GLOWSTEW); entries.add(ModItems.FOULITE_DUST); entries.add(ModItems.W_DUST); diff --git a/src/main/java/xyz/ibatv/nethercraft/item/ModItems.java b/src/main/java/xyz/ibatv/nethercraft/item/ModItems.java index 0f350e5..8da14d3 100644 --- a/src/main/java/xyz/ibatv/nethercraft/item/ModItems.java +++ b/src/main/java/xyz/ibatv/nethercraft/item/ModItems.java @@ -31,6 +31,7 @@ public class ModItems { public static final Item DEVILBREAD = registerItem("devilbread", new Item(new Item.Settings().food(ModFoodComponents.DEVILBREAD))); + public static final Item GLOW_APPLE = registerItem("glow_apple", new Item(new Item.Settings().food(ModFoodComponents.GLOW_APPLE))); public static final Item GLOWSTEW = registerItem("glowstew", new Item(new Item.Settings().food(ModFoodComponents.GLOWSTEW))); public static final Item DARK_WHEAT_SEEDS = registerItem("dark_wheat_seeds", diff --git a/src/main/resources/assets/nethercraft-classic/lang/en_us.json b/src/main/resources/assets/nethercraft-classic/lang/en_us.json index 465df2f..fa42d16 100644 --- a/src/main/resources/assets/nethercraft-classic/lang/en_us.json +++ b/src/main/resources/assets/nethercraft-classic/lang/en_us.json @@ -40,11 +40,15 @@ "block.nethercraft-classic.glowood_crafting_table": "Glowood Crafting Table", "item.nethercraft-classic.glowood_bowl": "Glowood Bowl", + "item.nethercraft-classic.lava_paper": "Lava Paper", + "item.nethercraft-classic.lava_book": "Lava Book", + "item.nethercraft-classic.imp_skin": "Imp Skin", "block.nethercraft-classic.nether_glass": "Heat Glass", + "block.nethercraft-classic.heat_sand": "Heat Sand", "block.nethercraft-classic.slow_glass": "Slow Glass", @@ -59,6 +63,7 @@ "block.nethercraft-classic.dark_wheat_crop": "Nether Wheat Crop", "item.nethercraft-classic.dark_wheat": "Nether Wheat", "item.nethercraft-classic.devilbread": "Devil Bread", + "item.nethercraft-classic.glow_apple": "Glowing Apple", "item.nethercraft-classic.glowstew": "Glow Stew", @@ -68,6 +73,7 @@ + "item.nethercraft-classic.neridium_lighter": "Neridium Lighter", diff --git a/src/main/resources/assets/nethercraft-classic/textures/entity/mob/blackzombie1.png b/src/main/resources/assets/nethercraft-classic/textures/entity/darkzombie/bloodyzombie1.png similarity index 100% rename from src/main/resources/assets/nethercraft-classic/textures/entity/mob/blackzombie1.png rename to src/main/resources/assets/nethercraft-classic/textures/entity/darkzombie/bloodyzombie1.png diff --git a/src/main/resources/assets/nethercraft-classic/textures/entity/mob/blackzombie.png b/src/main/resources/assets/nethercraft-classic/textures/entity/darkzombie/dark_zombie.png similarity index 100% rename from src/main/resources/assets/nethercraft-classic/textures/entity/mob/blackzombie.png rename to src/main/resources/assets/nethercraft-classic/textures/entity/darkzombie/dark_zombie.png diff --git a/src/main/resources/assets/nethercraft-classic/textures/entity/mob/netherslime.png b/src/main/resources/assets/nethercraft-classic/textures/entity/slime/netherslime.png similarity index 100% rename from src/main/resources/assets/nethercraft-classic/textures/entity/mob/netherslime.png rename to src/main/resources/assets/nethercraft-classic/textures/entity/slime/netherslime.png diff --git a/src/main/resources/assets/nethercraft-classic/textures/entity/mob/netherslime1.png b/src/main/resources/assets/nethercraft-classic/textures/entity/slime/netherslime1.png similarity index 100% rename from src/main/resources/assets/nethercraft-classic/textures/entity/mob/netherslime1.png rename to src/main/resources/assets/nethercraft-classic/textures/entity/slime/netherslime1.png diff --git a/src/main/resources/assets/nethercraft-classic/textures/item/netherapple.png b/src/main/resources/assets/nethercraft-classic/textures/item/glow_apple.png similarity index 100% rename from src/main/resources/assets/nethercraft-classic/textures/item/netherapple.png rename to src/main/resources/assets/nethercraft-classic/textures/item/glow_apple.png diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 58648a2..04044ff 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -10,9 +10,9 @@ ], "contact": { "homepage": "https://ibatv.xyz/", - "sources": "https://git.ibatv.xyz/IveBeenAlone/nethercraft-classic-fabric" + "sources": "https://git.ibatv.xyz/IveBeenAlone/nethercraft-classic-fabric", + "issues": "https://git.ibatv.xyz/IveBeenAlone/nethercraft-classic-fabric/issues" }, - "license": "CC0-1.0", "icon": "assets/nethercraft-classic/icon.png", "environment": "*", "entrypoints": { diff --git a/src/main/resources/packs/Classic_Textures/pack.mcmeta b/src/main/resources/packs/Classic_Textures/pack.mcmeta index d776cb9..9ffe294 100644 --- a/src/main/resources/packs/Classic_Textures/pack.mcmeta +++ b/src/main/resources/packs/Classic_Textures/pack.mcmeta @@ -1,7 +1,6 @@ { - "pack": { - "pack_format": 34, - "supported_formats":[0,99], - "description": "Classic Nethercraft Textures" - } + "pack": { + "description": "Classic Nethercraft ore textures", + "pack_format": 34, + } } \ No newline at end of file