From dbc09ae0b3e169df07eaccb5364cb0a70974e49d Mon Sep 17 00:00:00 2001 From: Mohammad-Ali Minaie Date: Sun, 14 Oct 2018 12:34:08 -0400 Subject: [PATCH] getting no class def error --- kfc/To-Dos.md | 11 + kfc/gradle.properties | 2 +- .../java/nmd/primal/forgecraft/ModInfo.java | 5 +- .../forgecraft/blocks/Anvil/AnvilBase.java | 161 ------- .../nmd/primal/forgecraft/blocks/Chisel.java | 303 +++++++------- .../blocks/CustomContainerFacing.java | 96 ++++- .../blocks/{Crucibles => }/NBTCrucible.java | 45 +- .../forgecraft/blocks/anvil/AnvilBase.java | 71 ++++ .../blocks/{Anvil => anvil}/AnvilIron.java | 2 +- .../blocks/{Anvil => anvil}/AnvilSteel.java | 2 +- .../blocks/{Anvil => anvil}/AnvilStone.java | 2 +- .../blocks/machine/BloomeryBase.java | 2 - .../forgecraft/blocks/machine/Workbench.java | 262 ++++++++++++ .../primal/forgecraft/compat/jei/ModJEI.java | 17 +- .../workbench/WorkbenchRecipeCategory.java | 105 +++++ .../jei/workbench/WorkbenchRecipeChecker.java | 24 ++ .../jei/workbench/WorkbenchRecipeHandler.java | 18 + .../jei/workbench/WorkbenchRecipeWrapper.java | 55 +++ .../CraftingRegistery/RecipesCrucible.java | 19 +- .../CraftingRegistery/RecipesWorkbench.java | 377 +++++++++++++++++ .../crafting/WorkbenchCrafting.java | 199 +++++++++ .../nmd/primal/forgecraft/init/ModBlocks.java | 11 +- .../primal/forgecraft/init/ModCrafting.java | 199 --------- .../primal/forgecraft/init/ModDictionary.java | 4 +- .../primal/forgecraft/init/ModRegistries.java | 9 + .../forgecraft/init/ModTileRenders.java | 19 + .../nmd/primal/forgecraft/init/ModTiles.java | 1 + .../primal/forgecraft/items/SledgeHammer.java | 19 +- .../primal/forgecraft/items/SlottedTongs.java | 6 +- .../forgecraft/items/parts/ToolPart.java | 2 +- .../items/tools/AbstractPickaxe.java | 2 +- .../forgecraft/items/weapons/Longbow.java | 7 +- .../primal/forgecraft/proxy/ClientProxy.java | 11 +- .../renders/blocks/TileAnvilRender.java | 4 +- .../renders/blocks/TileWorkbenchRender.java | 381 +++++++++++++++++ .../primal/forgecraft/tiles/TileBloomery.java | 2 +- .../forgecraft/tiles/TileWorkbench.java | 57 +++ .../primal/forgecraft/util/ForgeHandler.java | 14 + .../forgecraft/blockstates/toolbench.json | 18 + .../assets/forgecraft/lang/en_US.lang | 7 +- .../models/block/FryingPan_Model.json | 371 +++++++++++++++++ .../forgecraft/models/block/displayrack.json | 175 ++++++++ .../forgecraft/models/block/workbench.json | 392 ++++++++++++++++++ .../assets/forgecraft/models/item/axe.json | 10 +- .../forgecraft/models/item/axehead.json | 9 +- .../models/item/craftinghammer.json | 104 +++++ .../assets/forgecraft/models/item/hoe.json | 10 +- .../forgecraft/models/item/hoehead.json | 11 +- .../forgecraft/models/item/pickaxe.json | 10 +- .../forgecraft/models/item/pickaxehead.json | 10 +- .../assets/forgecraft/models/item/shovel.json | 6 +- .../forgecraft/models/item/shovelhead.json | 9 +- .../forgecraft/models/item/toolbench.json | 10 + .../textures/blocks/planks_big_oak.png | Bin 0 -> 240 bytes .../forgecraft/textures/blocks/planks_oak.png | Bin 0 -> 247 bytes .../forgecraft/textures/gui/jei/workbench.png | Bin 0 -> 1156 bytes .../textures/gui/jei/workbench2.png | Bin 0 -> 8071 bytes kfc/src/main/resources/mcmod.info | 2 +- 58 files changed, 3070 insertions(+), 610 deletions(-) delete mode 100644 kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilBase.java rename kfc/src/main/java/nmd/primal/forgecraft/blocks/{Crucibles => }/NBTCrucible.java (90%) create mode 100644 kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilBase.java rename kfc/src/main/java/nmd/primal/forgecraft/blocks/{Anvil => anvil}/AnvilIron.java (98%) rename kfc/src/main/java/nmd/primal/forgecraft/blocks/{Anvil => anvil}/AnvilSteel.java (61%) rename kfc/src/main/java/nmd/primal/forgecraft/blocks/{Anvil => anvil}/AnvilStone.java (99%) create mode 100644 kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Workbench.java create mode 100644 kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeCategory.java create mode 100644 kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeChecker.java create mode 100644 kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeHandler.java create mode 100644 kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeWrapper.java create mode 100644 kfc/src/main/java/nmd/primal/forgecraft/crafting/CraftingRegistery/RecipesWorkbench.java create mode 100644 kfc/src/main/java/nmd/primal/forgecraft/crafting/WorkbenchCrafting.java create mode 100644 kfc/src/main/java/nmd/primal/forgecraft/init/ModTileRenders.java create mode 100644 kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileWorkbenchRender.java create mode 100644 kfc/src/main/java/nmd/primal/forgecraft/tiles/TileWorkbench.java create mode 100644 kfc/src/main/resources/assets/forgecraft/blockstates/toolbench.json create mode 100644 kfc/src/main/resources/assets/forgecraft/models/block/FryingPan_Model.json create mode 100644 kfc/src/main/resources/assets/forgecraft/models/block/displayrack.json create mode 100644 kfc/src/main/resources/assets/forgecraft/models/block/workbench.json create mode 100644 kfc/src/main/resources/assets/forgecraft/models/item/craftinghammer.json create mode 100644 kfc/src/main/resources/assets/forgecraft/models/item/toolbench.json create mode 100644 kfc/src/main/resources/assets/forgecraft/textures/blocks/planks_big_oak.png create mode 100644 kfc/src/main/resources/assets/forgecraft/textures/blocks/planks_oak.png create mode 100644 kfc/src/main/resources/assets/forgecraft/textures/gui/jei/workbench.png create mode 100644 kfc/src/main/resources/assets/forgecraft/textures/gui/jei/workbench2.png diff --git a/kfc/To-Dos.md b/kfc/To-Dos.md index 5f7dd1d0..508a4a00 100644 --- a/kfc/To-Dos.md +++ b/kfc/To-Dos.md @@ -1,8 +1,17 @@ # To-Dos ## Bugs +- [ ] Texture mismatch for 4diamond 1 redstone +- [ ] ForgeHammer extend Gallagher +- [x] Check dict name for cluster +- [x] Check block break code for NBTCrucible +- [x] Cooldown for sledgehammer not working +- [x] tune volume down on sledgehammer +- [x] when placing crucibles on the side of a block it replaces the block above +- [ ] Placement bug for crucible from tongs ## Current Feature +- [x] WorkBench - [ ] Untick Bloomery and Forge - [ ] Craft Tweaker Support - [ ] Recipe Handler for Block Breaker @@ -35,6 +44,8 @@ - [ ] Add forgehammer to oreDict ### Tid-Bits +NonNullList tempDrops = NonNullList.create(); +ItemStack iron_gear = RecipeHelper.getFirstDictionaryMatch("gearIron", 1); ``` sed -i -- 's/iron/steel/g' * rm *.json-- diff --git a/kfc/gradle.properties b/kfc/gradle.properties index 0f397d97..f2085238 100644 --- a/kfc/gradle.properties +++ b/kfc/gradle.properties @@ -6,7 +6,7 @@ org.gradle.jvmargs=-Xmx3G mod_group=nmd.primal.forgecraft mod_name=ForgeCraft -mod_version=1.6.23 +mod_version=1.6.25 forge_version=14.23.4.2744 mcp_mappings=snapshot_20171003 mc_version=1.12.2 diff --git a/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java b/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java index c51deba3..cbbe9721 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java @@ -7,6 +7,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.registries.IForgeRegistry; import nmd.primal.forgecraft.crafting.CrucibleCrafting; +import nmd.primal.forgecraft.crafting.WorkbenchCrafting; import nmd.primal.forgecraft.init.ModItems; //import nmd.primal.forgecraft.Item.ModItems; @@ -21,7 +22,7 @@ public class ModInfo { //public static final String MOD_PREFIX = MOD_ID + ":"; public static final String MOD_CHANNEL = MOD_ID; - public static final String MOD_VERSION = "1.6.23"; + public static final String MOD_VERSION = "1.6.25"; public static final String MC_VERSIONS = "[1.12.0, 1.13.0)"; public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.6.69,);"; @@ -55,7 +56,7 @@ public class ModInfo { { // In-World Recipes public static final IForgeRegistry CRUCIBLE_CRAFTING = GameRegistry.findRegistry(CrucibleCrafting.class); - + public static final IForgeRegistry WORKBENCH_CRAFTING = GameRegistry.findRegistry(WorkbenchCrafting.class); } } \ No newline at end of file diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilBase.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilBase.java deleted file mode 100644 index 029436bf..00000000 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilBase.java +++ /dev/null @@ -1,161 +0,0 @@ -package nmd.primal.forgecraft.blocks.Anvil; - -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.forgecraft.ModInfo; -import nmd.primal.forgecraft.blocks.CustomContainerFacing; -import nmd.primal.forgecraft.tiles.TileAnvil; -import nmd.primal.forgecraft.util.AnvilHandler; - -/** - * Created by mminaie on 6/11/17. - */ -public abstract class AnvilBase extends CustomContainerFacing implements AnvilHandler{ - - private boolean anvil; - - public AnvilBase(Material material, String registryName, Float hardness, Boolean anvil) { - super(material, registryName); - setCreativeTab(ModInfo.TAB_FORGECRAFT); - setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)); - setHardness(hardness); - this.setIsAnvil(anvil); - } - - public boolean isAnvil() { - return anvil; - } - - public void setIsAnvil(boolean anvil) { - anvil = anvil; - } - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState state) - { - if (!world.isRemote && world.getGameRules().getBoolean("doTileDrops")) { - TileAnvil tile = (TileAnvil) world.getTileEntity(pos); - if (tile != null) { - for (ItemStack stack : tile.getSlotList()) { - if (stack != ItemStack.EMPTY) { - float offset = 0.7F; - double offsetX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D; - double offsetY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D; - double offsetZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D; - stack.setCount(1); - ItemStack dropStack = stack.copy(); - System.out.println(dropStack); - dropStack.setCount(1); - EntityItem itemDrop = new EntityItem(world, pos.getX() + offsetX, pos.getY() + offsetY, pos.getZ() + offsetZ, dropStack); - itemDrop.setDefaultPickupDelay(); - world.spawnEntity(itemDrop); - } - } - } - } - } - - @Override - public TileEntity createNewTileEntity(World worldIn, int meta) - { - return new TileAnvil(); - } - - @Override - public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) - { - //if(!worldIn.isRemote) { - worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()), 2); - //} - } - - @Override - public int getMetaFromState(IBlockState state) { - int i = 0; - - if( state.getValue(FACING) == EnumFacing.EAST) { - i = 0; - return i; - } - if( state.getValue(FACING) == EnumFacing.WEST) { - i = 1; - return i; - } - if( state.getValue(FACING) == EnumFacing.SOUTH){ - i = 2; - return i; - } - if( state.getValue(FACING) == EnumFacing.NORTH){ - i = 3; - return i; - } - return i; - } - - @Override - public IBlockState getStateFromMeta(int meta) - { - IBlockState iblockstate = this.getDefaultState(); - - if (meta == 0){ - iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST); - } - if (meta == 1) { - iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST); - } - if (meta == 2) { - iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH); - } - if (meta == 3) { - iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH); - } - return iblockstate; - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, new IProperty[] {FACING}); - } - - - - @Override - public boolean isFullCube(IBlockState state) - { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState state) - { - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) - { - return true; - } - - @Override - public EnumBlockRenderType getRenderType(IBlockState state) - { - return EnumBlockRenderType.MODEL; - } - - -} diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Chisel.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Chisel.java index 5503e3a8..7908da40 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Chisel.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Chisel.java @@ -7,14 +7,18 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; +import net.minecraft.init.MobEffects; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.potion.PotionEffect; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextComponentString; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; @@ -22,10 +26,11 @@ import net.minecraftforge.fml.relauncher.SideOnly; import nmd.primal.core.api.PrimalAPI; import nmd.primal.forgecraft.init.ModSounds; import nmd.primal.forgecraft.items.SledgeHammer; +import nmd.primal.forgecraft.util.ToolMaterialMap; import javax.annotation.Nullable; -public class Chisel extends CustomFacing { +public class Chisel extends CustomFacing implements ToolMaterialMap { private AxisAlignedBB boundBoxDown = new AxisAlignedBB( 0.4375D, 0.0D, 0.4375D, @@ -139,192 +144,198 @@ public class Chisel extends CustomFacing { if(!world.isRemote){ ItemStack playerStack = player.inventory.getCurrentItem(); - if (hand.equals(hand.MAIN_HAND)) { + ItemStack offStack = player.inventory.offHandInventory.get(0); + int toolHarvestLevel = playerStack.getItem().getHarvestLevel(playerStack, "pickaxe", player, state); + if (hand.equals(hand.MAIN_HAND) && offStack == ItemStack.EMPTY) { if(!player.isSwingInProgress) { - if (playerStack.getItem() instanceof SledgeHammer) { - world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.CHISEL_HIT, SoundCategory.BLOCKS, 0.8F, 0.3F / (PrimalAPI.getRandom().nextFloat() * 0.4F + 0.8F)); - playerStack.damageItem(1, player); + if(player.getActivePotionEffect(MobEffects.MINING_FATIGUE ) == null){ + if (playerStack.getItem() instanceof SledgeHammer) { + SledgeHammer playerItem = (SledgeHammer) playerStack.getItem(); + world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.CHISEL_HIT, SoundCategory.BLOCKS, (float) (PrimalAPI.getRandom().nextDouble(0.5D, 0.8D)), (float) (PrimalAPI.getRandom().nextDouble(0.3D, 1.0D))); + playerStack.damageItem(1, player); + player.addPotionEffect(new PotionEffect(MobEffects.MINING_FATIGUE, (100 - ((materialModifiers.get(playerItem.getMaterial()) * 8) + (materialModifiers.get(this.getRealMaterial()) * 8))), 100)); + if (PrimalAPI.getRandom().nextInt(1, 10) != 1) { - if(PrimalAPI.getRandom().nextInt(1,10)!=1) { - if (state.getValue(FACING) == EnumFacing.UP) { - if (state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((a - 1), (1), (i - 1)); - IBlockState breakState = world.getBlockState(movePos); - if (state.getValue(PrimalAPI.States.ACTIVE)) { - doBreaking(world, movePos, breakState, player); - } - } - } - world.setBlockState(pos.up(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); - world.setBlockToAir(pos); - return true; - } - if (!state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((a - 1), (1), (i - 1)); - if (! (world.getBlockState(movePos).getBlock() instanceof Chisel)) { + if (state.getValue(FACING) == EnumFacing.UP) { + if (state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((a - 1), (1), (i - 1)); IBlockState breakState = world.getBlockState(movePos); - doDamaging(world, movePos, breakState, player); + if (state.getValue(PrimalAPI.States.ACTIVE)) { + doBreaking(world, movePos, breakState, player); + } } } + doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING)); + return true; + } + if (!state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((a - 1), (1), (i - 1)); + if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) { + IBlockState breakState = world.getBlockState(movePos); + doDamaging(world, movePos, breakState, player); + } + } + } + world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); + return true; } - world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); - return true; } - } - if (state.getValue(FACING) == EnumFacing.DOWN) { - if (state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((a - 1), (-1), (i - 1)); - IBlockState breakState = world.getBlockState(movePos); - if (state.getValue(PrimalAPI.States.ACTIVE)) { - doBreaking(world, movePos, breakState, player); - } - } - } - world.setBlockState(pos.down(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); - world.setBlockToAir(pos); - return true; - } - if (!state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((a - 1), (-1), (i - 1)); - if (! (world.getBlockState(movePos).getBlock() instanceof Chisel)) { + if (state.getValue(FACING) == EnumFacing.DOWN) { + if (state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((a - 1), (-1), (i - 1)); IBlockState breakState = world.getBlockState(movePos); - doDamaging(world, movePos, breakState, player); + if (state.getValue(PrimalAPI.States.ACTIVE)) { + doBreaking(world, movePos, breakState, player); + } } } + doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING)); + return true; } - world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); - return true; - } - } - if (state.getValue(FACING) == EnumFacing.SOUTH) { - if (state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((a - 1), (i - 1), (1)); - IBlockState breakState = world.getBlockState(movePos); - if (state.getValue(PrimalAPI.States.ACTIVE)) { - doBreaking(world, movePos, breakState, player); + if (!state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((a - 1), (-1), (i - 1)); + if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) { + IBlockState breakState = world.getBlockState(movePos); + doDamaging(world, movePos, breakState, player); + } } } + world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); + return true; } - world.setBlockState(pos.south(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); - world.setBlockToAir(pos); - return true; } - if (!state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((a - 1), (i - 1), (1)); - if (! (world.getBlockState(movePos).getBlock() instanceof Chisel)) { + if (state.getValue(FACING) == EnumFacing.SOUTH) { + if (state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((a - 1), (i - 1), (1)); IBlockState breakState = world.getBlockState(movePos); - doDamaging(world, movePos, breakState, player); + if (state.getValue(PrimalAPI.States.ACTIVE)) { + doBreaking(world, movePos, breakState, player); + } } } + doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING)); + return true; } - world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); - return true; - } - } - if (state.getValue(FACING) == EnumFacing.NORTH) { - if (state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((a - 1), (i - 1), (-1)); - IBlockState breakState = world.getBlockState(movePos); - if (state.getValue(PrimalAPI.States.ACTIVE)) { - doBreaking(world, movePos, breakState, player); + if (!state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((a - 1), (i - 1), (1)); + if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) { + IBlockState breakState = world.getBlockState(movePos); + doDamaging(world, movePos, breakState, player); + } } } + world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); + return true; } - world.setBlockState(pos.north(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); - world.setBlockToAir(pos); - return true; } - if (!state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((a - 1), (i - 1), (-1)); - if (! (world.getBlockState(movePos).getBlock() instanceof Chisel)) { + if (state.getValue(FACING) == EnumFacing.NORTH) { + if (state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((a - 1), (i - 1), (-1)); IBlockState breakState = world.getBlockState(movePos); - doDamaging(world, movePos, breakState, player); + if (state.getValue(PrimalAPI.States.ACTIVE)) { + doBreaking(world, movePos, breakState, player); + } } } + doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING)); + return true; } - world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); - return true; - } - } - if (state.getValue(FACING) == EnumFacing.EAST) { - if (state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((1), (i - 1), (a - 1)); - IBlockState breakState = world.getBlockState(movePos); - if (state.getValue(PrimalAPI.States.ACTIVE)) { - doBreaking(world, movePos, breakState, player); + if (!state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((a - 1), (i - 1), (-1)); + if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) { + IBlockState breakState = world.getBlockState(movePos); + doDamaging(world, movePos, breakState, player); + } } } + world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); + return true; } - world.setBlockState(pos.east(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); - world.setBlockToAir(pos); - return true; } - if (!state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((1), (i - 1), (a - 1)); - if (! (world.getBlockState(movePos).getBlock() instanceof Chisel)) { + if (state.getValue(FACING) == EnumFacing.EAST) { + if (state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((1), (i - 1), (a - 1)); IBlockState breakState = world.getBlockState(movePos); - doDamaging(world, movePos, breakState, player); + if (state.getValue(PrimalAPI.States.ACTIVE)) { + doBreaking(world, movePos, breakState, player); + } } } + doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING)); + return true; } - world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); - return true; - } - } - if (state.getValue(FACING) == EnumFacing.WEST) { - if (state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((-1), (i - 1), (a - 1)); - IBlockState breakState = world.getBlockState(movePos); - if (state.getValue(PrimalAPI.States.ACTIVE)) { - doBreaking(world, movePos, breakState, player); + if (!state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((1), (i - 1), (a - 1)); + if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) { + IBlockState breakState = world.getBlockState(movePos); + doDamaging(world, movePos, breakState, player); + } } } + world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); + return true; } - world.setBlockState(pos.west(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); - world.setBlockToAir(pos); - return true; } - if (!state.getValue(PrimalAPI.States.ACTIVE)) { - for (int i = 0; i < 3; i++) { - for (int a = 0; a < 3; a++) { - BlockPos movePos = pos.add((-1), (i - 1), (a - 1)); - if (! (world.getBlockState(movePos).getBlock() instanceof Chisel)) { + if (state.getValue(FACING) == EnumFacing.WEST) { + if (state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((-1), (i - 1), (a - 1)); IBlockState breakState = world.getBlockState(movePos); - doDamaging(world, movePos, breakState, player); + if (state.getValue(PrimalAPI.States.ACTIVE)) { + doBreaking(world, movePos, breakState, player); + } } } + doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING)); + return true; + } + if (!state.getValue(PrimalAPI.States.ACTIVE)) { + for (int i = 0; i < 3; i++) { + for (int a = 0; a < 3; a++) { + BlockPos movePos = pos.add((-1), (i - 1), (a - 1)); + if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) { + IBlockState breakState = world.getBlockState(movePos); + doDamaging(world, movePos, breakState, player); + } + } + } + world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); + return true; } - world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); - return true; } } } } } } + if(offStack != ItemStack.EMPTY) { + String printout = "Is your offhand empty?"; + ITextComponent text = new TextComponentString(printout); + player.sendStatusMessage(text, true); + return false; + } } return false; } @@ -389,6 +400,20 @@ public class Chisel extends CustomFacing { return true; } + private void doMoving(World world, BlockPos pos, int toolHarvestLevel, IBlockState state, EnumFacing facing){ + if( (world.getBlockState(pos.offset(facing, 2)).getBlock() != Blocks.AIR) ) { + if ((compareHarvestLevel(toolHarvestLevel, world.getBlockState(pos.offset(facing, 1)).getBlock().getHarvestLevel(world.getBlockState(pos.offset(facing, 1))))) || + (world.getBlockState(pos.offset(facing, 1)).getBlock() == Blocks.AIR)) { + //if(state.getBlock().getBlockHardness(state, world, pos.offset(facing, 1)) > 0) { + world.setBlockState(pos.offset(facing, 1), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); + world.setBlockToAir(pos); + //} + } + } else { + world.destroyBlock(pos, true); + } + } + private void doBreaking(World world, BlockPos movePos, IBlockState state, EntityPlayer player){ if (!(state.getBlock().equals(Blocks.AIR))) { if(world.getBlockState(movePos).getBlock().getBlockHardness(state, world, movePos)>0) { @@ -403,14 +428,14 @@ public class Chisel extends CustomFacing { private void doDamaging(World world, BlockPos movePos, IBlockState state, EntityPlayer player){ if (!(state.getBlock().equals(Blocks.AIR))) { - if(world.getBlockState(movePos).getBlock().getBlockHardness(state, world, movePos)>0) { + if(world.getBlockState(movePos).getBlock().blockHardness>0) { world.sendBlockBreakProgress(player.getEntityId() + PrimalAPI.getRandom().nextInt(100), movePos, PrimalAPI.getRandom().nextInt(3,10)); } } } private boolean compareHarvestLevel(int inputLevel, int compareHarvest){ - if(inputLevel >= compareHarvest){ + if(inputLevel >= compareHarvest && compareHarvest > 0){ return true; } else return false; } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomContainerFacing.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomContainerFacing.java index b0e191b2..b657763f 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomContainerFacing.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomContainerFacing.java @@ -1,10 +1,21 @@ package nmd.primal.forgecraft.blocks; import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyDirection; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumBlockRenderType; import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import nmd.primal.forgecraft.ModInfo; /** * Created by kitsu on 12/3/2016. @@ -20,10 +31,89 @@ public abstract class CustomContainerFacing extends BlockContainer { this.setUnlocalizedName(registryName); this.setHardness(3.0f); this.setResistance(4.0f); + setCreativeTab(ModInfo.TAB_FORGECRAFT); } - protected CustomContainerFacing(Material material, MapColor color) + @Override + public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { - super(material, color); + //if(!worldIn.isRemote) { + worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()), 2); + //} + } + + @Override + public int getMetaFromState(IBlockState state) { + int i = 0; + + if( state.getValue(FACING) == EnumFacing.EAST) { + i = 0; + return i; + } + if( state.getValue(FACING) == EnumFacing.WEST) { + i = 1; + return i; + } + if( state.getValue(FACING) == EnumFacing.SOUTH){ + i = 2; + return i; + } + if( state.getValue(FACING) == EnumFacing.NORTH){ + i = 3; + return i; + } + return i; + } + + @Override + public IBlockState getStateFromMeta(int meta) + { + IBlockState iblockstate = this.getDefaultState(); + + if (meta == 0){ + iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST); + } + if (meta == 1) { + iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST); + } + if (meta == 2) { + iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH); + } + if (meta == 3) { + iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH); + } + return iblockstate; + } + + @Override + protected BlockStateContainer createBlockState() { + return new BlockStateContainer(this, new IProperty[] {FACING}); + } + + + + @Override + public boolean isFullCube(IBlockState state) + { + return false; + } + + @Override + public boolean isOpaqueCube(IBlockState state) + { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) + { + return true; + } + + @Override + public EnumBlockRenderType getRenderType(IBlockState state) + { + return EnumBlockRenderType.MODEL; } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/NBTCrucible.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/NBTCrucible.java similarity index 90% rename from kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/NBTCrucible.java rename to kfc/src/main/java/nmd/primal/forgecraft/blocks/NBTCrucible.java index ff84223c..b700a444 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/NBTCrucible.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/NBTCrucible.java @@ -1,4 +1,4 @@ -package nmd.primal.forgecraft.blocks.Crucibles; +package nmd.primal.forgecraft.blocks; import net.minecraft.block.BlockContainer; import net.minecraft.block.ITileEntityProvider; @@ -58,7 +58,7 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider { public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing face, float hitX, float hitY, float hitZ) { if (!world.isRemote) { - if(hand == player.getActiveHand()) { + if(hand.equals(hand.MAIN_HAND)) { TileNBTCrucible tile = (TileNBTCrucible) world.getTileEntity(pos); ItemStack pItem = player.inventory.getCurrentItem().copy(); pItem.setCount(1); @@ -72,6 +72,7 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider { } PlayerHelper.playerTakeItem(world, pos, EnumFacing.DOWN, player, player.getActiveHand(), this.getCrucibleItem(world, pos, state, player)); world.setBlockState(pos, this.getReplacementBlock(world, pos, state)); + world.markTileEntityForRemoval(tile); return true; } } @@ -79,22 +80,24 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider { /**SET INGREDIENT ARRAY FOR THE CRUCIBLE NOW**/ if (!player.isSneaking()) { if (!pItem.isEmpty()) { - if (pItem.getItem() instanceof SlottedTongs) { - return false; - } else { - pItem.setCount(1); - for (int i = 1; i < tile.ingList.size()+1; i++) { - if (tile.ingList.get(i-1).isEmpty()) { - tile.ingList.set(i-1, pItem); - tile.setHot(i); - world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, i), 2); - player.inventory.getCurrentItem().shrink(1); - tile.update(); - tile.markDirty(); - return true; + if(!tile.getStatus() || tile.getHot() == 15 || tile.getHot() == 6) { + if (pItem.getItem() instanceof SlottedTongs) { + return false; + } else { + pItem.setCount(1); + for (int i = 1; i < tile.ingList.size() + 1; i++) { + if (tile.ingList.get(i - 1).isEmpty()) { + tile.ingList.set(i - 1, pItem); + tile.setHot(i); + world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, i), 2); + player.inventory.getCurrentItem().shrink(1); + tile.update(); + tile.markDirty(); + return true; + } } - } + } } } } @@ -139,6 +142,7 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider { } } } + return true; } } return false; @@ -170,6 +174,7 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider { ItemStack dropStack = new ItemStack(ModBlocks.nbtCrucible, 1); PlayerHelper.spawnItemOnPlayer(world, player, dropStack); world.setBlockState(pos, this.getReplacementBlock(world, pos, state)); + world.markTileEntityForRemoval(tile); return true; } } @@ -212,11 +217,9 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider { if (tileentity instanceof TileNBTCrucible) { TileNBTCrucible tile = (TileNBTCrucible) world.getTileEntity(pos); if(NBTHelper.hasNBT(stack)){ - NBTTagCompound tag = stack.getSubCompound("BlockEntityTag").copy(); - ItemStack temp = stack.copy(); - int i = temp.getItem().getMetadata(stack.getMetadata()); - //TODO update this with number instead of the boolean - world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, tile.getHot()), 2); + NBTTagCompound tag = stack.getTagCompound(); + world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, tile.getHot()), 2); + //tile.readNBT(tag); } } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilBase.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilBase.java new file mode 100644 index 00000000..13ed8157 --- /dev/null +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilBase.java @@ -0,0 +1,71 @@ +package nmd.primal.forgecraft.blocks.anvil; + +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import nmd.primal.forgecraft.blocks.CustomContainerFacing; +import nmd.primal.forgecraft.tiles.TileAnvil; +import nmd.primal.forgecraft.util.AnvilHandler; + +/** + * Created by mminaie on 6/11/17. + */ +public abstract class AnvilBase extends CustomContainerFacing implements AnvilHandler{ + + private boolean anvil; + + public AnvilBase(Material material, String registryName, Float hardness, Boolean anvil) { + super(material, registryName); + + setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)); + setHardness(hardness); + this.setIsAnvil(anvil); + } + + public boolean isAnvil() { + return anvil; + } + + public void setIsAnvil(boolean anvil) { + anvil = anvil; + } + + @Override + public void breakBlock(World world, BlockPos pos, IBlockState state) + { + if (!world.isRemote && world.getGameRules().getBoolean("doTileDrops")) { + TileAnvil tile = (TileAnvil) world.getTileEntity(pos); + if (tile != null) { + for (ItemStack stack : tile.getSlotList()) { + if (stack != ItemStack.EMPTY) { + float offset = 0.7F; + double offsetX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D; + double offsetY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D; + double offsetZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D; + stack.setCount(1); + ItemStack dropStack = stack.copy(); + dropStack.setCount(1); + EntityItem itemDrop = new EntityItem(world, pos.getX() + offsetX, pos.getY() + offsetY, pos.getZ() + offsetZ, dropStack); + itemDrop.setDefaultPickupDelay(); + world.spawnEntity(itemDrop); + } + } + } + } + } + + @Override + public TileEntity createNewTileEntity(World worldIn, int meta) + { + return new TileAnvil(); + } + + + + +} diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilIron.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilIron.java similarity index 98% rename from kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilIron.java rename to kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilIron.java index 3d03fcf2..99ac8e68 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilIron.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilIron.java @@ -1,4 +1,4 @@ -package nmd.primal.forgecraft.blocks.Anvil; +package nmd.primal.forgecraft.blocks.anvil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilSteel.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilSteel.java similarity index 61% rename from kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilSteel.java rename to kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilSteel.java index 4c096ba2..a52c2306 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilSteel.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilSteel.java @@ -1,4 +1,4 @@ -package nmd.primal.forgecraft.blocks.Anvil; +package nmd.primal.forgecraft.blocks.anvil; /** * Created by mminaie on 6/10/17. diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilStone.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilStone.java similarity index 99% rename from kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilStone.java rename to kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilStone.java index 54831e6c..179ee6af 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilStone.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/anvil/AnvilStone.java @@ -1,4 +1,4 @@ -package nmd.primal.forgecraft.blocks.Anvil; +package nmd.primal.forgecraft.blocks.anvil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/BloomeryBase.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/BloomeryBase.java index a9f6053d..62479599 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/BloomeryBase.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/BloomeryBase.java @@ -34,12 +34,10 @@ import nmd.primal.forgecraft.crafting.CrucibleCrafting; import nmd.primal.forgecraft.items.SlottedTongs; import nmd.primal.forgecraft.tiles.TileBloomery; -import java.awt.*; import java.util.Random; import java.util.concurrent.ThreadLocalRandom; import static nmd.primal.forgecraft.items.SlottedTongs.ITEM_HANDLER; -import static org.jline.utils.InfoCmp.Capability.newline; /** * Created by mminaie on 6/11/17. diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Workbench.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Workbench.java new file mode 100644 index 00000000..11f2c799 --- /dev/null +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Workbench.java @@ -0,0 +1,262 @@ +package nmd.primal.forgecraft.blocks.machine; + +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import nmd.primal.core.common.helper.PlayerHelper; +import nmd.primal.core.common.items.tools.Gallagher; +import nmd.primal.forgecraft.blocks.CustomContainerFacing; +import nmd.primal.forgecraft.crafting.WorkbenchCrafting; +import nmd.primal.forgecraft.tiles.TileWorkbench; + +import javax.annotation.Nullable; + +public class Workbench extends CustomContainerFacing { + + + protected static final AxisAlignedBB boundBoxNorth = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 10 / 16D, 8/16D); + protected static final AxisAlignedBB boundBoxSouth = new AxisAlignedBB(0.0D, 0.0D, 8/16D, 1.0D, 10 / 16D, 1.0D); + protected static final AxisAlignedBB boundBoxEast = new AxisAlignedBB(8/16D, 0.0D, 0.0D, 1.0D, 10 / 16D, 1.0D); + protected static final AxisAlignedBB boundBoxWest = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 8/16D, 10 / 16D, 1.0D); + + public Workbench(Material material, String registryName) { + super(material, registryName); + this.setHardness(4.0f); + } + + @Override + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { + + if (!world.isRemote) { + if (hand.equals(hand.MAIN_HAND) ) { + + TileWorkbench tile = (TileWorkbench) world.getTileEntity(pos); + ItemStack playerStack = player.inventory.getCurrentItem(); + + if (tile != null) { + ItemStack slot0 = tile.getSlotStack(0); + ItemStack slot1 = tile.getSlotStack(1); + ItemStack slot2 = tile.getSlotStack(2); + ItemStack slot3 = tile.getSlotStack(3); + ItemStack slot4 = tile.getSlotStack(4); + ItemStack slot5 = tile.getSlotStack(5); + ItemStack slot6 = tile.getSlotStack(6); + if (hitY > 0.5D) { + if (!player.isSneaking()) { + /*if (tile.isItemValidForSlot(6, playerStack)) { + if (slot6.isEmpty()) { + tile.setSlotStack(6, playerStack.splitStack(1)); + //player.inventory.getCurrentItem().shrink(1); + return true; + } + }*/ + if(! (playerStack.getItem() instanceof Gallagher)) { + if (slot4.isEmpty() && slot3.isEmpty() && slot2.isEmpty()) { + if (tile.isItemValidForSlot(5, playerStack)) { + if (slot5.isEmpty()) { + tile.setSlotStack(5, playerStack.splitStack(1)); + //player.inventory.getCurrentItem().shrink(1); + return true; + } + } + } + if (tile.isItemValidForSlot(4, playerStack)) { + if (slot4.isEmpty()) { + tile.setSlotStack(4, playerStack.splitStack(1)); + //player.inventory.getCurrentItem().shrink(1); + return true; + } + } + if (tile.isItemValidForSlot(3, playerStack)) { + if (slot3.isEmpty()) { + tile.setSlotStack(3, playerStack.splitStack(1)); + //player.inventory.getCurrentItem().shrink(1); + return true; + } + } + if (tile.isItemValidForSlot(2, playerStack)) { + if (slot2.isEmpty()) { + tile.setSlotStack(2, playerStack.splitStack(1)); + //player.inventory.getCurrentItem().shrink(1); + return true; + } + } + } + if(playerStack.getItem() instanceof Gallagher) { + if (!slot2.isEmpty() && !slot3.isEmpty() && !slot4.isEmpty() && slot5.isEmpty()) { + WorkbenchCrafting recipe = WorkbenchCrafting.getRecipe(slot2, slot3, slot4, slot5); + System.out.println(slot5); + if (recipe != null) { + ItemStack drops = recipe.getOutput(); + if (slot3.hasTagCompound()) { + drops.setTagCompound(slot3.getTagCompound()); + } + PlayerHelper.spawnItemOnPlayer(world, player, drops); + tile.clearSlot(2); + tile.clearSlot(3); + tile.clearSlot(4); + tile.clearSlot(5); + return true; + } + } + if (slot2.isEmpty() && slot3.isEmpty() && slot4.isEmpty() && !slot5.isEmpty()) { + WorkbenchCrafting recipe = WorkbenchCrafting.getRecipe(slot2, slot3, slot4, slot5); + if (recipe != null) { + ItemStack drops = recipe.getOutput(); + if (slot5.hasTagCompound()) { + drops.setTagCompound(slot5.getTagCompound()); + } + PlayerHelper.spawnItemOnPlayer(world, player, drops); + tile.clearSlot(2); + tile.clearSlot(3); + tile.clearSlot(4); + tile.clearSlot(5); + return true; + } + } + } + } + if(player.isSneaking()){ + if(!slot2.isEmpty()){ + PlayerHelper.spawnItemOnPlayer(world, player, slot2); + tile.clearSlot(2); + } + if(!slot3.isEmpty()){ + PlayerHelper.spawnItemOnPlayer(world, player, slot3); + tile.clearSlot(3); + } + if(!slot4.isEmpty()){ + PlayerHelper.spawnItemOnPlayer(world, player, slot4); + tile.clearSlot(4); + } + if(!slot5.isEmpty()){ + PlayerHelper.spawnItemOnPlayer(world, player, slot5); + tile.clearSlot(5); + } + if(!slot6.isEmpty()){ + PlayerHelper.spawnItemOnPlayer(world, player, slot6); + tile.clearSlot(6); + } + + } + } + if (hitY < 0.5D) { + if (state.getValue(FACING) == EnumFacing.NORTH) { + if (hitX < 0.5) { + return sideInventoryManager(world, player, tile, slot0, 0); + } + if (hitX > 0.5) { + return sideInventoryManager(world, player, tile, slot1, 1); + } + + return true; + } + if (state.getValue(FACING) == EnumFacing.SOUTH) { + if (hitX > 0.5) { + return sideInventoryManager(world, player, tile, slot0, 0); + } + if (hitX < 0.5) { + return sideInventoryManager(world, player, tile, slot1, 1); + } + + return true; + } + if (state.getValue(FACING) == EnumFacing.EAST) { + if (hitZ < 0.5) { + return sideInventoryManager(world, player, tile, slot0, 0); + } + if (hitZ > 0.5) { + return sideInventoryManager(world, player, tile, slot1, 1); + } + + return true; + } + if (state.getValue(FACING) == EnumFacing.WEST) { + if (hitZ > 0.5) { + return sideInventoryManager(world, player, tile, slot0, 0); + } + if (hitZ < 0.5) { + return sideInventoryManager(world, player, tile, slot1, 1); + } + + return true; + } + } + } + } + } + return true; + } + + private boolean sideInventoryManager(World world, EntityPlayer player, TileWorkbench tile, ItemStack slot, int index) + { + + if(!player.isSneaking()) { + + ItemStack stack = player.inventory.getCurrentItem(); + if (!(stack.isEmpty()) ) { + if( stack.isItemEqual(slot) ) { + if (slot.getCount() < 64) { + if (stack.getCount() + slot.getCount() > 64) { + stack.shrink(64 - slot.getCount()); + slot.setCount(64); + return true; + } + if (stack.getCount() + slot.getCount() < 64) { + slot.grow(stack.getCount()); + stack.shrink(stack.getCount()); + return true; + } + } + } + if (slot.isEmpty()) { + tile.setSlotStack(index, stack); + player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY); + return true; + } + } + } + if(player.isSneaking()){ + if(!slot.isEmpty()){ + PlayerHelper.spawnItemOnPlayer(world, player, tile.getSlotStack(index)); + tile.clearSlot(index); + return true; + } + } + return false; + } + + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) + { + state = state.getActualState(source, pos); + EnumFacing enumfacing = (EnumFacing)state.getValue(FACING); + + switch (enumfacing) + { + case EAST: + default: + return boundBoxEast; + case SOUTH: + return boundBoxSouth; + case WEST: + return boundBoxWest; + case NORTH: + return boundBoxNorth; + } + } + + @Nullable + @Override + public TileEntity createNewTileEntity(World worldIn, int meta) { + return new TileWorkbench(); + } +} diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/ModJEI.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/ModJEI.java index 6eb9e16f..850d4959 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/ModJEI.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/ModJEI.java @@ -17,10 +17,10 @@ import nmd.primal.forgecraft.compat.jei.crucible.CrucibleRecipeHandler; import nmd.primal.forgecraft.compat.jei.forge.ForgeRecipeCategory; import nmd.primal.forgecraft.compat.jei.forge.ForgeRecipeChecker; import nmd.primal.forgecraft.compat.jei.forge.ForgeRecipeHandler; -import nmd.primal.forgecraft.crafting.AnvilCrafting; -import nmd.primal.forgecraft.crafting.CastingCrafting; -import nmd.primal.forgecraft.crafting.CrucibleCrafting; -import nmd.primal.forgecraft.crafting.ForgeCrafting; +import nmd.primal.forgecraft.compat.jei.workbench.WorkbenchRecipeCategory; +import nmd.primal.forgecraft.compat.jei.workbench.WorkbenchRecipeChecker; +import nmd.primal.forgecraft.compat.jei.workbench.WorkbenchRecipeHandler; +import nmd.primal.forgecraft.crafting.*; import nmd.primal.forgecraft.init.ModBlocks; import javax.annotation.Nonnull; @@ -51,7 +51,7 @@ public class ModJEI implements IModPlugin registry.addRecipeCategories(new CrucibleRecipeCategory(guiHelper)); registry.addRecipeCategories(new AnvilRecipeCategory(guiHelper)); registry.addRecipeCategories(new CastingRecipeCategory(guiHelper)); - + registry.addRecipeCategories(new WorkbenchRecipeCategory(guiHelper)); } @Override @@ -88,7 +88,12 @@ public class ModJEI implements IModPlugin registry.addRecipes(CastingRecipeChecker.getRecipes(), CastingRecipeCategory.CATEGORY); registry.addRecipeCatalyst(new ItemStack(ModBlocks.castingform), CastingRecipeCategory.CATEGORY); - + // + // Workbench + // + registry.handleRecipes(WorkbenchCrafting.class, new WorkbenchRecipeHandler(), WorkbenchRecipeCategory.CATEGORY); + registry.addRecipes(WorkbenchRecipeChecker.getRecipes(), WorkbenchRecipeCategory.CATEGORY); + registry.addRecipeCatalyst(new ItemStack(ModBlocks.workbench), WorkbenchRecipeCategory.CATEGORY); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeCategory.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeCategory.java new file mode 100644 index 00000000..7a12367d --- /dev/null +++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeCategory.java @@ -0,0 +1,105 @@ +package nmd.primal.forgecraft.compat.jei.workbench; + +import mezz.jei.api.IGuiHelper; +import mezz.jei.api.gui.IDrawable; +import mezz.jei.api.gui.IGuiItemStackGroup; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.ingredients.IIngredients; +import net.minecraft.client.Minecraft; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; +import net.minecraft.util.ResourceLocation; +import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.common.helper.CommonUtils; +import nmd.primal.forgecraft.ModInfo; +import nmd.primal.forgecraft.compat.jei.AbstractCategory; +import nmd.primal.forgecraft.init.ModBlocks; + +import javax.annotation.Nonnull; +import java.util.Arrays; +import java.util.List; + +/** + * Created by mminaie on 9/16/18. + */ +public class WorkbenchRecipeCategory extends AbstractCategory +{ + public static String CATEGORY = CommonUtils.prefix("workbench"); + + private static ResourceLocation gui_background = new ResourceLocation(ModInfo.MOD_ID,"textures/gui/jei/workbench.png"); + private final IDrawable background; + + public WorkbenchRecipeCategory(IGuiHelper guiHelper) + { + //background = guiHelper.createDrawable(gui_background, 0, 0, 134, 144, 0, 0, 0, 0); + background = guiHelper.createDrawable(gui_background, 0,0,115,39); + } + + @Nonnull + @Override + public String getUid() + { + return CATEGORY; + } + + @Nonnull + @Override + public String getTitle() + { + return "jei.category.forgecraft.workbench"; + } + + @Nonnull + @Override + public IDrawable getBackground() + { + return background; + } + + @Override + public void drawExtras(@Nonnull Minecraft minecraft) + { + //progress.draw(minecraft, 67, 18); + } + + @Override + public void setRecipe(IRecipeLayout layout, WorkbenchRecipeWrapper recipe, IIngredients ingredients) + { + IGuiItemStackGroup items = layout.getItemStacks(); + + /***INPUTS***/ + items.init(0, true, 1, 1); + List slot0 = Arrays.asList( recipe.toolPart.getMatchingStacks()); + items.set(0,slot0); + + items.init(1, true, 20, 1); + List slot1 = Arrays.asList( recipe.toolHead.getMatchingStacks()); + items.set(1,slot1); + + items.init(2, true, 39, 1); + List slot2 = Arrays.asList( recipe.toolPin.getMatchingStacks()); + items.set(2,slot2); + + items.init(3, true, 39, 20); + List slot3 = Arrays.asList( recipe.takeApart.getMatchingStacks()); + items.set(3,slot3); + + /***OUTPUTS***/ + items.init(4, false, 96, 11); + items.set(4, recipe.output); + + /***EXTRAS***/ + items.init(5, false, 66, 20); + ItemStack bench = new ItemStack(Item.getItemFromBlock(ModBlocks.workbench), 1); + items.set(5, bench); + + items.init(6, false, 66, 1); + NonNullList tempDrops = NonNullList.create(); + tempDrops.add(0, new ItemStack(PrimalAPI.Items.STONE_GALLAGHER, 1)); + tempDrops.add(1, new ItemStack(PrimalAPI.Items.NETHER_GALLAGHER, 1)); + tempDrops.add(2, new ItemStack(PrimalAPI.Items.IRON_GALLAGHER, 1)); + tempDrops.add(3, new ItemStack(PrimalAPI.Items.QUARTZ_GALLAGHER, 1)); + items.set(6, tempDrops); + } +} \ No newline at end of file diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeChecker.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeChecker.java new file mode 100644 index 00000000..a3cab9f0 --- /dev/null +++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeChecker.java @@ -0,0 +1,24 @@ +package nmd.primal.forgecraft.compat.jei.workbench; + +import nmd.primal.forgecraft.crafting.WorkbenchCrafting; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by mminaie on 9/16/18. + */ +public class WorkbenchRecipeChecker { + + public static List getRecipes() { + List recipes = new ArrayList<>(); + for (WorkbenchCrafting recipe : WorkbenchCrafting.getRECIPES()) { + if(!recipe.isDisabled()) { + if(!recipe.isHidden()) { + recipes.add(recipe); + } + } + } + return recipes; + } +} diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeHandler.java new file mode 100644 index 00000000..15c7c910 --- /dev/null +++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeHandler.java @@ -0,0 +1,18 @@ +package nmd.primal.forgecraft.compat.jei.workbench; + +import mezz.jei.api.recipe.IRecipeWrapper; +import mezz.jei.api.recipe.IRecipeWrapperFactory; +import nmd.primal.forgecraft.crafting.WorkbenchCrafting; + +import javax.annotation.Nonnull; + +/** + * Created by mminaie on 9/17/18. + */ +public class WorkbenchRecipeHandler implements IRecipeWrapperFactory { + @Nonnull + @Override + public IRecipeWrapper getRecipeWrapper(@Nonnull WorkbenchCrafting recipe) { + return new WorkbenchRecipeWrapper(recipe); + } +} \ No newline at end of file diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeWrapper.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeWrapper.java new file mode 100644 index 00000000..7ab4606f --- /dev/null +++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeWrapper.java @@ -0,0 +1,55 @@ +package nmd.primal.forgecraft.compat.jei.workbench; + +import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IRecipeWrapper; +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import nmd.primal.forgecraft.crafting.WorkbenchCrafting; + +import javax.annotation.Nonnull; + +/** + * Created by mminaie on 9/16/18. + */ +public class WorkbenchRecipeWrapper implements IRecipeWrapper { + + protected final WorkbenchCrafting recipe; + + protected Ingredient toolPart; + protected Ingredient toolHead; + protected Ingredient toolPin; + protected Ingredient takeApart; + protected ItemStack output; + + public WorkbenchRecipeWrapper(WorkbenchCrafting recipe) { + + this.recipe = recipe; + this.toolPart = recipe.getToolPart(); + this.toolHead = recipe.getToolHead(); + this.toolPin = recipe.getToolPin(); + this.takeApart = recipe.getTakeApart(); + this.output = recipe.getOutput(); + } + + + @Override + public void getIngredients(IIngredients ingredients) { + + ingredients.setInput(ItemStack.class, this.toolPart); + ingredients.setInput(ItemStack.class, this.toolHead); + ingredients.setInput(ItemStack.class, this.toolPin); + ingredients.setInput(ItemStack.class, this.takeApart); + ingredients.setOutput(ItemStack.class, this.output); + } + + @Override + public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) + { + //String tempString = new String("To an empty crucible add: " + recipe.getSource().getDisplayName() + ". For details reference the appropriate crucible recipe. Pick up the hot crucible with Stonetongs and right click your casting block."); + //minecraft.fontRenderer.drawSplitString(tempString, 97, 0, 150, Color.black.getRGB()); + //minecraft.fontRenderer.drawString(String.valueOf(recipe.getHeatThreshold() + "\u00b0"), 24, 36, Color.red.getRGB()); + //minecraft.fontRenderer.drawString(String.valueOf(recipe.getIdealTime()), 26, 13, Color.green.getRGB()); + } + +} diff --git a/kfc/src/main/java/nmd/primal/forgecraft/crafting/CraftingRegistery/RecipesCrucible.java b/kfc/src/main/java/nmd/primal/forgecraft/crafting/CraftingRegistery/RecipesCrucible.java index 97f1bdb0..7b971d63 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/crafting/CraftingRegistery/RecipesCrucible.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/crafting/CraftingRegistery/RecipesCrucible.java @@ -1,6 +1,5 @@ package nmd.primal.forgecraft.crafting.CraftingRegistery; -import net.minecraft.block.BlockPlanks; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.Ingredient; @@ -353,20 +352,20 @@ public final class RecipesCrucible { 1000).setRecipeName("steel2")); recipes.register (new CrucibleCrafting( - new OreIngredient("dustMagnetite"), - Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1,BlockPlanks.EnumType.JUNGLE.getMetadata())), - Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)), - Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())), - Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)), - new ItemStack(PrimalAPI.Items.ORE_CLUSTER_MAGNETITE, 1), + new OreIngredient("oreClusterMagnetite"), + Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)), + new OreIngredient("oreClusterMagnetite"), + Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)), + new OreIngredient("specialCarbon"), + new ItemStack(PrimalAPI.Items.ORE_CLUSTER_MAGNETITE, 1), new ItemStack(ModItems.wootzingotball, 1), 2100, - 1800, - 1500).setRecipeName("wootz1")); + 1800, + 1500).setRecipeName("wootz2")); recipes.register (new CrucibleCrafting( Ingredient.fromStacks(new ItemStack(ModItems.brokenwootztool, 1)), - new OreIngredient("nuggetWootz"), + new OreIngredient("nuggetWootz"), Ingredient.EMPTY, Ingredient.EMPTY, Ingredient.EMPTY, diff --git a/kfc/src/main/java/nmd/primal/forgecraft/crafting/CraftingRegistery/RecipesWorkbench.java b/kfc/src/main/java/nmd/primal/forgecraft/crafting/CraftingRegistery/RecipesWorkbench.java new file mode 100644 index 00000000..b9a63fd3 --- /dev/null +++ b/kfc/src/main/java/nmd/primal/forgecraft/crafting/CraftingRegistery/RecipesWorkbench.java @@ -0,0 +1,377 @@ +package nmd.primal.forgecraft.crafting.CraftingRegistery; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.OreIngredient; +import net.minecraftforge.registries.IForgeRegistry; +import nmd.primal.core.api.PrimalAPI; +import nmd.primal.forgecraft.ModInfo; +import nmd.primal.forgecraft.crafting.WorkbenchCrafting; +import nmd.primal.forgecraft.init.ModItems; + +@GameRegistry.ObjectHolder(ModInfo.MOD_ID) +@Mod.EventBusSubscriber +public final class RecipesWorkbench { + @SubscribeEvent + public static void registerRecipes(RegistryEvent.Register event) { + PrimalAPI.logger(7, "Registering Recipes: " + WorkbenchCrafting.RECIPE_PREFIX); + final IForgeRegistry recipes = event.getRegistry(); + + /***COPPER***/ + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.copperaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.copperaxe, 1)).setRecipeName("copperaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.copperaxe, 1)), + new ItemStack(ModItems.copperaxehead, 1)).setRecipeName("copperaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.copperhoehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.copperhoe, 1)).setRecipeName("copperhoe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.copperhoe, 1)), + new ItemStack(ModItems.copperhoehead, 1)).setRecipeName("copperhoesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.copperpickaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.copperpickaxe, 1)).setRecipeName("copperpickaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.copperpickaxe, 1)), + new ItemStack(ModItems.copperpickaxehead, 1)).setRecipeName("copperpickaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.coppershovelhead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.coppershovel, 1)).setRecipeName("coppershovel")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.coppershovel, 1)), + new ItemStack(ModItems.coppershovelhead, 1)).setRecipeName("coppershovelsplit")); + + /***BRONZE***/ + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.bronzeaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.bronzeaxe, 1)).setRecipeName("bronzeaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.bronzeaxe, 1)), + new ItemStack(ModItems.bronzeaxehead, 1)).setRecipeName("bronzeaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.bronzehoehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.bronzehoe, 1)).setRecipeName("bronzehoe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.bronzehoe, 1)), + new ItemStack(ModItems.bronzehoehead, 1)).setRecipeName("bronzehoesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.bronzepickaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.bronzepickaxe, 1)).setRecipeName("bronzepickaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.bronzepickaxe, 1)), + new ItemStack(ModItems.bronzepickaxehead, 1)).setRecipeName("bronzepickaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.bronzeshovelhead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.bronzeshovel, 1)).setRecipeName("bronzeshovel")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.bronzeshovel, 1)), + new ItemStack(ModItems.bronzeshovelhead, 1)).setRecipeName("bronzeshovelsplit")); + + + /***iron***/ + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.ironaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.ironaxe, 1)).setRecipeName("ironaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.ironaxe, 1)), + new ItemStack(ModItems.ironaxehead, 1)).setRecipeName("ironaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.ironhoehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.ironhoe, 1)).setRecipeName("ironhoe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.ironhoe, 1)), + new ItemStack(ModItems.ironhoehead, 1)).setRecipeName("ironhoesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.pickaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.ironpickaxe, 1)).setRecipeName("ironpickaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.ironpickaxe, 1)), + new ItemStack(ModItems.pickaxehead, 1)).setRecipeName("ironpickaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.ironshovelhead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.ironshovel, 1)).setRecipeName("ironshovel")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.ironshovel, 1)), + new ItemStack(ModItems.ironshovelhead, 1)).setRecipeName("ironshovelsplit")); + + + /***cleaniron***/ + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.cleanironaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.cleanironaxe, 1)).setRecipeName("cleanironaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.cleanironaxe, 1)), + new ItemStack(ModItems.cleanironaxehead, 1)).setRecipeName("cleanironaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.cleanironhoehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.cleanironhoe, 1)).setRecipeName("cleanironhoe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.cleanironhoe, 1)), + new ItemStack(ModItems.cleanironhoehead, 1)).setRecipeName("cleanironhoesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.cleanironpickaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.cleanironpickaxe, 1)).setRecipeName("cleanironpickaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.cleanironpickaxe, 1)), + new ItemStack(ModItems.cleanironpickaxehead, 1)).setRecipeName("cleanironpickaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.cleanironshovelhead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.cleanironshovel, 1)).setRecipeName("cleanironshovel")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.cleanironshovel, 1)), + new ItemStack(ModItems.cleanironshovelhead, 1)).setRecipeName("cleanironshovelsplit")); + + + /***steel***/ + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.steelaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.steelaxe, 1)).setRecipeName("steelaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.steelaxe, 1)), + new ItemStack(ModItems.steelaxehead, 1)).setRecipeName("steelaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.steelhoehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.steelhoe, 1)).setRecipeName("steelhoe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.steelhoe, 1)), + new ItemStack(ModItems.steelhoehead, 1)).setRecipeName("steelhoesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.steelpickaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.steelpickaxe, 1)).setRecipeName("steelpickaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.steelpickaxe, 1)), + new ItemStack(ModItems.steelpickaxehead, 1)).setRecipeName("steelpickaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.steelshovelhead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.steelshovel, 1)).setRecipeName("steelshovel")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.steelshovel, 1)), + new ItemStack(ModItems.steelshovelhead, 1)).setRecipeName("steelshovelsplit")); + + + /***wootz***/ + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.wootzaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.wootzaxe, 1)).setRecipeName("wootzaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.wootzaxe, 1)), + new ItemStack(ModItems.wootzaxehead, 1)).setRecipeName("wootzaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.wootzhoehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.wootzhoe, 1)).setRecipeName("wootzhoe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.wootzhoe, 1)), + new ItemStack(ModItems.wootzhoehead, 1)).setRecipeName("wootzhoesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.wootzpickaxehead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.wootzpickaxe, 1)).setRecipeName("wootzpickaxe")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.wootzpickaxe, 1)), + new ItemStack(ModItems.wootzpickaxehead, 1)).setRecipeName("wootzpickaxesplit")); + + recipes.register (new WorkbenchCrafting( + new OreIngredient("stickTreatedWood"), + Ingredient.fromStacks(new ItemStack(ModItems.wootzshovelhead, 1)), + new OreIngredient("pinBasic"), + Ingredient.EMPTY, + new ItemStack(ModItems.wootzshovel, 1)).setRecipeName("wootzshovel")); + + recipes.register (new WorkbenchCrafting( + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.EMPTY, + Ingredient.fromStacks(new ItemStack(ModItems.wootzshovel, 1)), + new ItemStack(ModItems.wootzshovelhead, 1)).setRecipeName("wootzshovelsplit")); + + } +} \ No newline at end of file diff --git a/kfc/src/main/java/nmd/primal/forgecraft/crafting/WorkbenchCrafting.java b/kfc/src/main/java/nmd/primal/forgecraft/crafting/WorkbenchCrafting.java new file mode 100644 index 00000000..42fb904d --- /dev/null +++ b/kfc/src/main/java/nmd/primal/forgecraft/crafting/WorkbenchCrafting.java @@ -0,0 +1,199 @@ +package nmd.primal.forgecraft.crafting; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraftforge.registries.IForgeRegistry; +import nmd.primal.core.common.recipes.AbstractRecipe; +import nmd.primal.forgecraft.ModInfo; + +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * Created by mminaie on 11/11/17. + */ +public class WorkbenchCrafting extends AbstractRecipe { //extends AbstractCrafting { + + // ***************************************************************************** // + // Recipe Handler CrucibleHandler + // ***************************************************************************** // + + public static final String RECIPE_PREFIX = "workbench"; + public static final IForgeRegistry REGISTRY = ModInfo.Registries.WORKBENCH_CRAFTING; + + public static Collection getRECIPES() { + return RECIPES; + } + + public static final Collection RECIPES = REGISTRY.getValuesCollection(); + + private Ingredient toolPart; + private Ingredient toolHead; + private Ingredient toolPin; + private Ingredient takeApart; + private ItemStack output; + + public Ingredient getTakeApart() { + return takeApart; + } + + public void setTakeApart(Ingredient takeApart) { + this.takeApart = takeApart; + } + + public Ingredient getToolPart() { + return toolPart; + } + + public void setToolPart(Ingredient toolPart) { + this.toolPart = toolPart; + } + + public Ingredient getToolHead() { + return toolHead; + } + + public void setToolHead(Ingredient toolHead) { + this.toolHead = toolHead; + } + + public Ingredient getToolPin() { + return toolPin; + } + + public void setToolPin(Ingredient toolPin) { + this.toolPin = toolPin; + } + + public ItemStack getOutput() { + return output; + } + + public void setOutput(ItemStack output) { + this.output = output; + } + + public List getIngredientList() { + return ingredientList; + } + + public void setIngredientList(List ingredientList) { + this.ingredientList = ingredientList; + } + + private List ingredientList = new ArrayList<>(); + + public WorkbenchCrafting(Ingredient i0, Ingredient i1, Ingredient i2, Ingredient i3 , ItemStack output){ + super(); + this.toolPart = i0; + this.toolHead = i1; + this.toolPin = i2; + this.takeApart = i3; + this.output = output; + } + + public static boolean compare(Ingredient ingredient, ItemStack stack){ + if(stack == null){ + stack = new ItemStack(Items.AIR, 1); + } + if(ingredient == null && stack.isEmpty()) { + return true; + } + + if (ingredient.test(ItemStack.EMPTY)) { + if (stack.isEmpty()) { + return true; + } + } + + if(ingredient.apply(stack)){ + return true; + } + + return false; + } + + public static boolean isRecipe(ItemStack i0, ItemStack i1, ItemStack i2, ItemStack i3){ + for(WorkbenchCrafting recipe : RECIPES){ + if(i0 == null){ + i0 = ItemStack.EMPTY; + } + if(i1 == null){ + i1 = ItemStack.EMPTY; + } + if(i2 == null){ + i2 = ItemStack.EMPTY; + } + if(i3 == null){ + i3 = ItemStack.EMPTY; + } + if(compare(recipe.toolPart, i0) && + compare(recipe.toolHead, i1) && + compare(recipe.toolPin, i2) && + compare(recipe.takeApart, i3) ){ + return true; + } + } + return false; + } + + public static WorkbenchCrafting getRecipe(ItemStack i0, ItemStack i1, ItemStack i2, ItemStack i3){ + for(WorkbenchCrafting recipe : RECIPES){ + + if(i0 == null){ + i0 = ItemStack.EMPTY; + } + if(i1 == null){ + i1 = ItemStack.EMPTY; + } + if(i2 == null){ + i2 = ItemStack.EMPTY; + } + if(i3 == null){ + i3 = ItemStack.EMPTY; + } + + if(recipe.toolPart.apply(i0) && recipe.toolHead.apply(i1) && recipe.toolPin.apply(i2) && recipe.takeApart.apply(i3) ){ + return recipe; + } + } + return null; + } + /*public static boolean isValidIngredient(ItemStack checkStack){ + for(WorkbenchCrafting recipe : RECIPES) { + if (recipe.ing0.apply(checkStack) || + recipe.ing1.apply(checkStack) || + recipe.ing2.apply(checkStack) || + recipe.ing3.apply(checkStack) || + recipe.ing4.apply(checkStack)) { + return true; + } + } + return false; + }*/ + + + @Override + public Collection getRecipes() { + return RECIPES; + } + + @Override + public String getRecipePrefix() { + return RECIPE_PREFIX; + } + + /** + * Shim for getting a recipe directly from correctly formatted name + * @param recipe_name basic recipe name, no prefix or mod id + * @return Recipe object + */ + @Nullable + public static WorkbenchCrafting getRecipe(String recipe_name) + { + return REGISTRY.getValue(getFullRecipeName(RECIPE_PREFIX, recipe_name)); + } +} diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java index 6e266544..044954d7 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java @@ -11,10 +11,10 @@ import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import nmd.primal.core.api.PrimalAPI; -import nmd.primal.forgecraft.blocks.Anvil.AnvilStone; import nmd.primal.forgecraft.blocks.Chisel; -import nmd.primal.forgecraft.blocks.Crucibles.NBTCrucible; import nmd.primal.forgecraft.blocks.YewStave; +import nmd.primal.forgecraft.blocks.anvil.AnvilStone; +import nmd.primal.forgecraft.blocks.NBTCrucible; import nmd.primal.forgecraft.blocks.machine.*; /** @@ -47,6 +47,8 @@ public class ModBlocks { public static Block stoneanvil; public static Block ironanvil; + public static Block workbench; + public static Block yewstave; public static void init() { @@ -76,6 +78,8 @@ public class ModBlocks { stoneanvil = new AnvilStone(Material.ANVIL, "stoneanvil", 5.0f, true); //ironanvil = new AnvilIron(Material.ANVIL, "ironanvil", 6.0f, true); + workbench = new Workbench(Material.WOOD, "toolbench"); + yewstave = new YewStave(Material.WOOD, "yewstave", 3.0F); } @@ -107,6 +111,8 @@ public class ModBlocks { registerBlockWithItem(stoneanvil); //registerBlockWithItem(ironanvil); + registerBlockWithItem(workbench); + registerBlockWithItem(yewstave); } @@ -137,6 +143,7 @@ public class ModBlocks { registerRender(stoneanvil); //registerRender(ironanvil); + registerRender(workbench); registerRender(yewstave); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java index 3c3402cd..0d83c21b 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java @@ -344,205 +344,6 @@ public class ModCrafting{ " ", " I ", " S ", 'I', "ingotIron", 'S', Blocks.STONE); - - /*************************************************************** - * TOOL CRAFTING RECIPES - ***************************************************************/ - - /***Pickaxe Crafting***/ - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzepickaxe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironpickaxe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelpickaxe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzpickaxe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.wootzpickaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_PICKAXE), "T", "S", - ('T'), ModItems.pickaxehead, - ('S'), Items.STICK); - - /***Axe Crafting***/ - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeaxe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironaxe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelaxe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.steelaxehead,1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzaxe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.wootzaxehead,1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_AXE), "T", "S", - ('T'), ModItems.ironaxehead, - ('S'), Items.STICK); - - /***Shovel Crafting***/ - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeshovel, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironshovel, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironshovel, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelshovel, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzshovel, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.wootzshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_SHOVEL), "T", "S", - ('T'), ModItems.ironshovelhead, - ('S'), Items.STICK); - - /***Hoe Crafting***/ - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzehoe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironhoe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironhoe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelhoe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzhoe, 1), "T", "C", "S", - ('T'), new ItemStack(ModItems.wootzhoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), "stickTreatedWood", - ('C'), "cordageGeneral"); - - RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_HOE), "T", "S", - ('T'), ModItems.ironhoehead, - ('S'), Items.STICK); - - - /*************************************************************** - * TOOL DISASSEMBLY RECIPES - ***************************************************************/ - //RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE), - // " ", " X ", " ", 'X', ModItems.ironaxe); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeaxehead, 1), - true, "X", ('X'), new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE)); - - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE)); - - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE)); - - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelaxehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE)); - - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzaxehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.wootzaxe, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzpickaxehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.wootzpickaxe, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzshovelhead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.wootzshovel, 1, OreDictionary.WILDCARD_VALUE)); - - RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzhoehead, 1, OreDictionary.WILDCARD_VALUE), - true, "X", ('X'), new ItemStack(ModItems.wootzhoe, 1, OreDictionary.WILDCARD_VALUE)); - - - - /****************************************************************************** CASTING ******************************************************************************/ diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModDictionary.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModDictionary.java index fba4e5db..6c0d4eae 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModDictionary.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModDictionary.java @@ -29,8 +29,8 @@ public class ModDictionary {/*************************************************** OreDictionary.registerOre("ingotBronze", ModItems.bronzeingotball); OreDictionary.registerOre("nuggetBronze", ModItems.bronzechunk); //if(COMPAT_DICTIONARY_DAMASCUS_STEEL) { - // OreDictionary.registerOre("ingotSteel", ModItems.wootzingotball); - // OreDictionary.registerOre("nuggetSteel", ModItems.wootzchunk); + OreDictionary.registerOre("ingotWootz", ModItems.wootzingotball); + OreDictionary.registerOre("nuggetWootz", ModItems.wootzchunk); //} } } \ No newline at end of file diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModRegistries.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModRegistries.java index ce815e3f..269a7896 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModRegistries.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModRegistries.java @@ -9,6 +9,7 @@ import net.minecraftforge.registries.RegistryBuilder; import nmd.primal.core.api.PrimalAPI; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.crafting.CrucibleCrafting; +import nmd.primal.forgecraft.crafting.WorkbenchCrafting; /** * Created by kitsu on 12/3/2016. @@ -26,5 +27,13 @@ public class ModRegistries { registryCrucible.setName(new ResourceLocation(ModInfo.MOD_ID, "recipes_" + CrucibleCrafting.RECIPE_PREFIX)); registryCrucible.setIDRange(0, 1000); registryCrucible.create(); + + PrimalAPI.logger(1, "Custom Registry", WorkbenchCrafting.RECIPE_PREFIX); + RegistryBuilder registryWorkbench = new RegistryBuilder(); + registryWorkbench.setType(WorkbenchCrafting.class); + registryWorkbench.setName(new ResourceLocation(ModInfo.MOD_ID, "recipes_" + WorkbenchCrafting.RECIPE_PREFIX)); + registryWorkbench.setIDRange(0, 1000); + registryWorkbench.create(); + } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModTileRenders.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModTileRenders.java new file mode 100644 index 00000000..94140c97 --- /dev/null +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModTileRenders.java @@ -0,0 +1,19 @@ +package nmd.primal.forgecraft.init; + +import net.minecraftforge.fml.client.registry.ClientRegistry; +import nmd.primal.forgecraft.renders.blocks.*; +import nmd.primal.forgecraft.tiles.*; + +public class ModTileRenders { + + public static void init(){ + ClientRegistry.bindTileEntitySpecialRenderer(TileForge.class, new TileForgeRender()); + ClientRegistry.bindTileEntitySpecialRenderer(TilePistonBellows.class, new TilePistonBellowsRender()); + ClientRegistry.bindTileEntitySpecialRenderer(TileBloomery.class, new TileBloomeryRender()); + ClientRegistry.bindTileEntitySpecialRenderer(TileAnvil.class, new TileAnvilRender()); + ClientRegistry.bindTileEntitySpecialRenderer(TileBreaker.class, new TileBreakerRender()); + ClientRegistry.bindTileEntitySpecialRenderer(TileCastingForm.class, new TileCastingformRender()); + ClientRegistry.bindTileEntitySpecialRenderer(TileWorkbench.class, new TileWorkbenchRender()); + } + +} diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModTiles.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModTiles.java index 535a4f43..b791d777 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModTiles.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModTiles.java @@ -17,6 +17,7 @@ public class ModTiles { registerTileEntity(TileBreaker.class, "breaker"); registerTileEntity(TileCastingForm.class, "castingform"); registerTileEntity(TileNBTCrucible.class, "nbtcrucible"); + registerTileEntity(TileWorkbench.class, "workbench"); } private static void registerTileEntity(Class tile_class, String baseName) { diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/SledgeHammer.java b/kfc/src/main/java/nmd/primal/forgecraft/items/SledgeHammer.java index 9c11e7fc..d22ce8ec 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/SledgeHammer.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/SledgeHammer.java @@ -3,29 +3,18 @@ package nmd.primal.forgecraft.items; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.mojang.realmsclient.gui.ChatFormatting; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.MobEffects; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import nmd.primal.core.common.items.tools.Gallagher; import nmd.primal.core.common.recipes.irecipe.ToolCraftingRecipe; import nmd.primal.forgecraft.ModInfo; -import nmd.primal.forgecraft.blocks.Anvil.AnvilBase; import nmd.primal.forgecraft.util.ToolMaterialMap; import javax.annotation.Nullable; @@ -49,7 +38,7 @@ public class SledgeHammer extends Gallagher implements ToolMaterialMap { this.setCreativeTab(ModInfo.TAB_FORGECRAFT); } - @Override + /*@Override public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { if(!world.isRemote){ EntityPlayer player = (EntityPlayer) entity; @@ -78,12 +67,12 @@ public class SledgeHammer extends Gallagher implements ToolMaterialMap { int tempInt = 0; player.addPotionEffect(new PotionEffect(MobEffects.MINING_FATIGUE, (100 - ((materialModifiers.get(this.getMaterial()) * 13) + tempInt)), 100)); player.swingArm(hand); - return EnumActionResult.PASS; + return EnumActionResult.SUCCESS; } } } - return EnumActionResult.PASS; - } + return EnumActionResult.FAIL; + }*/ public ToolMaterial getMaterial() { return material; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java b/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java index 6771b4a5..ee0646ea 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java @@ -32,8 +32,8 @@ import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.RecipeHelper; import nmd.primal.core.common.tiles.AbstractTileTank; import nmd.primal.forgecraft.ModInfo; -import nmd.primal.forgecraft.blocks.Anvil.AnvilBase; -import nmd.primal.forgecraft.blocks.Crucibles.NBTCrucible; +import nmd.primal.forgecraft.blocks.anvil.AnvilBase; +import nmd.primal.forgecraft.blocks.NBTCrucible; import nmd.primal.forgecraft.blocks.machine.Forge; import nmd.primal.forgecraft.init.ModItems; import nmd.primal.forgecraft.items.blocks.ItemNBTCrucible; @@ -308,9 +308,11 @@ public class SlottedTongs extends Item implements IPickup, AnvilHandler{ if (!(block instanceof Forge)) { if (slotStack.isEmpty()) { if (block instanceof NBTCrucible) { + TileNBTCrucible tile = (TileNBTCrucible) world.getTileEntity(pos); ItemStack tempStack = takeBlock(world, pos, state, face, player, block).copy(); inventory.insertItem(0, tempStack, false); world.setBlockState(pos, this.getReplacementBlock(world, pos, state)); + world.markTileEntityForRemoval(tile); //itemstack.getItem().updateItemStackNBT(itemstack.getTagCompound()); itemstackItem.markDirty(itemstack); return EnumActionResult.SUCCESS; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/parts/ToolPart.java b/kfc/src/main/java/nmd/primal/forgecraft/items/parts/ToolPart.java index 408a3852..db173fa7 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/parts/ToolPart.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/parts/ToolPart.java @@ -169,7 +169,7 @@ public class ToolPart extends Item implements ToolNBT{ { if(item.hasTagCompound()) { - tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (ToolMaterialMap.materialModifiers.get( this.getMaterial()) - getModifiers(item))); + tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (ToolMaterialMap.materialModifiers.get(this.toolMaterial) - getModifiers(item))); if (getEmerald(item)) { tooltip.add(ChatFormatting.DARK_GREEN + "Emerald"); } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractPickaxe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractPickaxe.java index 970cebca..c8b6dd4b 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractPickaxe.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractPickaxe.java @@ -138,7 +138,7 @@ public abstract class AbstractPickaxe extends ItemPickaxe implements ToolNBT { { if(item.hasTagCompound()) { - tooltip.add(ChatFormatting.GRAY + "Total Allowed: " + (ToolMaterialMap.materialModifiers.get(this.toolMaterial) )); + tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (ToolMaterialMap.materialModifiers.get(this.toolMaterial) - getModifiers(item))); if (getEmerald(item)) { tooltip.add(ChatFormatting.DARK_GREEN + "Emerald"); } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java b/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java index a2032bbf..c857ad05 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java @@ -27,7 +27,7 @@ import javax.annotation.Nullable; */ public class Longbow extends BaseItem { - int mod=15; + int mod=10; int time=0; public Longbow(String name) { @@ -140,7 +140,8 @@ public class Longbow extends BaseItem { { ItemArrow itemarrow = (ItemArrow)((ItemArrow)(itemstack.getItem() instanceof ItemArrow ? itemstack.getItem() : Items.ARROW)); EntityArrow entityarrow = itemarrow.createArrow(worldIn, itemstack, entityplayer); - entityarrow.shoot(entityplayer, entityplayer.rotationPitch, entityplayer.rotationYaw, 0.0F, f * 6.0F, 1.0F); + entityarrow.setDamage(entityarrow.getDamage()+(entityarrow.getDamage()*f)); + entityarrow.shoot(entityplayer, entityplayer.rotationPitch, entityplayer.rotationYaw, 0.0F, f * 6.0F, 0.5F); if (f >= 1.0F) { @@ -179,7 +180,7 @@ public class Longbow extends BaseItem { public static float getArrowVelocity(int charge) { - float f = (float)charge / 120; + float f = (float)charge / 90; if (f > 1.0F) { diff --git a/kfc/src/main/java/nmd/primal/forgecraft/proxy/ClientProxy.java b/kfc/src/main/java/nmd/primal/forgecraft/proxy/ClientProxy.java index 475f82af..c299be76 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/proxy/ClientProxy.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/proxy/ClientProxy.java @@ -2,12 +2,10 @@ package nmd.primal.forgecraft.proxy; import net.minecraft.client.model.ModelBiped; import net.minecraft.item.Item; -import net.minecraftforge.fml.client.registry.ClientRegistry; import nmd.primal.forgecraft.init.ModBlocks; import nmd.primal.forgecraft.init.ModItems; +import nmd.primal.forgecraft.init.ModTileRenders; import nmd.primal.forgecraft.models.ModelPlateHelmet; -import nmd.primal.forgecraft.renders.blocks.*; -import nmd.primal.forgecraft.tiles.*; import java.util.HashMap; import java.util.Map; @@ -38,12 +36,7 @@ public class ClientProxy implements CommonProxy { //@Override public void registerTileRendering() { - ClientRegistry.bindTileEntitySpecialRenderer(TileForge.class, new TileForgeRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TilePistonBellows.class, new TilePistonBellowsRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TileBloomery.class, new TileBloomeryRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TileAnvil.class, new TileAnvilRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TileBreaker.class, new TileBreakerRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TileCastingForm.class, new TileCastingformRender()); + ModTileRenders.init(); } public void registerModels(){ diff --git a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java index eb060f71..9c2717b7 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java @@ -13,8 +13,8 @@ import net.minecraft.item.Item; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import nmd.primal.core.api.PrimalAPI; -import nmd.primal.forgecraft.blocks.Anvil.AnvilBase; -import nmd.primal.forgecraft.blocks.Anvil.AnvilStone; +import nmd.primal.forgecraft.blocks.anvil.AnvilBase; +import nmd.primal.forgecraft.blocks.anvil.AnvilStone; import nmd.primal.forgecraft.init.ModItems; import nmd.primal.forgecraft.items.BaseMultiItem; import nmd.primal.forgecraft.tiles.TileAnvil; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileWorkbenchRender.java b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileWorkbenchRender.java new file mode 100644 index 00000000..cdd99d51 --- /dev/null +++ b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileWorkbenchRender.java @@ -0,0 +1,381 @@ +package nmd.primal.forgecraft.renders.blocks; + +import net.minecraft.block.state.IBlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.RenderItem; +import net.minecraft.client.renderer.block.model.ItemCameraTransforms; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import nmd.primal.forgecraft.blocks.machine.Workbench; +import nmd.primal.forgecraft.tiles.TileWorkbench; +import org.lwjgl.opengl.GL11; + +/** + * Created by kitsu on 12/4/2016. + */ +public class TileWorkbenchRender extends TileEntitySpecialRenderer +{ + private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); + + @Override + public void render(TileWorkbench tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha) + { + BlockPos pos = tile.getPos(); + IBlockState state = this.getWorld().getBlockState(pos); + if (state.getBlock() instanceof Workbench) { + + GL11.glPushMatrix(); + GL11.glTranslated(x, y, z); + //GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F); + Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); + float prevLGTX = OpenGlHelper.lastBrightnessX; + float prevLGTY = OpenGlHelper.lastBrightnessY; + + int bright = tile.getWorld().getCombinedLight(pos.up(), 0); + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536); + + ItemStack stack0 = tile.getSlotStack(0); + ItemStack stack1 = tile.getSlotStack(1); + ItemStack stack2 = tile.getSlotStack(2); + ItemStack stack3 = tile.getSlotStack(3); + ItemStack stack4 = tile.getSlotStack(4); + ItemStack stack5 = tile.getSlotStack(5); + ItemStack stack6 = tile.getSlotStack(6); + + + + + if (state.getValue(Workbench.FACING) == EnumFacing.NORTH) { + + if (!stack0.isEmpty()) { + boolean is_block = stack0.getItem() instanceof ItemBlock; + float scale = is_block ? 0.5F : 0.3F; + double trans = is_block ? 0.3125D : 0.3125D; + double yTrans = is_block ? 0.3D : 0.3D; + GL11.glPushMatrix(); + + + GL11.glTranslated(trans, yTrans, 0.25D); + GL11.glScalef(scale, scale, scale); + GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F); + renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + + } + if (!stack1.isEmpty()) { + boolean is_block = stack1.getItem() instanceof ItemBlock; + float scale = is_block ? 0.5F : 0.3F; + double trans = is_block ? 0.3125D : 0.3125D; + double yTrans = is_block ? 0.3D : 0.3D; + GL11.glPushMatrix(); + + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(trans+0.375D, yTrans, 0.25D); + GL11.glScalef(scale, scale, scale); + GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F); + renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + + } + if(!stack2.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.4375, 0.71875D, 0.26D); + GL11.glScalef(0.7F, 1F, 0.55F); + GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + } + if(!stack3.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.37D, 0.27D, 0.21D); + GL11.glScalef(1F, 1F, 1F); + GL11.glRotated(-90.0F, 0.0F, 1.0F, 0.0F); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack3, ItemCameraTransforms.TransformType.HEAD); + GL11.glPopMatrix(); + } + if(!stack4.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.85, 0.71875D, 0.25D); + GL11.glScalef(0.3F, 0.3F, 0.3F); + GL11.glRotated(45.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack4, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + } + if(!stack5.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.48D, 0.3D, -0.15D); + GL11.glScalef(1F, 1F, 1F); + GL11.glRotated(-90.0F, 0.0F, 1.0F, 0.0F); + //GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD); + GL11.glPopMatrix(); + } + + } + if (state.getValue(Workbench.FACING) == EnumFacing.SOUTH) { + + if (!stack0.isEmpty()) { + boolean is_block = stack0.getItem() instanceof ItemBlock; + float scale = is_block ? 0.5F : 0.3F; + double trans = is_block ? 0.3125D : 0.3125D; + double yTrans = is_block ? 0.3D : 0.3D; + GL11.glPushMatrix(); + + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(trans+0.375D, yTrans, 0.75D); + + GL11.glScalef(scale, scale, scale); + renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + + } + if (!stack1.isEmpty()) { + boolean is_block = stack1.getItem() instanceof ItemBlock; + float scale = is_block ? 0.5F : 0.3F; + double trans = is_block ? 0.3125D : 0.3125D; + double yTrans = is_block ? 0.3D : 0.3D; + GL11.glPushMatrix(); + + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(trans, yTrans, 0.75D); + GL11.glScalef(scale, scale, scale); + renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + + } + if(!stack2.isEmpty()){ + GL11.glPushMatrix(); + + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.5625, 0.71875D, 0.7925D); + GL11.glScalef(0.7F, 1F, 0.55F); + GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + } + if(!stack3.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.55, 0.27D, 0.77D); + GL11.glScalef(1F, 1F, 1F); + GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack3, ItemCameraTransforms.TransformType.HEAD); + GL11.glPopMatrix(); + } + if(!stack4.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.175, 0.71875D, 0.78D); + GL11.glScalef(0.3F, 0.3F, 0.3F); + GL11.glRotated(45.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack4, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + } + if(!stack5.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.52D, 0.3D, 1.15D); + GL11.glScalef(1F, 1F, 1F); + GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F); + //GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD); + GL11.glPopMatrix(); + } + } + if (state.getValue(Workbench.FACING) == EnumFacing.EAST) { + + if (!stack0.isEmpty()) { + boolean is_block = stack0.getItem() instanceof ItemBlock; + float scale = is_block ? 0.5F : 0.3F; + double trans = is_block ? 0.3125D : 0.3125D; + double yTrans = is_block ? 0.3D : 0.3D; + GL11.glPushMatrix(); + + + GL11.glTranslated(0.75D, yTrans, trans); + GL11.glScalef(scale, scale, scale); + GL11.glRotated(90F, 0.0F, 1.0F, 0.0F); + renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + + } + if (!stack1.isEmpty()) { + boolean is_block = stack1.getItem() instanceof ItemBlock; + float scale = is_block ? 0.5F : 0.3F; + double trans = is_block ? 0.3125D : 0.3125D; + double yTrans = is_block ? 0.3D : 0.3D; + GL11.glPushMatrix(); + + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.75D, yTrans, trans+0.375D); + GL11.glScalef(scale, scale, scale); + GL11.glRotated(90F, 0.0F, 1.0F, 0.0F); + renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + + } + if(!stack2.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.7925D, 0.71875D, 0.4375); + GL11.glScalef(0.55F, 1F, 0.7F); + GL11.glRotated(45F, 0.0F, 1.0F, 0.0F); + GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + } + if(!stack3.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.75, 0.27D, 0.4D); + GL11.glScalef(1F, 1F, 1F); + GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack3, ItemCameraTransforms.TransformType.HEAD); + GL11.glPopMatrix(); + } + if(!stack4.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.755, 0.71875D, 0.8D); + GL11.glScalef(0.3F, 0.3F, 0.3F); + GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack4, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + } + if(!stack5.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(1.15D, 0.3D, 0.485D); + GL11.glScalef(1F, 1F, 1F); + GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F); + //GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD); + GL11.glPopMatrix(); + } + } + if (state.getValue(Workbench.FACING) == EnumFacing.WEST) { + + if (!stack0.isEmpty()) { + boolean is_block = stack0.getItem() instanceof ItemBlock; + float scale = is_block ? 0.5F : 0.3F; + double trans = is_block ? 0.3125D : 0.3125D; + double yTrans = is_block ? 0.3D : 0.3D; + GL11.glPushMatrix(); + + GL11.glTranslated(0.25D, yTrans, trans+0.375D); + GL11.glScalef(scale, scale, scale); + GL11.glRotated(-90F, 0.0F, 1.0F, 0.0F); + renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + + } + if (!stack1.isEmpty()) { + boolean is_block = stack1.getItem() instanceof ItemBlock; + float scale = is_block ? 0.5F : 0.3F; + double trans = is_block ? 0.3125D : 0.3125D; + double yTrans = is_block ? 0.3D : 0.3D; + GL11.glPushMatrix(); + + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.25D, yTrans, trans); + GL11.glScalef(scale, scale, scale); + GL11.glRotated(-90F, 0.0F, 1.0F, 0.0F); + renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + } + if(!stack2.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.255D, 0.71875D, 0.565); + GL11.glScalef(0.55F, 1F, 0.7F); + GL11.glRotated(45F, 0.0F, 1.0F, 0.0F); + GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + } + if(!stack3.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.235, 0.27D, 0.6D); + GL11.glScalef(1F, 1F, 1F); + //GL11.glRotated(-180.0F, 0.0F, 1.0F, 0.0F); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack3, ItemCameraTransforms.TransformType.HEAD); + GL11.glPopMatrix(); + } + if(!stack4.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(0.2175, 0.71875D, 0.185D); + GL11.glScalef(0.3F, 0.3F, 0.3F); + GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack4, ItemCameraTransforms.TransformType.FIXED); + GL11.glPopMatrix(); + } + if(!stack5.isEmpty()){ + GL11.glPushMatrix(); + //System.out.println(stack2); + //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslated(-0.138D, 0.3D, 0.52D); + GL11.glScalef(1F, 1F, 1F); + //GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F); + //GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F); + + renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD); + GL11.glPopMatrix(); + } + } + + + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY); + GL11.glPopMatrix(); + } + } +} \ No newline at end of file diff --git a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileBloomery.java b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileBloomery.java index 8ce396fc..6873ddcc 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileBloomery.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileBloomery.java @@ -14,7 +14,7 @@ import net.minecraft.world.World; import nmd.primal.core.api.PrimalAPI; import nmd.primal.core.common.helper.FireHelper; import nmd.primal.core.common.helper.RecipeHelper; -import nmd.primal.forgecraft.blocks.Crucibles.NBTCrucible; +import nmd.primal.forgecraft.blocks.NBTCrucible; import nmd.primal.forgecraft.blocks.machine.BloomeryBase; import nmd.primal.forgecraft.crafting.CrucibleCrafting; import nmd.primal.forgecraft.init.ModItems; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileWorkbench.java b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileWorkbench.java new file mode 100644 index 00000000..9af220fa --- /dev/null +++ b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileWorkbench.java @@ -0,0 +1,57 @@ +package nmd.primal.forgecraft.tiles; + +import net.minecraft.item.ItemStack; +import nmd.primal.core.common.helper.RecipeHelper; +import nmd.primal.forgecraft.items.parts.ToolPart; +import nmd.primal.forgecraft.items.tools.CustomAxe; +import nmd.primal.forgecraft.items.tools.CustomHoe; +import nmd.primal.forgecraft.items.tools.CustomPickaxe; +import nmd.primal.forgecraft.items.tools.CustomShovel; + +public class TileWorkbench extends TileBaseSlot{ + public boolean isItemValidForSlot(int index, ItemStack stack) { + /*if(index == 0){ + if(RecipeHelper.isOreName(stack.getItem(), "stickTreatedWood") || + RecipeHelper.isOreName(stack.getItem(), "stickLacquer") || + RecipeHelper.isOreName(stack.getItem(), "cordageGeneral")){ + return true; + } + } + if(index == 1){ + if(RecipeHelper.isOreName(stack.getItem(), "stickTreatedWood") || + RecipeHelper.isOreName(stack.getItem(), "stickLacquer") || + RecipeHelper.isOreName(stack.getItem(), "cordageGeneral")){ + return true; + } + }*/ + if(index == 2){ + if(RecipeHelper.isOreName(stack.getItem(), "stickTreatedWood") || RecipeHelper.isOreName(stack.getItem(), "stickLacquer")){ + return true; + } + } + /*if(index == 3){ + if (RecipeHelper.isOreName(stack.getItem(), "cordageGeneral")) { + return true; + } + }*/ + if(index == 3){ + if ( (stack.getItem() instanceof ToolPart)) { + return true; + } + } + if(index == 4){ + if (RecipeHelper.isOreName(stack.getItem(), "pinBasic")) { + return true; + } + } + if(index == 5){ + if(stack.getItem() instanceof CustomAxe || + stack.getItem() instanceof CustomHoe || + stack.getItem() instanceof CustomPickaxe || + stack.getItem() instanceof CustomShovel){ + return true; + } + } + return false; + } +} diff --git a/kfc/src/main/java/nmd/primal/forgecraft/util/ForgeHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/util/ForgeHandler.java index 707d9c66..50e7b48a 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/util/ForgeHandler.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/util/ForgeHandler.java @@ -182,6 +182,20 @@ public interface ForgeHandler { return true; } } + if (RecipeHelper.isOreName(pItem, "ingotWootz")) { + if (tile.getSlotStack(counter).isEmpty()) { + tile.setSlotStack(counter, new ItemStack(ModItems.wootzingotball, 1)); + player.inventory.getCurrentItem().shrink(1); + return true; + } + } + if (RecipeHelper.isOreName(pItem, "nuggetWootz")) { + if (tile.getSlotStack(counter).isEmpty()) { + tile.setSlotStack(counter, new ItemStack(ModItems.wootzchunk, 1)); + player.inventory.getCurrentItem().shrink(1); + return true; + } + } } return false; diff --git a/kfc/src/main/resources/assets/forgecraft/blockstates/toolbench.json b/kfc/src/main/resources/assets/forgecraft/blockstates/toolbench.json new file mode 100644 index 00000000..f4db7186 --- /dev/null +++ b/kfc/src/main/resources/assets/forgecraft/blockstates/toolbench.json @@ -0,0 +1,18 @@ +{ + "forge_marker":1, + "defaults": { + "textures": { + "particle": "blocks/planks_oak", + "texture": "blocks/planks_oak", + "texture1": "blocks/planks_big_oak", + "texture2": "forgecraft:blocks/stone_slab" + }, + "parent": "forgecraft:workbench" + }, + "variants": { + "facing=north": { "model": "forgecraft:workbench" }, + "facing=east": { "model": "forgecraft:workbench", "y": 90 }, + "facing=south": { "model": "forgecraft:workbench", "y": 180 }, + "facing=west": { "model": "forgecraft:workbench", "y": 270 } + } +} \ No newline at end of file diff --git a/kfc/src/main/resources/assets/forgecraft/lang/en_US.lang b/kfc/src/main/resources/assets/forgecraft/lang/en_US.lang index 413e0fd9..846a34e1 100644 --- a/kfc/src/main/resources/assets/forgecraft/lang/en_US.lang +++ b/kfc/src/main/resources/assets/forgecraft/lang/en_US.lang @@ -27,6 +27,8 @@ tile.ironchisel.name=Wrought Iron Chisel tile.copperchisel.name=Copper Chisel tile.bronzechisel.name=Bronze Chisel +tile.toolbench.name=Tool Bench + item.bronzeingotball.name=Bronze Ingot item.bronzechunk.name=Bronze Chunk item.ironingotball.name=Wrought Iron Ingot @@ -154,8 +156,11 @@ jei.category.forgecraft.crucible=Crucible Crafting jei.category.forgecraft.anvil=Anvil Crafting jei.category.forgecraft.casting=Casting jei.category.forgecraft.forging=Forging +jei.category.forgecraft.workbench=Tool Bench +jei.category.forgecraft.toolbench=Tool Bench jei.info.forgecraft.crucible=Crucible Crafting jei.info.forgecraft.anvil=Anvil Crafting jei.info.forgecraft.casting=Casting -jei.info.forgecraft.forging=Forging \ No newline at end of file +jei.info.forgecraft.forging=Forging +jei.info.forgecraft.workbench=Tool Bench \ No newline at end of file diff --git a/kfc/src/main/resources/assets/forgecraft/models/block/FryingPan_Model.json b/kfc/src/main/resources/assets/forgecraft/models/block/FryingPan_Model.json new file mode 100644 index 00000000..fe9dca28 --- /dev/null +++ b/kfc/src/main/resources/assets/forgecraft/models/block/FryingPan_Model.json @@ -0,0 +1,371 @@ +{ + "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "blocks/e_particle", + "texture": "blocks/e_texture" + }, + "elements": [ + { + "__comment": "Box21", + "from": [ 6, 0, 1 ], + "to": [ 10, 1, 2 ], + "faces": { + "down": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture" }, + "up": { "uv": [ 6, 1, 10, 2 ], "texture": "#texture" }, + "north": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" }, + "west": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" }, + "east": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box22", + "from": [ 4, 0, 2 ], + "to": [ 12, 1, 3 ], + "faces": { + "down": { "uv": [ 4, 13, 12, 14 ], "texture": "#texture" }, + "up": { "uv": [ 4, 2, 12, 3 ], "texture": "#texture" }, + "north": { "uv": [ 4, 15, 12, 16 ], "texture": "#texture" }, + "west": { "uv": [ 2, 15, 3, 16 ], "texture": "#texture" }, + "east": { "uv": [ 13, 15, 14, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box21", + "from": [ 2, 0, 5 ], + "to": [ 3, 1, 9 ], + "faces": { + "down": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture", "rotation": 90 }, + "up": { "uv": [ 6, 0, 10, 1 ], "texture": "#texture", "rotation": 270 }, + "north": { "uv": [ 15, 15, 16, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 15, 1, 16 ], "texture": "#texture" }, + "west": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box22", + "from": [ 3, 0, 3 ], + "to": [ 4, 1, 11 ], + "faces": { + "down": { "uv": [ 4, 14, 12, 15 ], "texture": "#texture", "rotation": 90 }, + "up": { "uv": [ 4, 1, 12, 2 ], "texture": "#texture", "rotation": 270 }, + "north": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" }, + "south": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" }, + "west": { "uv": [ 4, 15, 12, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box21", + "from": [ 13, 0, 5 ], + "to": [ 14, 1, 9 ], + "faces": { + "down": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture", "rotation": 270 }, + "up": { "uv": [ 6, 0, 10, 1 ], "texture": "#texture", "rotation": 90 }, + "north": { "uv": [ 0, 15, 1, 16 ], "texture": "#texture" }, + "south": { "uv": [ 15, 15, 16, 16 ], "texture": "#texture" }, + "east": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box22", + "from": [ 12, 0, 3 ], + "to": [ 13, 1, 11 ], + "faces": { + "down": { "uv": [ 4, 14, 12, 15 ], "texture": "#texture", "rotation": 270 }, + "up": { "uv": [ 4, 1, 12, 2 ], "texture": "#texture", "rotation": 90 }, + "north": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" }, + "south": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" }, + "east": { "uv": [ 4, 15, 12, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box21", + "from": [ 6, 0, 12 ], + "to": [ 10, 1, 13 ], + "faces": { + "down": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture", "rotation": 180 }, + "up": { "uv": [ 6, 0, 10, 1 ], "texture": "#texture", "rotation": 180 }, + "south": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" }, + "west": { "uv": [ 15, 15, 16, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 15, 1, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box22", + "from": [ 4, 0, 11 ], + "to": [ 12, 1, 12 ], + "faces": { + "down": { "uv": [ 4, 14, 12, 15 ], "texture": "#texture", "rotation": 180 }, + "up": { "uv": [ 4, 1, 12, 2 ], "texture": "#texture", "rotation": 180 }, + "south": { "uv": [ 4, 15, 12, 16 ], "texture": "#texture" }, + "west": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" }, + "east": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box29", + "from": [ 4, 0, 3 ], + "to": [ 12, 1, 11 ], + "faces": { + "down": { "uv": [ 4, 5, 12, 13 ], "texture": "#texture" }, + "up": { "uv": [ 4, 3, 12, 11 ], "texture": "#texture" } + } + }, + { + "__comment": "Box35", + "from": [ 4, 1, 1 ], + "to": [ 6, 2, 2 ], + "faces": { + "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" }, + "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture" }, + "north": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" }, + "south": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" }, + "west": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" }, + "east": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box35", + "from": [ 10, 1, 1 ], + "to": [ 12, 2, 2 ], + "faces": { + "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" }, + "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture" }, + "north": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" }, + "south": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" }, + "west": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" }, + "east": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box21", + "from": [ 6, 1, 0 ], + "to": [ 10, 2, 1 ], + "faces": { + "down": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" }, + "up": { "uv": [ 6, 0, 10, 1 ], "texture": "#texture" }, + "north": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture" }, + "south": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture" }, + "west": { "uv": [ 0, 14, 1, 15 ], "texture": "#texture" }, + "east": { "uv": [ 15, 14, 16, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box21", + "from": [ 1, 1, 5 ], + "to": [ 2, 2, 9 ], + "faces": { + "down": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture", "rotation": 90 }, + "up": { "uv": [ 6, 1, 10, 2 ], "texture": "#texture", "rotation": 270 }, + "north": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" }, + "south": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" }, + "west": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" }, + "east": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box35", + "from": [ 2, 1, 9 ], + "to": [ 3, 2, 11 ], + "faces": { + "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 90 }, + "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 270 }, + "north": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" }, + "south": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" }, + "west": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" }, + "east": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box35", + "from": [ 2, 1, 3 ], + "to": [ 3, 2, 5 ], + "faces": { + "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 90 }, + "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 270 }, + "north": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" }, + "south": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" }, + "west": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" }, + "east": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box21", + "from": [ 14, 1, 5 ], + "to": [ 15, 2, 9 ], + "faces": { + "down": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture", "rotation": 270 }, + "up": { "uv": [ 6, 1, 10, 2 ], "texture": "#texture", "rotation": 90 }, + "north": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" }, + "south": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" }, + "west": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" }, + "east": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box35", + "from": [ 13, 1, 3 ], + "to": [ 14, 2, 5 ], + "faces": { + "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 270 }, + "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 90 }, + "north": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" }, + "south": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" }, + "west": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" }, + "east": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box35", + "from": [ 13, 1, 9 ], + "to": [ 14, 2, 11 ], + "faces": { + "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 270 }, + "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 90 }, + "north": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" }, + "south": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" }, + "west": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" }, + "east": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box35", + "from": [ 10, 1, 12 ], + "to": [ 12, 2, 13 ], + "faces": { + "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 180 }, + "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 180 }, + "north": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" }, + "south": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" }, + "west": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" }, + "east": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box21", + "from": [ 6, 1, 13 ], + "to": [ 10, 2, 14 ], + "faces": { + "down": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture", "rotation": 180 }, + "up": { "uv": [ 6, 1, 10, 2 ], "texture": "#texture", "rotation": 180 }, + "north": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" }, + "south": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" }, + "west": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" }, + "east": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box35", + "from": [ 4, 1, 12 ], + "to": [ 6, 2, 13 ], + "faces": { + "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 180 }, + "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 180 }, + "north": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" }, + "south": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" }, + "west": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" }, + "east": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box47", + "from": [ 3, 1, 2 ], + "to": [ 4, 2, 3 ], + "faces": { + "down": { "uv": [ 3, 13, 4, 14 ], "texture": "#texture" }, + "up": { "uv": [ 3, 2, 4, 3 ], "texture": "#texture" }, + "north": { "uv": [ 12, 14, 13, 15 ], "texture": "#texture" }, + "south": { "uv": [ 3, 14, 4, 15 ], "texture": "#texture" }, + "west": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" }, + "east": { "uv": [ 13, 14, 14, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box47", + "from": [ 3, 1, 11 ], + "to": [ 4, 2, 12 ], + "faces": { + "down": { "uv": [ 3, 13, 4, 14 ], "texture": "#texture" }, + "up": { "uv": [ 3, 2, 4, 3 ], "texture": "#texture" }, + "north": { "uv": [ 12, 14, 13, 15 ], "texture": "#texture" }, + "south": { "uv": [ 3, 14, 4, 15 ], "texture": "#texture" }, + "west": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" }, + "east": { "uv": [ 13, 14, 14, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box47", + "from": [ 12, 1, 11 ], + "to": [ 13, 2, 12 ], + "faces": { + "down": { "uv": [ 3, 13, 4, 14 ], "texture": "#texture" }, + "up": { "uv": [ 3, 2, 4, 3 ], "texture": "#texture" }, + "north": { "uv": [ 12, 14, 13, 15 ], "texture": "#texture" }, + "south": { "uv": [ 3, 14, 4, 15 ], "texture": "#texture" }, + "west": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" }, + "east": { "uv": [ 13, 14, 14, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box47", + "from": [ 12, 1, 2 ], + "to": [ 13, 2, 3 ], + "faces": { + "down": { "uv": [ 3, 13, 4, 14 ], "texture": "#texture" }, + "up": { "uv": [ 3, 2, 4, 3 ], "texture": "#texture" }, + "north": { "uv": [ 12, 14, 13, 15 ], "texture": "#texture" }, + "south": { "uv": [ 3, 14, 4, 15 ], "texture": "#texture" }, + "west": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" }, + "east": { "uv": [ 13, 14, 14, 15 ], "texture": "#texture" } + } + }, + { + "__comment": "Box51", + "from": [ 7.5, 0, 13 ], + "to": [ 8.5, 1, 21.5 ], + "rotation": { "origin": [ 7.5, 0, 13 ], "axis": "x", "angle": -22.5 }, + "faces": { + "down": { "uv": [ 7.5, 0, 8.5, 3 ], "texture": "#texture" }, + "up": { "uv": [ 7.5, 13, 8.5, 16 ], "texture": "#texture" }, + "south": { "uv": [ 7.5, 15, 8.5, 16 ], "texture": "#texture" }, + "west": { "uv": [ 13, 15, 16, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 15, 3, 16 ], "texture": "#texture" } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ 113, 0, 0 ], + "translation": [ 0, 8, 9.1437 ] + }, + "thirdperson_lefthand": { + "rotation": [ 113, 0, 0 ], + "translation": [ 0, 8, 9.1437 ] + }, + "firstperson_righthand": { + "rotation": [ 113, 0, 0 ], + "translation": [ 0, 8, 9.143 ] + }, + "firstperson_lefthand": { + "rotation": [ 113, 0, 0 ], + "translation": [ 0, 8, 9.143 ] + }, + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 2, 0 ], + "scale": [ 0.625, 0.625, 0.625 ] + }, + "head": { + "rotation": [ 0, 0, 180 ], + "translation": [ 0, 0, 1 ], + "scale": [ 1.1, 1.1, 1.1 ] + }, + "ground": { + "translation": [ 0, 2, 0 ], + "scale": [ 0.25, 0.25, 0.25 ] + }, + "fixed": { + "rotation": [ -90, 180, 0 ], + "translation": [ 0, 0, -7 ] + } + } +} \ No newline at end of file diff --git a/kfc/src/main/resources/assets/forgecraft/models/block/displayrack.json b/kfc/src/main/resources/assets/forgecraft/models/block/displayrack.json new file mode 100644 index 00000000..346c9ebc --- /dev/null +++ b/kfc/src/main/resources/assets/forgecraft/models/block/displayrack.json @@ -0,0 +1,175 @@ +{ + "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "blocks/e_particle", + "texture": "blocks/stone_slab", + "texture1": "blocks/planks_oak" + }, + "elements": [ + { + "__comment": "Box1", + "from": [ 0, 0, 0 ], + "to": [ 16, 2, 6 ], + "faces": { + "down": { "uv": [ 0, 10, 16, 16 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0, 16, 6 ], "texture": "#texture" }, + "north": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" }, + "west": { "uv": [ 0, 14, 6, 16 ], "texture": "#texture" }, + "east": { "uv": [ 10, 14, 16, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box2", + "from": [ 2, 2, 0.5 ], + "to": [ 3, 13, 1.5 ], + "faces": { + "down": { "uv": [ 3.5, 15, 4.5, 16 ], "texture": "#texture1" }, + "up": { "uv": [ 3.5, 0, 4.5, 1 ], "texture": "#texture1" }, + "north": { "uv": [ 11.5, 3, 12.5, 14 ], "texture": "#texture1" }, + "south": { "uv": [ 3.5, 3, 4.5, 14 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 3, 1, 14 ], "texture": "#texture1" }, + "east": { "uv": [ 15, 3, 16, 14 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box2", + "from": [ 13, 2, 0.5 ], + "to": [ 14, 13, 1.5 ], + "faces": { + "down": { "uv": [ 3.5, 15, 4.5, 16 ], "texture": "#texture1" }, + "up": { "uv": [ 3.5, 0, 4.5, 1 ], "texture": "#texture1" }, + "north": { "uv": [ 11.5, 3, 12.5, 14 ], "texture": "#texture1" }, + "south": { "uv": [ 3.5, 3, 4.5, 14 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 3, 1, 14 ], "texture": "#texture1" }, + "east": { "uv": [ 15, 3, 16, 14 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box4", + "from": [ 1, 12, 0.5 ], + "to": [ 2, 13, 3.5 ], + "faces": { + "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" }, + "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" }, + "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" }, + "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" }, + "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box4", + "from": [ 3, 12, 0.5 ], + "to": [ 4, 13, 3.5 ], + "faces": { + "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" }, + "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" }, + "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" }, + "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" }, + "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box4", + "from": [ 14, 12, 0.5 ], + "to": [ 15, 13, 3.5 ], + "faces": { + "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" }, + "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" }, + "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" }, + "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" }, + "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box4", + "from": [ 12, 12, 0.5 ], + "to": [ 13, 13, 3.5 ], + "faces": { + "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" }, + "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" }, + "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" }, + "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" }, + "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box2", + "from": [ 7.5, 2, 0.5 ], + "to": [ 8.5, 13, 1.5 ], + "faces": { + "down": { "uv": [ 3.5, 15, 4.5, 16 ], "texture": "#texture1" }, + "up": { "uv": [ 3.5, 0, 4.5, 1 ], "texture": "#texture1" }, + "north": { "uv": [ 11.5, 3, 12.5, 14 ], "texture": "#texture1" }, + "south": { "uv": [ 3.5, 3, 4.5, 14 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 3, 1, 14 ], "texture": "#texture1" }, + "east": { "uv": [ 15, 3, 16, 14 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box4", + "from": [ 6.5, 12, 0.5 ], + "to": [ 7.5, 13, 3.5 ], + "faces": { + "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" }, + "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" }, + "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" }, + "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" }, + "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box4", + "from": [ 8.5, 12, 0.5 ], + "to": [ 9.5, 13, 3.5 ], + "faces": { + "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" }, + "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" }, + "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" }, + "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" }, + "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ 75, 45, 0 ], + "translation": [ 2.75, 1.8, 2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "thirdperson_lefthand": { + "rotation": [ 75, 45, 0 ], + "translation": [ 2.75, 1.8, 2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 45, 0 ], + "translation": [ 0, 1, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 45, 0 ], + "translation": [ 0, 1, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 2.19, -0.655, 0 ], + "scale": [ 0.625, 0.625, 0.625 ] + }, + "ground": { + "translation": [ 0, 3, 0 ], + "scale": [ 0.25, 0.25, 0.25 ] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, -5.6 ] + } + } +} \ No newline at end of file diff --git a/kfc/src/main/resources/assets/forgecraft/models/block/workbench.json b/kfc/src/main/resources/assets/forgecraft/models/block/workbench.json new file mode 100644 index 00000000..41b0458c --- /dev/null +++ b/kfc/src/main/resources/assets/forgecraft/models/block/workbench.json @@ -0,0 +1,392 @@ +{ + "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "blocks/planks_oak", + "texture": "blocks/planks_oak", + "texture1": "blocks/planks_big_oak", + "texture2": "forgecraft:blocks/stone_slab" + }, + "elements": [ + { + "__comment": "Box11", + "from": [ 0, 8, 0 ], + "to": [ 16, 10, 8 ], + "faces": { + "down": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture2" }, + "up": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture2" }, + "north": { "uv": [ 0, 6, 16, 8 ], "texture": "#texture2" }, + "south": { "uv": [ 0, 6, 16, 8 ], "texture": "#texture2" }, + "west": { "uv": [ 0, 6, 8, 8 ], "texture": "#texture2" }, + "east": { "uv": [ 8, 6, 16, 8 ], "texture": "#texture2" } + } + }, + { + "__comment": "Box12", + "from": [ 0, 10, 0 ], + "to": [ 13.5, 10.5, 8 ], + "faces": { + "up": { "uv": [ 0, 2, 13.5, 10 ], "texture": "#texture1" }, + "north": { "uv": [ 2.5, 5.5, 16, 6 ], "texture": "#texture1" }, + "south": { "uv": [ 0, 5.5, 13.5, 6 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 5.5, 8, 6 ], "texture": "#texture1" }, + "east": { "uv": [ 8, 5.5, 16, 6 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box17", + "from": [ 0, 11, 0 ], + "to": [ 11.5, 11.5, 3 ], + "faces": { + "up": { "uv": [ 0, 8, 11.5, 11 ], "texture": "#texture1" }, + "north": { "uv": [ 4.5, 4.5, 16, 5 ], "texture": "#texture1" }, + "south": { "uv": [ 0, 4.5, 11.5, 5 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 4.5, 3, 5 ], "texture": "#texture1" }, + "east": { "uv": [ 11, 4.5, 14, 5 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box17", + "from": [ 0, 11, 4.5 ], + "to": [ 11.5, 11.5, 8 ], + "faces": { + "up": { "uv": [ 0, 12, 11.5, 15.5 ], "texture": "#texture1" }, + "north": { "uv": [ 4.5, 4.5, 16, 5 ], "texture": "#texture1" }, + "south": { "uv": [ 0, 4.5, 11.5, 5 ], "texture": "#texture1" }, + "west": { "uv": [ 4.5, 4.5, 8, 5 ], "texture": "#texture1" }, + "east": { "uv": [ 8, 4.5, 11.5, 5 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box19", + "from": [ 0, 11, 3 ], + "to": [ 1, 12, 4.5 ], + "faces": { + "up": { "uv": [ 0, 3, 1, 4.5 ], "texture": "#texture1" }, + "north": { "uv": [ 15, 4, 16, 5 ], "texture": "#texture1" }, + "south": { "uv": [ 0, 4, 1, 5 ], "texture": "#texture1" }, + "west": { "uv": [ 3, 4, 4.5, 5 ], "texture": "#texture1" }, + "east": { "uv": [ 11.5, 4, 13, 5 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box12", + "from": [ 0, 10.5, 0 ], + "to": [ 12.5, 11, 8 ], + "faces": { + "up": { "uv": [ 3.5, 6.5, 16, 14.5 ], "texture": "#texture1" }, + "north": { "uv": [ 3.5, 5, 16, 5.5 ], "texture": "#texture1" }, + "south": { "uv": [ 0, 5, 12.5, 5.5 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 5, 8, 5.5 ], "texture": "#texture1" }, + "east": { "uv": [ 8, 5, 16, 5.5 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box17", + "from": [ 0, 11.5, 4.5 ], + "to": [ 10.5, 12, 8 ], + "faces": { + "up": { "uv": [ 0, 0, 3.5, 10.5 ], "texture": "#texture1", "rotation": 90 }, + "north": { "uv": [ 5.5, 4, 16, 4.5 ], "texture": "#texture1" }, + "south": { "uv": [ 0, 4, 10.5, 4.5 ], "texture": "#texture1" }, + "west": { "uv": [ 4.5, 4, 8, 4.5 ], "texture": "#texture1" }, + "east": { "uv": [ 8, 4, 11.5, 4.5 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box17", + "from": [ 0, 11.5, 0 ], + "to": [ 10.5, 12, 3 ], + "faces": { + "up": { "uv": [ 0, 0, 10.5, 3 ], "texture": "#texture1" }, + "north": { "uv": [ 5.5, 4, 16, 4.5 ], "texture": "#texture1" }, + "south": { "uv": [ 0, 4, 10.5, 4.5 ], "texture": "#texture1" }, + "west": { "uv": [ 0, 4, 3, 4.5 ], "texture": "#texture1" }, + "east": { "uv": [ 5, 8, 8, 8.5 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box17", + "from": [ 0, 0, 0 ], + "to": [ 2, 8, 2 ], + "faces": { + "down": { "uv": [ 0, 14, 2, 16 ], "texture": "#texture" }, + "north": { "uv": [ 8, 8, 10, 16 ], "texture": "#texture" }, + "south": { "uv": [ 10, 8, 12, 16 ], "texture": "#texture" }, + "west": { "uv": [ 12, 8, 14, 16 ], "texture": "#texture" }, + "east": { "uv": [ 14, 8, 16, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box17", + "from": [ 14, 0, 0 ], + "to": [ 16, 8, 2 ], + "faces": { + "down": { "uv": [ 14, 14, 16, 16 ], "texture": "#texture" }, + "north": { "uv": [ 0, 8, 2, 16 ], "texture": "#texture" }, + "south": { "uv": [ 2.5, 8, 4.5, 16 ], "texture": "#texture" }, + "west": { "uv": [ 4, 8, 6, 16 ], "texture": "#texture" }, + "east": { "uv": [ 6, 8, 8, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box17", + "from": [ 0, 0, 6 ], + "to": [ 2, 8, 8 ], + "faces": { + "down": { "uv": [ 0, 8, 2, 10 ], "texture": "#texture" }, + "north": { "uv": [ 14, 0, 16, 8 ], "texture": "#texture" }, + "south": { "uv": [ 12, 0, 14, 8 ], "texture": "#texture" }, + "west": { "uv": [ 10, 0, 12, 8 ], "texture": "#texture" }, + "east": { "uv": [ 8, 0, 10, 8 ], "texture": "#texture" } + } + }, + { + "__comment": "Box17", + "from": [ 14, 0, 6 ], + "to": [ 16, 8, 8 ], + "faces": { + "down": { "uv": [ 14, 8, 16, 10 ], "texture": "#texture" }, + "north": { "uv": [ 0, 0, 2, 8 ], "texture": "#texture" }, + "south": { "uv": [ 2, 0, 4, 8 ], "texture": "#texture" }, + "west": { "uv": [ 4, 0, 6, 8 ], "texture": "#texture" }, + "east": { "uv": [ 6, 0, 8, 8 ], "texture": "#texture" } + } + }, + { + "__comment": "Box21", + "from": [ 2, 1, 0.5 ], + "to": [ 14, 2, 1.5 ], + "faces": { + "down": { "uv": [ 3, 9, 15, 10 ], "texture": "#texture1" }, + "up": { "uv": [ 2, 6, 14, 7 ], "texture": "#texture1" }, + "north": { "uv": [ 2, 14, 14, 15 ], "texture": "#texture1" }, + "south": { "uv": [ 2, 14, 14, 15 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box21", + "from": [ 2, 1, 6.5 ], + "to": [ 14, 2, 7.5 ], + "faces": { + "down": { "uv": [ 2, 8.5, 14, 9.5 ], "texture": "#texture1" }, + "up": { "uv": [ 2, 6, 14, 7 ], "texture": "#texture1" }, + "north": { "uv": [ 2, 14, 14, 15 ], "texture": "#texture1" }, + "south": { "uv": [ 2, 14, 14, 15 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 0.5, 1, 2 ], + "to": [ 1.5, 2, 6 ], + "faces": { + "down": { "uv": [ 0.5, 10, 1.5, 14 ], "texture": "#texture1" }, + "up": { "uv": [ 0, 0, 1, 4 ], "texture": "#texture1" }, + "west": { "uv": [ 2, 14, 6, 15 ], "texture": "#texture1" }, + "east": { "uv": [ 10, 14, 14, 15 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 14.5, 1, 2 ], + "to": [ 15.5, 2, 6 ], + "faces": { + "down": { "uv": [ 14.5, 10, 15.5, 14 ], "texture": "#texture1" }, + "up": { "uv": [ 14.5, 6, 15.5, 10 ], "texture": "#texture1" }, + "west": { "uv": [ 2, 14, 6, 15 ], "texture": "#texture1" }, + "east": { "uv": [ 10, 14, 14, 15 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 2.5, 1, 1.5 ], + "to": [ 3.5, 2, 6.5 ], + "faces": { + "down": { "uv": [ 2.5, 9.5, 3.5, 14.5 ], "texture": "#texture1" }, + "up": { "uv": [ 0, 4, 1, 9 ], "texture": "#texture1" }, + "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" }, + "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 4.5, 1, 1.5 ], + "to": [ 5.5, 2, 6.5 ], + "faces": { + "down": { "uv": [ 4.5, 9.5, 5.5, 14.5 ], "texture": "#texture1" }, + "up": { "uv": [ 0, 9, 1, 14 ], "texture": "#texture1" }, + "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" }, + "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 6.5, 1, 1.5 ], + "to": [ 7.5, 2, 6.5 ], + "faces": { + "down": { "uv": [ 6.5, 9.5, 7.5, 14.5 ], "texture": "#texture1" }, + "up": { "uv": [ 1, 0, 2, 5 ], "texture": "#texture1" }, + "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" }, + "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 8.5, 1, 1.5 ], + "to": [ 9.5, 2, 6.5 ], + "faces": { + "down": { "uv": [ 8.5, 9.5, 9.5, 14.5 ], "texture": "#texture1" }, + "up": { "uv": [ 1, 5, 2, 10 ], "texture": "#texture1" }, + "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" }, + "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 10.5, 1, 1.5 ], + "to": [ 11.5, 2, 6.5 ], + "faces": { + "down": { "uv": [ 10.5, 9.5, 11.5, 14.5 ], "texture": "#texture1" }, + "up": { "uv": [ 1, 10, 2, 15 ], "texture": "#texture1" }, + "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" }, + "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 12.5, 1, 1.5 ], + "to": [ 13.5, 2, 6.5 ], + "faces": { + "down": { "uv": [ 12.5, 9.5, 13.5, 14.5 ], "texture": "#texture1" }, + "up": { "uv": [ 2, 0, 3, 5 ], "texture": "#texture1" }, + "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" }, + "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 0.5, 3.5, 2 ], + "to": [ 1.5, 4.5, 6 ], + "faces": { + "down": { "uv": [ 0.5, 10, 1.5, 14 ], "texture": "#texture1" }, + "up": { "uv": [ 3, 2, 4, 6 ], "texture": "#texture1" }, + "west": { "uv": [ 2, 11, 6, 12 ], "texture": "#texture1" }, + "east": { "uv": [ 10, 11, 14, 12 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 0.5, 6, 2 ], + "to": [ 1.5, 7, 6 ], + "faces": { + "down": { "uv": [ 0.5, 10, 1.5, 14 ], "texture": "#texture1" }, + "up": { "uv": [ 7, 0, 8, 4 ], "texture": "#texture1" }, + "west": { "uv": [ 2, 10, 6, 11 ], "texture": "#texture1" }, + "east": { "uv": [ 10, 10, 14, 11 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 14.5, 3.5, 2 ], + "to": [ 15.5, 4.5, 6 ], + "faces": { + "down": { "uv": [ 0.5, 10, 1.5, 14 ], "texture": "#texture1" }, + "up": { "uv": [ 7, 0, 8, 4 ], "texture": "#texture1" }, + "west": { "uv": [ 2, 10, 6, 11 ], "texture": "#texture1" }, + "east": { "uv": [ 10, 10, 14, 11 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box23", + "from": [ 14.5, 6, 2 ], + "to": [ 15.5, 7, 6 ], + "faces": { + "down": { "uv": [ 0.5, 10, 1.5, 14 ], "texture": "#texture1" }, + "up": { "uv": [ 3, 2, 4, 6 ], "texture": "#texture1" }, + "west": { "uv": [ 2, 11, 6, 12 ], "texture": "#texture1" }, + "east": { "uv": [ 10, 11, 14, 12 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box21", + "from": [ 2, 3.5, 0.5 ], + "to": [ 14, 4.5, 1.5 ], + "faces": { + "down": { "uv": [ 2, 14.5, 14, 15.5 ], "texture": "#texture1" }, + "up": { "uv": [ 2, 1, 14, 2 ], "texture": "#texture1" }, + "north": { "uv": [ 2, 12, 14, 13 ], "texture": "#texture1" }, + "south": { "uv": [ 2, 10, 14, 11 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box21", + "from": [ 2, 6, 0.5 ], + "to": [ 14, 7, 1.5 ], + "faces": { + "down": { "uv": [ 2, 14.5, 14, 15.5 ], "texture": "#texture1" }, + "up": { "uv": [ 3, 5, 15, 6 ], "texture": "#texture1" }, + "north": { "uv": [ 2, 9, 14, 10 ], "texture": "#texture1" }, + "south": { "uv": [ 2, 9, 14, 10 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box37", + "from": [ 0.5, 8.5, 8 ], + "to": [ 1, 9.5, 9 ], + "faces": { + "down": { "uv": [ 0.5, 7, 1, 8 ], "texture": "#texture1" }, + "up": { "uv": [ 0.5, 8, 1, 9 ], "texture": "#texture1" }, + "north": { "uv": [ 15, 6.5, 15.5, 7.5 ], "texture": "#texture1" }, + "south": { "uv": [ 0.5, 6.5, 1, 7.5 ], "texture": "#texture1" }, + "west": { "uv": [ 8, 6.5, 9, 7.5 ], "texture": "#texture1" }, + "east": { "uv": [ 7, 6.5, 8, 7.5 ], "texture": "#texture1" } + } + }, + { + "__comment": "Box37", + "from": [ 2, 8.5, 8 ], + "to": [ 2.5, 9.5, 9 ], + "faces": { + "down": { "uv": [ 2, 7, 2.5, 8 ], "texture": "#texture1" }, + "up": { "uv": [ 2, 8, 2.5, 9 ], "texture": "#texture1" }, + "north": { "uv": [ 13.5, 6.5, 14, 7.5 ], "texture": "#texture1" }, + "south": { "uv": [ 2, 6.5, 2.5, 7.5 ], "texture": "#texture1" }, + "west": { "uv": [ 8, 6.5, 9, 7.5 ], "texture": "#texture1" }, + "east": { "uv": [ 7, 6.5, 8, 7.5 ], "texture": "#texture1" } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ 75, 45, 0 ], + "translation": [ 2.0869, 1.1086, 0.6956 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "thirdperson_lefthand": { + "rotation": [ 75, 45, 0 ], + "translation": [ 2.0869, 1.1086, 0.6956 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, -45, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, -45, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 1.3916, 0, 0 ], + "scale": [ 0.625, 0.625, 0.625 ] + }, + "ground": { + "translation": [ 0, 3, 0 ], + "scale": [ 0.25, 0.25, 0.25 ] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, -2.781 ], + "scale": [ 0.5, 0.5, 0.5 ] + } + } +} \ No newline at end of file diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/axe.json b/kfc/src/main/resources/assets/forgecraft/models/item/axe.json index c79e657e..dd83aab9 100644 --- a/kfc/src/main/resources/assets/forgecraft/models/item/axe.json +++ b/kfc/src/main/resources/assets/forgecraft/models/item/axe.json @@ -1,11 +1,11 @@ { "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", "textures": { - "particle": "forgecraft:items/iron_ingot", + "particle": "items/iron_ingot", "texture": "blocks/planks_oak", - "texture1": "forgecraft:items/iron_ingot" + "texture1": "items/iron_ingot" }, - "elements": [ + "elements": [ { "__comment": "Cube1", "from": [ 8, 0, 7.5 ], @@ -93,6 +93,10 @@ "rotation": [ 0, 0, -45 ], "translation": [ -0.75, 0, 8 ] }, + "head": { + "rotation": [ -90, 0, 0 ], + "translation": [ 5.69, 7.2, -1.3 ] + }, "ground": { "rotation": [ 90, 0, 0 ], "translation": [ 0, -3.5, 0 ] diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/axehead.json b/kfc/src/main/resources/assets/forgecraft/models/item/axehead.json index 6953ed63..b12d2443 100644 --- a/kfc/src/main/resources/assets/forgecraft/models/item/axehead.json +++ b/kfc/src/main/resources/assets/forgecraft/models/item/axehead.json @@ -1,11 +1,11 @@ { "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", "textures": { - "particle": "forgecraft:items/iron_ingot", + "particle": "items/iron_ingot", "texture": "blocks/planks_oak", - "texture1": "forgecraft:items/iron_ingot" + "texture1": "items/iron_ingot" }, - "elements": [ + "elements": [ { "__comment": "Cube6", "from": [ 8, 0, 6.5 ], @@ -81,6 +81,9 @@ "translation": [ -0.25, 0, 8 ], "scale": [ 2, 2, 2 ] }, + "head": { + "translation": [ 0, 14.4, -5.2 ] + }, "ground": { "translation": [ 0, 4, 0 ] }, diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/craftinghammer.json b/kfc/src/main/resources/assets/forgecraft/models/item/craftinghammer.json new file mode 100644 index 00000000..24c6ad70 --- /dev/null +++ b/kfc/src/main/resources/assets/forgecraft/models/item/craftinghammer.json @@ -0,0 +1,104 @@ +{ + "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "blocks/e_particle", + "texture": "blocks/e_texture" + }, + "elements": [ + { + "__comment": "Box1", + "from": [ 7, 0, 7.5 ], + "to": [ 8.5, 6, 8.5 ], + "faces": { + "down": { "uv": [ 7, 7.5, 8.5, 8.5 ], "texture": "#texture" }, + "up": { "uv": [ 7, 7.5, 8.5, 8.5 ], "texture": "#texture" }, + "north": { "uv": [ 7.5, 10, 9, 16 ], "texture": "#texture" }, + "south": { "uv": [ 7, 10, 8.5, 16 ], "texture": "#texture" }, + "west": { "uv": [ 7.5, 10, 8.5, 16 ], "texture": "#texture" }, + "east": { "uv": [ 7.5, 10, 8.5, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box2", + "from": [ 7.5, 5, 7 ], + "to": [ 8, 5.5, 7.5 ], + "faces": { + "down": { "uv": [ 7.5, 8.5, 8, 9 ], "texture": "#texture" }, + "up": { "uv": [ 7.5, 7, 8, 7.5 ], "texture": "#texture" }, + "north": { "uv": [ 8, 10.5, 8.5, 11 ], "texture": "#texture" }, + "south": { "uv": [ 7.5, 10.5, 8, 11 ], "texture": "#texture" }, + "west": { "uv": [ 7, 10.5, 7.5, 11 ], "texture": "#texture" }, + "east": { "uv": [ 8.5, 10.5, 9, 11 ], "texture": "#texture" } + } + }, + { + "__comment": "Box3", + "from": [ 7, 4.5, 6.5 ], + "to": [ 8.5, 6, 7 ], + "faces": { + "down": { "uv": [ 7, 9, 8.5, 9.5 ], "texture": "#texture" }, + "up": { "uv": [ 7, 6.5, 8.5, 7 ], "texture": "#texture" }, + "north": { "uv": [ 7.5, 10, 9, 11.5 ], "texture": "#texture" }, + "south": { "uv": [ 7, 10, 8.5, 11.5 ], "texture": "#texture" }, + "west": { "uv": [ 6.5, 10, 7, 11.5 ], "texture": "#texture" }, + "east": { "uv": [ 9, 10, 9.5, 11.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Box4", + "from": [ 7, 5.5, 8 ], + "to": [ 7.5, 6, 9.5 ], + "rotation": { "origin": [ 7, 5.5, 8 ], "axis": "x", "angle": 22.5 }, + "faces": { + "down": { "uv": [ 7, 6, 7.5, 7.5 ], "texture": "#texture" }, + "up": { "uv": [ 7, 8.5, 7.5, 10 ], "texture": "#texture" }, + "north": { "uv": [ 8.5, 10, 9, 10.5 ], "texture": "#texture" }, + "south": { "uv": [ 7, 10, 7.5, 10.5 ], "texture": "#texture" }, + "west": { "uv": [ 8.5, 10, 10, 10.5 ], "texture": "#texture" }, + "east": { "uv": [ 6, 10, 7.5, 10.5 ], "texture": "#texture" } + } + }, + { + "__comment": "Box4", + "from": [ 8, 5.5, 8 ], + "to": [ 8.5, 6, 9.5 ], + "rotation": { "origin": [ 7, 5.5, 8 ], "axis": "x", "angle": 22.5 }, + "faces": { + "down": { "uv": [ 7, 6.5, 7.5, 7.5 ], "texture": "#texture" }, + "up": { "uv": [ 7, 8.5, 7.5, 9.5 ], "texture": "#texture" }, + "north": { "uv": [ 8.5, 15, 9, 16 ], "texture": "#texture" }, + "south": { "uv": [ 7, 15, 7.5, 16 ], "texture": "#texture" }, + "west": { "uv": [ 8.5, 15, 9.5, 16 ], "texture": "#texture" }, + "east": { "uv": [ 6.5, 15, 7.5, 16 ], "texture": "#texture" } + } + } + ], + "display": { + "thirdperson_righthand": { + "translation": [ 0, 6, 0.6 ] + }, + "thirdperson_lefthand": { + "translation": [ 0, 6, 0.6 ] + }, + "firstperson_righthand": { + "translation": [ 1.13, 6.7, 1.13 ], + "scale": [ 0.7, 1, 1 ] + }, + "firstperson_lefthand": { + "translation": [ 1.13, 6.7, 1.13 ], + "scale": [ 0.7, 1, 1 ] + }, + "gui": { + "rotation": [ 0, 90, 0 ], + "translation": [ 0, 4.5, 0 ] + }, + "ground": { + "translation": [ 0, 2, 0 ], + "scale": [ 0.5, 0.5, 0.5 ] + }, + "fixed": { + "rotation": [ 0, -90, 0 ], + "translation": [ 0, 4, 0 ] + } + } +} \ No newline at end of file diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/hoe.json b/kfc/src/main/resources/assets/forgecraft/models/item/hoe.json index 023df93e..631d7807 100644 --- a/kfc/src/main/resources/assets/forgecraft/models/item/hoe.json +++ b/kfc/src/main/resources/assets/forgecraft/models/item/hoe.json @@ -1,11 +1,11 @@ { "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", "textures": { - "particle": "forgecraft:items/iron_ingot", + "particle": "items/iron_ingot", "texture": "blocks/planks_oak", - "texture1": "forgecraft:items/iron_ingot" + "texture1": "items/iron_ingot" }, - "elements": [ + "elements": [ { "__comment": "Cube2", "from": [ 7, 13, 3 ], @@ -110,6 +110,10 @@ "gui": { "rotation": [ 90, 45, -90 ] }, + "head": { + "rotation": [ -90, 90, 0 ], + "translation": [ 6.16, 7.2, -1.33 ] + }, "ground": { "rotation": [ 90, 90, 0 ], "translation": [ 0, -3, 0 ] diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/hoehead.json b/kfc/src/main/resources/assets/forgecraft/models/item/hoehead.json index 5b91de19..864389ba 100644 --- a/kfc/src/main/resources/assets/forgecraft/models/item/hoehead.json +++ b/kfc/src/main/resources/assets/forgecraft/models/item/hoehead.json @@ -1,11 +1,11 @@ { "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", "textures": { - "particle": "forgecraft:items/iron_ingot", - "texture": "forgecraft:items/iron_ingot", - "texture1": "forgecraft:items/iron_ingot" + "particle": "items/iron_ingot", + "texture": "items/iron_ingot", + "texture1": "items/iron_ingot" }, - "elements": [ + "elements": [ { "__comment": "Cube2", "from": [ 5.5, 0, 7 ], @@ -107,6 +107,9 @@ "gui": { "translation": [ -0.25, 7, 8 ] }, + "head": { + "translation": [ -2.75, 14.208, -5.7 ] + }, "ground": { "translation": [ 0, 4, 0 ] }, diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/pickaxe.json b/kfc/src/main/resources/assets/forgecraft/models/item/pickaxe.json index fd0268c3..c01a7abd 100644 --- a/kfc/src/main/resources/assets/forgecraft/models/item/pickaxe.json +++ b/kfc/src/main/resources/assets/forgecraft/models/item/pickaxe.json @@ -1,11 +1,11 @@ { "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", "textures": { - "particle": "forgecraft:items/iron_ingot", + "particle": "items/iron_ingot", "texture": "blocks/planks_oak", - "texture1": "forgecraft:items/iron_ingot" + "texture1": "items/iron_ingot" }, - "elements": [ + "elements": [ { "__comment": "Cube1", "from": [ 7.5, 0, 7 ], @@ -86,6 +86,10 @@ "rotation": [ 90, 45, -90 ], "translation": [ -0.75, -0.75, 0 ] }, + "head": { + "rotation": [ -90, 90, 0 ], + "translation": [ 6.18, 7.17, -1.3 ] + }, "ground": { "rotation": [ 0, 0, 90 ], "translation": [ 0, -3, 0 ] diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/pickaxehead.json b/kfc/src/main/resources/assets/forgecraft/models/item/pickaxehead.json index 7586ae5a..85c19543 100644 --- a/kfc/src/main/resources/assets/forgecraft/models/item/pickaxehead.json +++ b/kfc/src/main/resources/assets/forgecraft/models/item/pickaxehead.json @@ -1,11 +1,11 @@ { "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", "textures": { - "particle": "forgecraft:items/iron_ingot", + "particle": "items/iron_ingot", "texture": "blocks/planks_oak", - "texture1": "forgecraft:items/iron_ingot" + "texture1": "items/iron_ingot" }, - "elements": [ + "elements": [ { "__comment": "Cube4", "from": [ 7, 13, 4.5 ], @@ -100,6 +100,10 @@ "rotation": [ 90, -45, 90 ], "translation": [ 3.5, -3.5, 0 ] }, + "head": { + "rotation": [ 0, -90, 90 ], + "translation": [ 0, 7.2, -0.7 ] + }, "ground": { "rotation": [ 180, 0, 0 ], "translation": [ 0, 2, 0 ] diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/shovel.json b/kfc/src/main/resources/assets/forgecraft/models/item/shovel.json index c965a65d..055f7bfb 100644 --- a/kfc/src/main/resources/assets/forgecraft/models/item/shovel.json +++ b/kfc/src/main/resources/assets/forgecraft/models/item/shovel.json @@ -5,7 +5,7 @@ "texture": "items/iron_ingot", "texture1": "blocks/e_texture" }, - "elements": [ + "elements": [ { "__comment": "Cube1", "from": [ 7, 12.5, 7.5 ], @@ -149,6 +149,10 @@ "gui": { "rotation": [ 0, 0, -45 ] }, + "head": { + "rotation": [ -90, 0, 0 ], + "translation": [ 6.17, 7.17, -1.33 ] + }, "ground": { "rotation": [ 90, 180, 0 ], "translation": [ 0, -2, 0 ] diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/shovelhead.json b/kfc/src/main/resources/assets/forgecraft/models/item/shovelhead.json index bf8617d9..d2398d1a 100644 --- a/kfc/src/main/resources/assets/forgecraft/models/item/shovelhead.json +++ b/kfc/src/main/resources/assets/forgecraft/models/item/shovelhead.json @@ -1,11 +1,11 @@ { "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", "textures": { - "particle": "forgecraft:items/iron_ingot", + "particle": "items/iron_ingot", "texture": "blocks/planks_oak", - "texture1": "forgecraft:items/iron_ingot" + "texture1": "items/iron_ingot" }, - "elements": [ + "elements": [ { "__comment": "Cube1", "from": [ 7, -0.5, 5 ], @@ -147,6 +147,9 @@ "rotation": [ 90, 0, 0 ], "translation": [ -0.25, 0, 8 ] }, + "head": { + "translation": [ 0, 15.304, -6.7 ] + }, "ground": { "translation": [ 0, 4, 0 ] }, diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/toolbench.json b/kfc/src/main/resources/assets/forgecraft/models/item/toolbench.json new file mode 100644 index 00000000..080e0be8 --- /dev/null +++ b/kfc/src/main/resources/assets/forgecraft/models/item/toolbench.json @@ -0,0 +1,10 @@ +{ + "forge_marker":1, + "textures": { + "particle": "blocks/planks_oak", + "texture": "blocks/planks_oak", + "texture1": "blocks/planks_big_oak", + "texture2": "forgecraft:blocks/stone_slab" + }, + "parent": "forgecraft:block/workbench" +} \ No newline at end of file diff --git a/kfc/src/main/resources/assets/forgecraft/textures/blocks/planks_big_oak.png b/kfc/src/main/resources/assets/forgecraft/textures/blocks/planks_big_oak.png new file mode 100644 index 0000000000000000000000000000000000000000..9a9a3a4b31645536e40ea8e0e72f927fcbe596a8 GIT binary patch literal 240 zcmV&u*2A#dB%5R=seNAeeVc~>w>jR+7``*y zXB@mdFTWEHGhp|#NuYv}l#4VS%#ZU9cyI-d<5=ryfII9=5#3nN$y6$Bj5#TeTtH32 zDvnu`t_B(I$os(5!W7iJ`H`a0XrL-odyxe-@Kap>?L(=7nm>0Erhrz|n0k63nfw=W q0$!?e4;<@sJ^10C`A@e~(BKOLZ+0GTIBrJ(0000T3Dox3KvB)duN`J}|W~1vPJeq-Zo6s0!6yWI+x56xVv&&z*!RpcOTy xo*qah|Am}@m#W+Y$74GF_~D-UpAJLNUWUc@J literal 0 HcmV?d00001 diff --git a/kfc/src/main/resources/assets/forgecraft/textures/gui/jei/workbench.png b/kfc/src/main/resources/assets/forgecraft/textures/gui/jei/workbench.png new file mode 100644 index 0000000000000000000000000000000000000000..a6e8de60e4f3471e7b411399a6cc8caaa7e82512 GIT binary patch literal 1156 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6&6|H(?D8gCb z5n0T@z%2~Ij105pNB{-dOFVsD*&lK7aZ0H4{Il4@z`!Et>EaktaqI0}!@gAxG6x=h zJZc>G*%Y>$IMBiO04Z#M{^Y zJ@owZ&DGN`7`6zsB}UXNSohlL_O_dH+&>f<`W+*aWR4f?zPrgz?8BS>UZ?NWj52fB3iuf`KFS?1;Muo8D25T;({SH|87a>tn$~V#5YjHOc(a4iHkQ*5xDq7V zjhX{Y|G(fW8JJO;dxU?r&*gJy2rY2yV zZD79sy7aq#6lb;z15XEs0>k>%tFpc`2OW~C+<)~y_k>@*k)c;FH~3r@StDpC((pe2 zg3Ld!V-km-7HxF<;leO$8E0v%dh`XG^YQlc{g!X%aRV9j&-?!Olj5f5KS#4KZZQpN zi@nF9lW4$W&-9^Li0v>iYTD!>&TY8AN&Z0Jja$9p5GOuEixoWK>~JuL%PVO6?X#X7 zFTc5!urk;&A*+7V_ng7wR5|l5CI%tPJMYWW841N2fr!A28l*&zDM_9PO^kHt{Kq8a Wah6GHMyVYG5O})!xvXWFU8GbZ8()Nlj2>E@cM*03Pc}L_t(|+UF^^c`+jx0eKh$Ut$!aMl?jl2WnXHo9k<-QHdZ5f(e7jhY2FE)PZ4{2%;zw zml)#$#1B+7pNJu%1Q0`X90ddhX1L7jzWVm7s?OQpAN{KCuI{c!cip~sYR@`r`gV0y zoyUHkef9=YNFjw3Qb-|%6jDebg%naqA%%kqzWc4~@u|N%&G*{v-@1NPjPc8#yEI+s z6h;y#=@)+U%U5kREbCW>VLoG8)-#76{fCbo|ALnmR?CFmaP?=t@zfKKzSFcaQqwf( zx&d9+DPx&=O*eLGn)bA=8@qMgcv3U;8N)DlnO0`knsw`E{`^&MI&d%{-xoe}AwK-^ zPp4G4nh5=Ur@T13=jmNVyHW-bHD65t`E-K;NTpDAW$RVy>^cDe`TtGc?`!XEyq@cy zt36=U`cnJ5_OW)4X!N!DUH$*&JxlpK9J|sO1q0B8Kvvf}2SN2u)O8;EuUhR7W+-Mf zI_@_w_0P4wI!Zxt^EuwR@Q$zk9SOpiVRSsFWnOE)tItcL4@9-OBY+vjVrA*}2OgV9 zNiZ4E6C?Cx1heGgpa^2goO>o%R@pX}0`I69PsHp${JB zvPZ^##`N?wZo9s_gk=Dll3mylwJ;#+GjB_a^W~KMRw1EZcjYBTDc!1M3;?d;6)=5V z#eOvYTUMB!o{n|@mMvR)5_(;8@M;NubJ1@;szRMp>PryBuwQWVzkD9=dd&+?**mj4 zFp&d*E!FDbrh-yT^W_*RtQta}e&0vH;4g+z!Kr4SuLe*6bRkkqYcrw7C)XUZ5tvM8 zV->0HcBOK77{4C_Foo!<{;|(r%;D8%sTfMJf7i%g|I|g@L&yI8X}gCa3NH5P&WIQ* zv4wGc_D(x}^MYYn|Ic;ZS=X`mJC(|T`MKHMv-|e!-#fE=v98}UfTg^9-}VLMQ<5D~ zLf`!IW52yHyB}Ier&?I&Ragyx2zWZAKS&b-8z;=rNF7BxDY-J-4cXx%3jruOZX`zK z2lxN%ZV19_{jN<+t!c#vvv2|yiVvnFJ7TK)*T3)?0D$AzZ_#vpRZNx^VYWC1QH5!v z20{9)I5-1TlI~2&bp#3hJs|J6;9}1*>*8rab))J{M>Ag zX!y$+c2CxkDuNckNNSfXC4f%IWXJG=4Y)X+iD)ns0Q0?jwPtgsZoG(Q9k5y~jpvkKP{8d>+Udovu2f zAXzbH3r_16Cjk=~!LF44F|}q>7zD#@K~_O{YOc^13kX2P zcHX^n0q;*|xTc8>@?q!v!#14twpZ`4D-}+H#EZ7Q>J~(!(PmzQ?wzG;9THg(q1!Yt zcQ)15BmB!6KCPP%dTG;Yx#=81Is%nA@F=QrN zm)3q9A;_DF2xH^p+pSEt$2%BON&x%=0H>r3H6XnHgd@4Ily5w=k%6W5rpEW4Yz=~1 zlA^R_H)-!AHJ)3volZv-MH^I*-`g(x?!8mT1DbhavUS4TIK*kio@WgY_jQkLdBMh7Z{+L4`Zw1rzARuF`&hy$? zLr-iG3yvFlF*CXr$BIbq9cA1l7In zM+i&k16ADtY?`n_$Ipj3;rH}hxw=b0y%GMDH=cy-So91Yre*dpL0X+5nx^kvyKciD zocr<5IU}#Sf9>WU;QeoV;%rrMBVQDe5VpR8g@A{#$erl>EXF7WvEp^9;vGMt_J3Bo+ zjeosnbju!@oBpWP?u$6aTdxaWy~NN2oCGrGD$n}1k2mU?e)F13>k71okO?JQLQ4Nr zL~C*eOkE6=nJMNDhI!Y0y9P4G#b;U_)y#n7I1d2$!;x0qx4iGKX!|c8SVO>Ukf}V7 zIbtAr$6xf^sgWl1L5%Ul=dBNYpQ}_PLJwP~R zU4{9A+g}@C;I*f`61m)13!x8UjQ_ahot@(l0vgd#7jON><0GrOU->V$^ASfMJF8ei z)ye_&YAFm^0gf`o6oJ!^z)}(jVGc){x(GBsiWz%m_9r$*B_+njC;#-ai-v#pCNiO4 z_`$cH@$mMCkZz8pFjCB`D|hJsFd+y#e)9;%r^aEJ28@OWepo&nLb15??N3~O!)V&* zXTSYqy5pvs>_eY(DA*^HC$~s(8YnARo3mOmp;jz$PrelTsR=Xfo2D#4dEH^n=cu+dG)xPXawQQN<~R;6zv#4&Ty*(YKR)&W1Pt9 zZE6?c$=M<*uIk-K@@E>yY#jF;V^ouhP|dkNJD~Ay7|(#g*tb}Q1VhwR^D)bSpjwoh zhv`vAs*3)g2?~_ZgPC#vkN*RI^x_vLqqQiB>{#x^&wlcQpTFRfUm7jd{j9gX`o4wP z1KiE=QOCI?@{UtY<%$BECNq7Bydf36O|kFwL8`2+=dG*WXwjq9wu!ssPamw`WYFVP zT-~k7)gs(-84VdjU_7H?%+ipvbmTJCHeS0Pw);|XU_8_`4M~9z8W!dcy#0btehFJI zIdilK{fS3^`y$;medo>PWNW6micxV?BxH?xo_#sa!AC9xv4UJE44>nv2?G&fac(}* zHI`Ch>m_GC__2$>I2wfhfm2^zRZ+`jUzWCW+P|<+51@zwMcYkXkR!#;0@}j? zZ9CU?U|42yI}FS)4D*cFho-0L4f}jhEtn%{; zqVko*kPJ+mlMfjxV6PyEwoK6=ch z7o9PbxeeuvJL9ikapL0-?|`Q3zS)W;CyZEB%R@e*5@ev%8dXzTL6mL~!S-w=^jca$ z8Y)r_Wq8aC(lqE+ZeY(`%oqAD)a=~CBbR*k23mGPUs|01s-_zq1VRApj;)bl+fqQW zA|r3!tsOHX(GD+z5gDZ<^h%=idJh#5DpCg4(87*PF~bfJJxBoZ`6Uz=^8>`!{=F4q zcuv4j^6>W$|Mq#36(n;@bCrU<4E4g|c#bVS+N8<^XuRUeMzf_vzU;tuqrEt1X(L}8 zvgAsXT#1V74&4bBB#Kiqqg*OMsbq0_X7^6sdg-|rZT-|a1D}LI68#;o{$mi~x;?vh zF}Tx0tp{WzDLbTM?9G=Wonw!KOi7Hg&z_$=p}*(#CwywDOB9@3hC?fYfZ2i_Da&eouQt*`fT7Yf z(+3UMmE;SA%*`I)t3G|+_K#k0MY4p>%-HeJFHW!;uWP_J7d%tdz@xBQzlzjq0CC)RJyATPBmCosT_y+|}Fu zk2%OW>T9FF?JtizWX<{w&*m;U%_}mP{Wv{6J&?TP08nxy3Kch!L`Q@;>BgOXHqZw- z#+3l0GG3(=3KbcMr!j!>jOKf0qJuaL1E&sXjO!2C2v)&N0ig+4mO0SeYJI0>^DCbB z@WR~ev3?FLS8<2qC@_Z+0vVsWTY)&OBe5r64sD||1M9~vtL+}A{+SjL_1g=J zglXV7<;$sdCcOP$d)mLw{+22-P@qOPRdccEL^icKz`k+a+pB89K=q)YSp0>fGc~C? z*G`~2F;@vS_&Z#saG((EP_gT}n4OskoFBfMaB`hWD1V7*TG;vc!zUzSqd)e$?XT=+ zo7)k$)EJ1YvJ(MwMH`OGkq|#?>d5F?q+J4AO6*-MLlZqTf-V;{L0D@=-O`I*HI_gq zIZmYe8P)vhQQsZsaFb*OokZu<4p6fRO1DA??4Q|#!;U&CmRhEis-2?`HV94AVOPpu z1aQPqCHk3febx2(h50TEQH>soDv@KEj4>i};@GO}d2hFK-@VckGgg-V9oMWM#%Q_6 z+E}ItUcZe9g%BqYUE7I&Dw7#@xftq}nVF{!f9kOv>xM??KfmjaiJg!B?(J4KJ8+v( z5W$FeuwP1GU%ng}39X2Jfx0%aGL7Elvb6^veW>?%rbgj>FV&2>6nO0`c8{ifwChpTd*-- zurXh>F<*4BP;Vs%i=MXkz&va_`H)y4G<^Ev58b;I^VOmiDOrDJ*UoKLCesCJ87{}! zJCA`rar5uws-D7DSjUM0bWU5IMy$q3YzB z^e_tVo-Tv^d^3&W4-7;$SBQX;qu_HoIFN!-t#1*Xxw?u`@`QeRr5Snp=vDRW*BI5j zV%h-XZ)v~^j$+1C*1-ONk(P@Ki`c*K0465J6PN0SY5vc<-hbY@*o1z==P!Tr_iwuK zIi_X#60~9k6>**k@eqy(u_S6W&`U*29ffMq2&?@N1Oj){;{)o27OaQY&({|Eyi7s1vcF326200KfZ~yZSbQ5XzXLfk^ABsT7^w zTaLZ9Bn?gUOs**)s%f#|sb0#hL{+J+z28u5mm89<1^Ii3G4Cu}hUmJcVFPM<;fJA< z&m6N)bzO#%3iERdn4FquXunbQRaY|f5PO0o1S;jypF}3~sWoffpzFq>Y@C_xj1}Y_ z6D2?`2^px3A_A%1G(7b+N`i{cce8(D0s=^I-;TyIT{yZ;(rf6hQh}+S|@YP%IdgG=;pB)+5bWI?I6h;Cfn4e*zCJobQq}{4&0}Q29EilWk`JYjDr39o0QnvI#E>&D&Je*GumZ1k_)c6ap;-T1ESx^LF?@ZqW&5u6moQW%uf?6d!;m|;8q zDaH2YD;UoVJ}S=(k8j_B!;U@{nK7fG8;wo$GXdB)Zy`}Xb*1x5&9I`W?f|f1G?MK0h~Gj(QBQ9zb$1n&>hu)08;$G88AXMm4@c1aD#O zdNY&3+=j*0BANZ1(|3Kf|d zW!FX7Q_8yHN|YTJv$J!kluFBI-qf7uTh87bo-q~+OV>qFMHzsl>nR3~5W=T0DCt=Z zt99F2p-_P9y35utT{rlGbKf?5<<+-@C-jN&$uFsh$sbd{d&*>1k`fjqzFv59cKg`r zuCshDXlACdvGKL%pS^iwknwiF>t1qfW&hr1O!7(T;(t)18RQzLHd#GRp2)wGL_nb; z(Rc;5s#qJwt;iKM*!K?(gy4dLovrKU|A?dcmt7gl8E6JP+wIrKzDIDoMh5rzCO{Z5 zp_*FE@0yg1W1cn9nTX#r20?^9i=~!Kv32~ibiF0X2vAM#TIy1JjhXSf&HsBji5*h9 z>q^DK+!Z|}yRWV-G!05|GlskGIt_-mOUWqNst>VrW3cfIW%B(aIAL{i6B?y8B^XK?u* z7e@V1N{@&;1|~8_sCi~)9CGL;WU?8sY6iwsU)rxSUpNUwT`n4i$uD`~(R=Rsuircn zN}}KUyM1T9_?UGcmI*r=;_^c&0bRqv1*tbKk*O3UAlaYT-AWmyLcZ|?X09cXjN$(0 zP>g_B+S#7Mq}v6{%KRj0RfIYE*>fUbp=cj`*h%T$-k@OZnAOvN)J=81|EE8%`G#uQ z5lKM0UPn@dMgd#x_nNL>6^YOt+qO6j`5Jl18d^FDA)r@Gd#~dfIaBYNAJ5Qr6c+Mr z0y$aI(KQ|CeBiYo3{B|wJ+lAhnM`)YiHnuUn&KpoOj+^Zz*P)KsYco}M=ChAv}dkl zyq^GWg_HqQ)h%G^t!E)G-z5pcUl^bnnF~_mmSP5RWMud zw519TES0f;soap%+!kYBsn|IDxkvcf&I!|w_96f{@60!aBXrkwFJBIc9E(&_lQo6J zah5SQ*69m#on)QaM1;Tp;2VFo?TgRuef1Zwd1dId(Ldo$|!F_R5b=9Z9r(%1PCp)kx3FZC+94 z&O14(NzgsQq1${=oBD-rf0KX6gkr98>=0XRQc8ds3T^4AyUs;tNNHrds$UQYb>arK zUGMpZh+B?QN^l)l+U?0Uw4mDe3}AdB3&1}KhLRGxp$F89Ludd!5)a#s{m>QH+(v;3 z{n+)O%dY!M?#}=FokDZH86aw^C7%De1uwW&g{dP@y~=~Pl4bp~=YQ9=p_HuI?9EXz zH$Qlj`Z3qzvfaL(Cu|Os!uJ%`p6}RX?1l z;c`V1%1fR0cq4HqIUc6QZ5)n#gkG<#%C)NXzC4$@vd^A`{>TCF55IkLPS=fUhKwZD zEVlw?HK1p?f!QSYk+@BP(YZiEk61&U1gvZ}Q5CP6Nr-B5Or7Gw&nentE>?oIq#OO` zn1iU`-gzMEC~VQm?0RX8gRB)-z2=t+uCFnC{f&3*1Nh10ZH@-&t+Ml=Gb-Z5QRG1=NH58@4f39TH<}){ayLR!!Fu50XeBC=)(7&ID+>?t4)G{{xao V{fNiixGn$y002ovPDHLkV1jiLv2FkW literal 0 HcmV?d00001 diff --git a/kfc/src/main/resources/mcmod.info b/kfc/src/main/resources/mcmod.info index 11b81d8f..bc438c95 100644 --- a/kfc/src/main/resources/mcmod.info +++ b/kfc/src/main/resources/mcmod.info @@ -2,7 +2,7 @@ "modid": "forgecraft", "name": "Kitsu's Forgecraft", "description": "Forged with sweat and blood", - "version": "1.6.23", + "version": "1.6.25", "mcversion": "1.12.2", "url": "", "updateUrl": "",