updating resources to match new crucible rendering
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
- [ ] JEI not showing full crafting recipe for Tools #38
|
||||
|
||||
## Current Feature
|
||||
- [ ] Update nbt Crucible Models with open top
|
||||
- [x] Update nbt Crucible Models with open top
|
||||
- [ ] Update Tongs Models
|
||||
- [ ] Update Casting recipes to use new slotted tongs and nbtCrucible
|
||||
- [ ] Config Usage
|
||||
- [ ] Steel Plate Recipe #37
|
||||
|
||||
@@ -20,6 +20,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.items.tools.Gallagher;
|
||||
import nmd.primal.core.common.recipes.inworld.GallagherRecipe;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.tiles.TileBreaker;
|
||||
import nmd.primal.forgecraft.util.BreakerHandler;
|
||||
@@ -52,6 +53,7 @@ public class Breaker extends CustomContainerFacing implements BreakerHandler {
|
||||
ItemStack pItem = player.inventory.getCurrentItem();
|
||||
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) == true && player.isSneaking() && pItem.isEmpty()){
|
||||
|
||||
doBreaking(world, state, pos, tile);
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, false));
|
||||
|
||||
|
||||
@@ -56,11 +56,41 @@ public class SlottedTongs extends Item implements IPickup, AnvilHandler{
|
||||
if (stack.getItem() instanceof SlottedTongs) {
|
||||
//System.out.println(slotStack.getTagCompound());
|
||||
if (slotStack.getItem() instanceof ItemNBTCrucible){
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getBoolean("hot")){
|
||||
return 0.01f;
|
||||
//Render Empty Crucible
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getInteger("hot") == 0){
|
||||
return 0.011f;
|
||||
}
|
||||
if(!item.getSlotList().get(0).getSubCompound("BlockEntityTag").getBoolean("hot")){
|
||||
return 0.02f;
|
||||
//Render Level 1
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getInteger("hot") == 1){
|
||||
return 0.012f;
|
||||
}
|
||||
//Render Level 2
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getInteger("hot") == 2){
|
||||
return 0.013f;
|
||||
}
|
||||
//Render Level 3
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getInteger("hot") == 3){
|
||||
return 0.013f;
|
||||
}
|
||||
//Render Level 4
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getInteger("hot") == 4){
|
||||
return 0.014f;
|
||||
}
|
||||
//Render Level 5
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getInteger("hot") == 5){
|
||||
return 0.015f;
|
||||
}
|
||||
//Render Cooked
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getInteger("hot") == 6){
|
||||
return 0.016f;
|
||||
}
|
||||
//Render Slagged
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getInteger("hot") == 7){
|
||||
return 0.017f;
|
||||
}
|
||||
//Render Hot
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getInteger("hot") == 15){
|
||||
return 0.025f;
|
||||
}
|
||||
}
|
||||
if(slotStack.getItem() instanceof ToolPart){
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
package nmd.primal.forgecraft.util;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.ItemStackHelper;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.ItemStackHandler;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.PrimalCore;
|
||||
import nmd.primal.core.common.helper.NBTHelper;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.core.common.init.recipes.custom.RecipesGallagher;
|
||||
import nmd.primal.core.common.recipes.AbstractToolRecipe;
|
||||
import nmd.primal.core.common.recipes.inworld.GallagherRecipe;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
|
||||
import nmd.primal.forgecraft.tiles.TileBreaker;
|
||||
|
||||
@@ -40,10 +48,25 @@ public interface BreakerHandler {
|
||||
for (int i=0; i < EnumFacing.HORIZONTALS.length; i++) {
|
||||
EnumFacing face = world.getBlockState(pos).getValue(CustomContainerFacing.FACING);
|
||||
if(face.equals(world.getBlockState(pos).getValue(CustomContainerFacing.FACING))){
|
||||
//Block smashBlock = world.getBlockState(pos.offset(face)).getBlock();
|
||||
Block smashBlock = world.getBlockState(pos.offset(face)).getBlock();
|
||||
IBlockState smashState = world.getBlockState(pos.offset(face));
|
||||
//Block smashBlock = world.getBlockState(pos).getBlock();
|
||||
ItemStack smashStack = NBTHelper.getStackBlockNBT(world, pos, state, new ItemStack(Item.getItemFromBlock(smashBlock), 1, smashBlock.damageDropped(state)));
|
||||
|
||||
|
||||
if(!smashState.getBlock().equals(Blocks.AIR)) {
|
||||
ItemStack smashStack = new ItemStack(Item.getItemFromBlock(smashState.getBlock()), 1, smashState.getBlock().getMetaFromState(smashState));
|
||||
|
||||
for (GallagherRecipe recipe : GallagherRecipe.RECIPES) {
|
||||
if (recipe.match(smashState)) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), recipe.getOutputStack());
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (RecipeHelper.isOreName(smashStack, "oreIron")) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
@@ -100,6 +123,7 @@ public interface BreakerHandler {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 10);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
},
|
||||
"overrides": [
|
||||
{"predicate": {"type": 0.0},"model": "forgecraft:item/slottedtongs/slottedtongs_0"},
|
||||
{"predicate": {"type": 0.01},"model": "forgecraft:item/slottedtongs/slottedtongs_1"},
|
||||
{"predicate": {"type": 0.025},"model": "forgecraft:item/slottedtongs/slottedtongs_015"},
|
||||
{"predicate": {"type": 0.02},"model": "forgecraft:item/slottedtongs/slottedtongs_2"},
|
||||
{"predicate": {"type": 0.03},"model": "forgecraft:item/slottedtongs/slottedtongs_3"},
|
||||
{"predicate": {"type": 0.04},"model": "forgecraft:item/slottedtongs/slottedtongs_4"},
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"parent": "forgecraft:item/stonetongs_hotbronze",
|
||||
"textures": {
|
||||
"particle": "blocks/planks_oak",
|
||||
"texture": "blocks/planks_oak",
|
||||
"texture1": "forgecraft:blocks/stone_slab",
|
||||
"texture2": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture3": "forgecraft:items/hot_bronze"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"parent": "forgecraft:item/stonetongs_hotiron",
|
||||
"textures": {
|
||||
"particle": "blocks/planks_oak",
|
||||
"texture": "blocks/planks_oak",
|
||||
"texture1": "forgecraft:blocks/stone_slab",
|
||||
"texture2": "forgecraft:blocks/stone_slab_hot"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user