maded assets for pickcast added crafting handler and drying state
This commit is contained in:
@@ -17,6 +17,7 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import nmd.primal.core.common.helper.CommonUtils;
|
||||||
import nmd.primal.core.common.items.tools.WorkMallet;
|
import nmd.primal.core.common.items.tools.WorkMallet;
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
import nmd.primal.forgecraft.init.ModItems;
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
@@ -24,6 +25,7 @@ import nmd.primal.forgecraft.tiles.TileCastingForm;
|
|||||||
import nmd.primal.forgecraft.util.CastingFormHandler;
|
import nmd.primal.forgecraft.util.CastingFormHandler;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mminaie on 6/19/17.
|
* Created by mminaie on 6/19/17.
|
||||||
@@ -36,6 +38,7 @@ public class CastingForm extends CustomContainerFacing implements CastingFormHan
|
|||||||
super(material, registryName);
|
super(material, registryName);
|
||||||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
|
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
|
||||||
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
|
this.setTickRandomly(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -46,11 +49,6 @@ public class CastingForm extends CustomContainerFacing implements CastingFormHan
|
|||||||
TileCastingForm tile = (TileCastingForm) world.getTileEntity(pos);
|
TileCastingForm tile = (TileCastingForm) world.getTileEntity(pos);
|
||||||
ItemStack pItem = player.inventory.getCurrentItem();
|
ItemStack pItem = player.inventory.getCurrentItem();
|
||||||
doInventoryManager(pItem, world, tile, pos, hitx, hity, hitz, state, player);
|
doInventoryManager(pItem, world, tile, pos, hitx, hity, hitz, state, player);
|
||||||
String[] tempArray = new String[25];
|
|
||||||
for (int i = 0; i < 25; i++) {
|
|
||||||
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
|
|
||||||
}
|
|
||||||
doCraftingformCrafting(pItem, tempArray, world, tile, pos, player);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -58,7 +56,20 @@ public class CastingForm extends CustomContainerFacing implements CastingFormHan
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateTick(World world, BlockPos pos, IBlockState state, Random random)
|
||||||
|
{
|
||||||
|
if (!world.isRemote) {
|
||||||
|
if(CommonUtils.randomCheck(10)) {
|
||||||
|
TileCastingForm tile = (TileCastingForm) world.getTileEntity(pos);
|
||||||
|
String[] tempArray = new String[25];
|
||||||
|
for (int i = 0; i < 25; i++) {
|
||||||
|
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
|
||||||
|
}
|
||||||
|
doCraftingformCrafting(tempArray, world, tile, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class CastingformCrafting {
|
|||||||
|
|
||||||
private ItemStack output;
|
private ItemStack output;
|
||||||
|
|
||||||
public CastingformCrafting(String[] input, ItemStack output, String upgrade){
|
public CastingformCrafting(String[] input, ItemStack output){
|
||||||
|
|
||||||
this.input = input;
|
this.input = input;
|
||||||
this.output = output;
|
this.output = output;
|
||||||
@@ -31,9 +31,9 @@ public class CastingformCrafting {
|
|||||||
// Recipe Methods
|
// Recipe Methods
|
||||||
// ***************************************************************************** //
|
// ***************************************************************************** //
|
||||||
|
|
||||||
public static void addRecipe(String[] input, ItemStack output, String upgrade)
|
public static void addRecipe(String[] input, ItemStack output)
|
||||||
{
|
{
|
||||||
castingRecipes.add(new CastingformCrafting(input, output, upgrade));
|
castingRecipes.add(new CastingformCrafting(input, output));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isRecipe(String[] array)
|
public static boolean isRecipe(String[] array)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import nmd.primal.core.api.PrimalItems;
|
|||||||
import nmd.primal.core.common.helper.CommonUtils;
|
import nmd.primal.core.common.helper.CommonUtils;
|
||||||
import nmd.primal.forgecraft.crafting.AnvilCrafting;
|
import nmd.primal.forgecraft.crafting.AnvilCrafting;
|
||||||
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
|
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
|
||||||
|
import nmd.primal.forgecraft.crafting.CastingformCrafting;
|
||||||
import nmd.primal.forgecraft.crafting.ForgeCrafting;
|
import nmd.primal.forgecraft.crafting.ForgeCrafting;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@@ -321,6 +322,22 @@ public class ModCrafting {
|
|||||||
|
|
||||||
//TODO PLACE HOLDER FOR WOOTZ
|
//TODO PLACE HOLDER FOR WOOTZ
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
CASTING
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
String empty = ItemStack.EMPTY.getItem().getRegistryName().toString();
|
||||||
|
String muddd = ModItems.castingmud.getRegistryName().toString();
|
||||||
|
|
||||||
|
CastingformCrafting.addRecipe(
|
||||||
|
new String[] {
|
||||||
|
muddd,muddd,muddd,muddd,muddd,
|
||||||
|
muddd,empty,empty,empty,muddd,
|
||||||
|
empty,muddd,muddd,muddd,empty,
|
||||||
|
muddd,muddd,muddd,muddd,muddd,
|
||||||
|
muddd,muddd,muddd,muddd,muddd },
|
||||||
|
new ItemStack(Items.STICK, 1)
|
||||||
|
);
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
FORGING
|
FORGING
|
||||||
@@ -534,7 +551,7 @@ public class ModCrafting {
|
|||||||
ANVILING
|
ANVILING
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
String empty = ItemStack.EMPTY.getItem().getRegistryName().toString();
|
//String empty = ItemStack.EMPTY.getItem().getRegistryName().toString();
|
||||||
String hotChunk = ModItems.ironchunkhot.getRegistryName().toString();
|
String hotChunk = ModItems.ironchunkhot.getRegistryName().toString();
|
||||||
String hotCleanChunk = ModItems.ironcleanchunkhot.getRegistryName().toString();
|
String hotCleanChunk = ModItems.ironcleanchunkhot.getRegistryName().toString();
|
||||||
String hotSteelChunk = ModItems.steelchunkhot.getRegistryName().toString();
|
String hotSteelChunk = ModItems.steelchunkhot.getRegistryName().toString();
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import net.minecraft.util.EnumFacing;
|
|||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import nmd.primal.core.common.helper.PlayerHelper;
|
import nmd.primal.core.common.helper.PlayerHelper;
|
||||||
|
import nmd.primal.forgecraft.CommonUtils;
|
||||||
|
import nmd.primal.forgecraft.crafting.CastingformCrafting;
|
||||||
import nmd.primal.forgecraft.init.ModItems;
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
import nmd.primal.forgecraft.tiles.TileCastingForm;
|
import nmd.primal.forgecraft.tiles.TileCastingForm;
|
||||||
|
|
||||||
@@ -198,9 +200,17 @@ public interface CastingFormHandler {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
default boolean doCraftingformCrafting(ItemStack pItem, String[] tempArray, World world, TileCastingForm tile, BlockPos pos, EntityPlayer player){
|
default void doCraftingformCrafting(String[] tempArray, World world, TileCastingForm tile, BlockPos pos){
|
||||||
|
CastingformCrafting recipe = CastingformCrafting.getRecipe(tempArray);
|
||||||
return false;
|
if (recipe != null) {
|
||||||
|
CommonUtils.spawnItemEntityFromWorld(world, pos, recipe.getOutput());
|
||||||
|
}
|
||||||
|
//world.playEvent(1031, pos, 0);
|
||||||
|
for (int i = 0; i < tile.getSlotListSize(); i++) {
|
||||||
|
if (!tile.getSlotStack(i).isEmpty()) {
|
||||||
|
tile.setSlotStack(i, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,238 @@
|
|||||||
|
{
|
||||||
|
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||||
|
"textures": {
|
||||||
|
"particle": "blocks/e_particle",
|
||||||
|
"texture": "blocks/castingmud"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"__comment": "Box29",
|
||||||
|
"from": [ 0, 0, 0 ],
|
||||||
|
"to": [ 16, 2, 3 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 13, 16, 16 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 0, 0, 16, 3 ], "texture": "#texture" },
|
||||||
|
"north": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" },
|
||||||
|
"south": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" },
|
||||||
|
"west": { "uv": [ 0, 14, 3, 16 ], "texture": "#texture" },
|
||||||
|
"east": { "uv": [ 13, 14, 16, 16 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box29",
|
||||||
|
"from": [ 0, 0, 13 ],
|
||||||
|
"to": [ 16, 2, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 16, 3 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 0, 13, 16, 16 ], "texture": "#texture" },
|
||||||
|
"north": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" },
|
||||||
|
"south": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" },
|
||||||
|
"west": { "uv": [ 13, 14, 16, 16 ], "texture": "#texture" },
|
||||||
|
"east": { "uv": [ 0, 14, 3, 16 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box31",
|
||||||
|
"from": [ 0, 0, 3 ],
|
||||||
|
"to": [ 3, 2, 13 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 3, 3, 13 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 0, 3, 3, 13 ], "texture": "#texture" },
|
||||||
|
"west": { "uv": [ 3, 14, 13, 16 ], "texture": "#texture" },
|
||||||
|
"east": { "uv": [ 3, 14, 13, 16 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box31",
|
||||||
|
"from": [ 13, 0, 3 ],
|
||||||
|
"to": [ 16, 2, 13 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 13, 3, 16, 13 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 13, 3, 16, 13 ], "texture": "#texture" },
|
||||||
|
"west": { "uv": [ 3, 14, 13, 16 ], "texture": "#texture" },
|
||||||
|
"east": { "uv": [ 3, 14, 13, 16 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 5, 0, 3 ],
|
||||||
|
"to": [ 7, 2, 5 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 5, 11, 7, 13 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 5, 3, 7, 5 ], "texture": "#texture" },
|
||||||
|
"south": { "uv": [ 5, 14, 7, 16 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 3, 0, 3 ],
|
||||||
|
"to": [ 5, 2, 5 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 3, 11, 5, 13 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 3, 3, 5, 5 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 7, 0, 3 ],
|
||||||
|
"to": [ 9, 2, 5 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 9, 0, 3 ],
|
||||||
|
"to": [ 11, 2, 5 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 11, 0, 3 ],
|
||||||
|
"to": [ 13, 2, 5 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 5, 0, 7 ],
|
||||||
|
"to": [ 7, 2, 9 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 3, 0, 5 ],
|
||||||
|
"to": [ 5, 2, 7 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 7, 0, 7 ],
|
||||||
|
"to": [ 9, 2, 9 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 9, 0, 7 ],
|
||||||
|
"to": [ 11, 2, 9 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 11, 0, 5 ],
|
||||||
|
"to": [ 13, 2, 7 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 3, 0, 9 ],
|
||||||
|
"to": [ 5, 2, 11 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 5, 0, 9 ],
|
||||||
|
"to": [ 7, 2, 11 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 7, 0, 9 ],
|
||||||
|
"to": [ 9, 2, 11 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 9, 0, 9 ],
|
||||||
|
"to": [ 11, 2, 11 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 11, 0, 9 ],
|
||||||
|
"to": [ 13, 2, 11 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 3, 0, 11 ],
|
||||||
|
"to": [ 5, 2, 13 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 5, 0, 11 ],
|
||||||
|
"to": [ 7, 2, 13 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 7, 0, 11 ],
|
||||||
|
"to": [ 9, 2, 13 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 9, 0, 11 ],
|
||||||
|
"to": [ 11, 2, 13 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Box33",
|
||||||
|
"from": [ 11, 0, 11 ],
|
||||||
|
"to": [ 13, 2, 13 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 11, 3, 13, 5 ], "texture": "#texture" },
|
||||||
|
"up": { "uv": [ 11, 11, 13, 13 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 159 B |
Binary file not shown.
|
After Width: | Height: | Size: 921 B |
Reference in New Issue
Block a user