Sync with Primal 0.6 #14
@@ -5,12 +5,11 @@ org.gradle.jvmargs=-Xmx3G
|
|||||||
|
|
||||||
mod_group=nmd.primal.forgecraft
|
mod_group=nmd.primal.forgecraft
|
||||||
mod_name=ForgeCraft
|
mod_name=ForgeCraft
|
||||||
|
|
||||||
mod_version=1.4.1
|
mod_version=1.4.1
|
||||||
forge_version=14.23.0.2493
|
forge_version=14.23.0.2517
|
||||||
mcp_mappings=snapshot_20170624
|
mcp_mappings=snapshot_20171003
|
||||||
mc_version=1.12.2
|
mc_version=1.12.2
|
||||||
|
|
||||||
primal_version=0.6+
|
primal_version=0.6+
|
||||||
jei_version=4.7+
|
jei_version=4.8+
|
||||||
waila_version=1.7.0-B3
|
|
||||||
apple_version=2.1+
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.minecraft.util.EnumFacing;
|
|||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
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.items.tools.WorkMallet;
|
import nmd.primal.core.common.items.tools.Gallagher;
|
||||||
import nmd.primal.forgecraft.init.ModItems;
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
import nmd.primal.forgecraft.tiles.TileAnvil;
|
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||||
import nmd.primal.forgecraft.util.AnvilHandler;
|
import nmd.primal.forgecraft.util.AnvilHandler;
|
||||||
@@ -33,7 +33,7 @@ public class AnvilIron extends AnvilBase implements AnvilHandler {
|
|||||||
ItemStack pItem = player.inventory.getCurrentItem();
|
ItemStack pItem = player.inventory.getCurrentItem();
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
|
TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
if ((pItem.getItem() instanceof WorkMallet) || (pItem.getItem() == ModItems.forgehammer)) {
|
if ((pItem.getItem() instanceof Gallagher) || (pItem.getItem() == ModItems.forgehammer)) {
|
||||||
String[] tempArray = new String[25];
|
String[] tempArray = new String[25];
|
||||||
for (int i = 0; i < 25; i++) {
|
for (int i = 0; i < 25; i++) {
|
||||||
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
|
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.minecraft.util.EnumFacing;
|
|||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
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.items.tools.WorkMallet;
|
import nmd.primal.core.common.items.tools.Gallagher;
|
||||||
import nmd.primal.forgecraft.init.ModItems;
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
import nmd.primal.forgecraft.tiles.TileAnvil;
|
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ public class AnvilStone extends AnvilBase {
|
|||||||
ItemStack pItem = player.inventory.getCurrentItem();
|
ItemStack pItem = player.inventory.getCurrentItem();
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
|
TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
if ((pItem.getItem() instanceof WorkMallet) || (pItem.getItem() == ModItems.forgehammer)) {
|
if ((pItem.getItem() instanceof Gallagher) || (pItem.getItem() == ModItems.forgehammer)) {
|
||||||
String[] tempArray = new String[25];
|
String[] tempArray = new String[25];
|
||||||
for (int i = 0; i < 25; i++) {
|
for (int i = 0; i < 25; i++) {
|
||||||
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
|
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
|||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import nmd.primal.core.api.PrimalAPI;
|
import nmd.primal.core.api.PrimalAPI;
|
||||||
import nmd.primal.core.api.PrimalAPI.States;
|
import nmd.primal.core.api.PrimalAPI.States;
|
||||||
import nmd.primal.core.common.items.tools.WorkMallet;
|
import nmd.primal.core.common.items.tools.Gallagher;
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
import nmd.primal.forgecraft.tiles.TileBreaker;
|
import nmd.primal.forgecraft.tiles.TileBreaker;
|
||||||
import nmd.primal.forgecraft.util.BreakerHandler;
|
import nmd.primal.forgecraft.util.BreakerHandler;
|
||||||
@@ -74,7 +74,7 @@ public class Breaker extends CustomContainerFacing implements BreakerHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pItem.getItem() instanceof WorkMallet){
|
if(pItem.getItem() instanceof Gallagher){
|
||||||
tile.setSlotStack(0, player.inventory.getCurrentItem());
|
tile.setSlotStack(0, player.inventory.getCurrentItem());
|
||||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
|
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import net.minecraftforge.client.model.ModelLoader;
|
|||||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||||
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.items.tools.WorkMallet;
|
import nmd.primal.core.common.items.tools.Gallagher;
|
||||||
import nmd.primal.forgecraft.blocks.Anvil.AnvilBase;
|
import nmd.primal.forgecraft.blocks.Anvil.AnvilBase;
|
||||||
import nmd.primal.forgecraft.blocks.Anvil.AnvilIron;
|
import nmd.primal.forgecraft.blocks.Anvil.AnvilIron;
|
||||||
import nmd.primal.forgecraft.blocks.Anvil.AnvilStone;
|
import nmd.primal.forgecraft.blocks.Anvil.AnvilStone;
|
||||||
@@ -194,7 +194,7 @@ public class ModBlocks {
|
|||||||
Item pItem = player.getHeldItem(hand).getItem();
|
Item pItem = player.getHeldItem(hand).getItem();
|
||||||
BlockPos belowPos = pos.down();
|
BlockPos belowPos = pos.down();
|
||||||
//System.out.println("Activating");
|
//System.out.println("Activating");
|
||||||
if (pItem instanceof WorkMallet && world.getBlockState(belowPos).getBlock().equals(Blocks.STONE)) {
|
if (pItem instanceof Gallagher && world.getBlockState(belowPos).getBlock().equals(Blocks.STONE)) {
|
||||||
player.swingArm(hand);
|
player.swingArm(hand);
|
||||||
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||||
world.setBlockState(belowPos, ModBlocks.stoneanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2);
|
world.setBlockState(belowPos, ModBlocks.stoneanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2);
|
||||||
@@ -210,7 +210,7 @@ public class ModBlocks {
|
|||||||
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
||||||
return true;
|
return true;
|
||||||
}*/
|
}*/
|
||||||
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) {
|
||||||
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
||||||
|
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||||
@@ -263,7 +263,7 @@ public class ModBlocks {
|
|||||||
//System.out.println("Activating");
|
//System.out.println("Activating");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) {
|
||||||
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
||||||
|
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||||
@@ -315,7 +315,7 @@ public class ModBlocks {
|
|||||||
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) {
|
||||||
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
||||||
|
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||||
@@ -367,7 +367,7 @@ public class ModBlocks {
|
|||||||
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) {
|
||||||
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
|
||||||
|
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class ModCrafting {
|
|||||||
|
|
||||||
/***CASTING BLOCK***/
|
/***CASTING BLOCK***/
|
||||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingblock),
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingblock),
|
||||||
" B ", "BXB", " B ", 'X', Blocks.STONE_SLAB, 'B', PrimalAPI.Items.ADOBEBRICK_DRY);
|
" B ", "BXB", " B ", 'X', Blocks.STONE_SLAB, 'B', PrimalAPI.Items.ADOBE_BRICK_DRY);
|
||||||
|
|
||||||
/***CASTING FORM***/
|
/***CASTING FORM***/
|
||||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingform, 1),
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingform, 1),
|
||||||
@@ -64,13 +64,13 @@ public class ModCrafting {
|
|||||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_brick),
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_brick),
|
||||||
"X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE);
|
"X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE);
|
||||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_adobe),
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_adobe),
|
||||||
"X X", "XYX", "X X", 'X', PrimalAPI.Items.ADOBEBRICK_DRY, 'Y', Blocks.FURNACE);
|
"X X", "XYX", "X X", 'X', PrimalAPI.Items.ADOBE_BRICK_DRY, 'Y', Blocks.FURNACE);
|
||||||
/***Bloomery***/
|
/***Bloomery***/
|
||||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_brick),
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_brick),
|
||||||
"X X", "X X", "XXX", 'X', Items.BRICK);
|
"X X", "X X", "XXX", 'X', Items.BRICK);
|
||||||
|
|
||||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_adobe),
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_adobe),
|
||||||
"X X", "X X", "XXX", 'X', PrimalAPI.Items.ADOBEBRICK_DRY);
|
"X X", "X X", "XXX", 'X', PrimalAPI.Items.ADOBE_BRICK_DRY);
|
||||||
/***Block Breaker***/
|
/***Block Breaker***/
|
||||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.blockbreaker),
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.blockbreaker),
|
||||||
"L ", "BSB", "BBB", 'L', Blocks.LEVER, 'B', new ItemStack(Blocks.PLANKS, 1, OreDictionary.WILDCARD_VALUE), 'S', PrimalAPI.Items.SILK_CORDAGE_COILED);
|
"L ", "BSB", "BBB", 'L', Blocks.LEVER, 'B', new ItemStack(Blocks.PLANKS, 1, OreDictionary.WILDCARD_VALUE), 'S', PrimalAPI.Items.SILK_CORDAGE_COILED);
|
||||||
|
|||||||
@@ -233,15 +233,15 @@ public class BronzeAxe extends ItemAxe implements ToolNBT {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||||
{
|
{
|
||||||
Material material = state.getMaterial();
|
Material material = state.getMaterial();
|
||||||
//return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
//return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
||||||
|
|
||||||
if(material != Material.WOOD && material != Material.PLANTS && material != Material.VINE){
|
if(material != Material.WOOD && material != Material.PLANTS && material != Material.VINE){
|
||||||
return super.getStrVsBlock(stack, state);
|
return super.getDestroySpeed(stack, state);
|
||||||
} else {
|
} else {
|
||||||
return this.efficiencyOnProperMaterial + 1;
|
return this.efficiency + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,15 +249,15 @@ public class BronzePickaxe extends ItemPickaxe implements ToolNBT{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||||
{
|
{
|
||||||
Material material = state.getMaterial();
|
Material material = state.getMaterial();
|
||||||
//return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
//return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
||||||
|
|
||||||
if(material != Material.IRON && material != Material.ANVIL && material != Material.ROCK){
|
if(material != Material.IRON && material != Material.ANVIL && material != Material.ROCK){
|
||||||
return super.getStrVsBlock(stack, state);
|
return super.getDestroySpeed(stack, state);
|
||||||
} else {
|
} else {
|
||||||
return this.efficiencyOnProperMaterial + 1;
|
return this.efficiency + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,14 +233,14 @@ Item drop;
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||||
{
|
{
|
||||||
for (String type : getToolClasses(stack))
|
for (String type : getToolClasses(stack))
|
||||||
{
|
{
|
||||||
if (state.getBlock().isToolEffective(type, state))
|
if (state.getBlock().isToolEffective(type, state))
|
||||||
return efficiencyOnProperMaterial;
|
return efficiency;
|
||||||
}
|
}
|
||||||
return this.efficiencyOnProperMaterial + 1;
|
return this.efficiency + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -376,15 +376,15 @@ public class CustomAxe extends ItemAxe implements ToolNBT {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||||
{
|
{
|
||||||
Material material = state.getMaterial();
|
Material material = state.getMaterial();
|
||||||
//return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
//return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
||||||
|
|
||||||
if(material != Material.WOOD && material != Material.PLANTS && material != Material.VINE){
|
if(material != Material.WOOD && material != Material.PLANTS && material != Material.VINE){
|
||||||
return super.getStrVsBlock(stack, state);
|
return super.getDestroySpeed(stack, state);
|
||||||
} else {
|
} else {
|
||||||
return this.efficiencyOnProperMaterial * ( (this.getRedstoneLevel(stack) * 2 ) + 1);
|
return this.efficiency * ( (this.getRedstoneLevel(stack) * 2 ) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -395,15 +395,15 @@ public class CustomPickaxe extends ItemPickaxe implements ToolNBT{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||||
{
|
{
|
||||||
Material material = state.getMaterial();
|
Material material = state.getMaterial();
|
||||||
//return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
//return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
||||||
|
|
||||||
if(material != Material.IRON && material != Material.ANVIL && material != Material.ROCK){
|
if(material != Material.IRON && material != Material.ANVIL && material != Material.ROCK){
|
||||||
return super.getStrVsBlock(stack, state);
|
return super.getDestroySpeed(stack, state);
|
||||||
} else {
|
} else {
|
||||||
return this.efficiencyOnProperMaterial * ( (this.getRedstoneLevel(stack) * 2 ) + 1);
|
return this.efficiency * ( (this.getRedstoneLevel(stack) * 2 ) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -374,14 +374,14 @@ public class CustomShovel extends ItemSpade implements ToolNBT {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||||
{
|
{
|
||||||
for (String type : getToolClasses(stack))
|
for (String type : getToolClasses(stack))
|
||||||
{
|
{
|
||||||
if (state.getBlock().isToolEffective(type, state))
|
if (state.getBlock().isToolEffective(type, state))
|
||||||
return efficiencyOnProperMaterial;
|
return efficiency;
|
||||||
}
|
}
|
||||||
return this.EFFECTIVE_ON.contains(state.getBlock()) ? (this.efficiencyOnProperMaterial * ( (this.getRedstoneLevel(stack) * 2 ) + 1)) : 1.0F;
|
return this.EFFECTIVE_ON.contains(state.getBlock()) ? (this.efficiency * ( (this.getRedstoneLevel(stack) * 2 ) + 1)) : 1.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ public class Longbow extends BaseItem {
|
|||||||
{
|
{
|
||||||
ItemArrow itemarrow = (ItemArrow)((ItemArrow)(itemstack.getItem() instanceof ItemArrow ? itemstack.getItem() : Items.ARROW));
|
ItemArrow itemarrow = (ItemArrow)((ItemArrow)(itemstack.getItem() instanceof ItemArrow ? itemstack.getItem() : Items.ARROW));
|
||||||
EntityArrow entityarrow = itemarrow.createArrow(worldIn, itemstack, entityplayer);
|
EntityArrow entityarrow = itemarrow.createArrow(worldIn, itemstack, entityplayer);
|
||||||
entityarrow.setAim(entityplayer, entityplayer.rotationPitch, entityplayer.rotationYaw, 0.0F, f * 6.0F, 1.0F);
|
entityarrow.shoot(entityplayer, entityplayer.rotationPitch, entityplayer.rotationYaw, 0.0F, f * 6.0F, 1.0F);
|
||||||
|
|
||||||
if (f >= 1.0F)
|
if (f >= 1.0F)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class Musket extends BaseItem{
|
|||||||
//if(player.getItemInUseCount() > 5) {
|
//if(player.getItemInUseCount() > 5) {
|
||||||
world.playSound( null, player.posX, player.posY, player.posZ, ModSounds.MUSKET_SHOT, SoundCategory.BLOCKS, 0.5F, 0.3F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
world.playSound( null, player.posX, player.posY, player.posZ, ModSounds.MUSKET_SHOT, SoundCategory.BLOCKS, 0.5F, 0.3F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||||
EntityMuck entity = new EntityMuck(world, player);
|
EntityMuck entity = new EntityMuck(world, player);
|
||||||
entity.setHeadingFromThrower(player, player.rotationPitch, player.rotationYaw, 0.0F, 7.0F, 0.5F);
|
entity.shoot(player, player.rotationPitch, player.rotationYaw, 0.0F, 7.0F, 0.5F);
|
||||||
world.spawnEntity(entity);
|
world.spawnEntity(entity);
|
||||||
if (!stack.hasTagCompound()) {
|
if (!stack.hasTagCompound()) {
|
||||||
stack.setTagCompound(new NBTTagCompound());
|
stack.setTagCompound(new NBTTagCompound());
|
||||||
|
|||||||
@@ -42,13 +42,13 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
|||||||
}
|
}
|
||||||
this.iteration++;
|
this.iteration++;
|
||||||
if (this.iteration == 100) {
|
if (this.iteration == 100) {
|
||||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
|
||||||
if(CommonUtils.randomCheck(1000)) {
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
makeSmoke(world, pos);
|
makeSmoke(world, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.iteration == 200) {
|
if (this.iteration == 200) {
|
||||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
|
||||||
if(CommonUtils.randomCheck(1000)) {
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
makeSmoke(world, pos);
|
makeSmoke(world, pos);
|
||||||
}
|
}
|
||||||
@@ -63,7 +63,7 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
|||||||
world.notifyBlockUpdate(pos, state, state, 2);
|
world.notifyBlockUpdate(pos, state, state, 2);
|
||||||
}
|
}
|
||||||
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
|
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
|
||||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
|
||||||
if(CommonUtils.randomCheck(1000)) {
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
makeSmoke(world, pos);
|
makeSmoke(world, pos);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,13 +43,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
|
|||||||
if (world.getBlockState(this.getPos()).getValue(PrimalAPI.States.ACTIVE)) {
|
if (world.getBlockState(this.getPos()).getValue(PrimalAPI.States.ACTIVE)) {
|
||||||
|
|
||||||
if (this.iteration == 100) {
|
if (this.iteration == 100) {
|
||||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
|
||||||
if(CommonUtils.randomCheck(1000)) {
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
makeSmoke(world, pos);
|
makeSmoke(world, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.iteration == 200) {
|
if (this.iteration == 200) {
|
||||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
|
||||||
if(CommonUtils.randomCheck(1000)) {
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
makeSmoke(world, pos);
|
makeSmoke(world, pos);
|
||||||
}
|
}
|
||||||
@@ -64,7 +64,7 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
|
|||||||
this.markDirty();
|
this.markDirty();
|
||||||
world.notifyBlockUpdate(pos, state, state, 2);
|
world.notifyBlockUpdate(pos, state, state, 2);
|
||||||
}
|
}
|
||||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
|
||||||
if(CommonUtils.randomCheck(1000)) {
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
makeSmoke(world, pos);
|
makeSmoke(world, pos);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import net.minecraft.util.math.BlockPos;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import nmd.primal.core.api.PrimalAPI;
|
import nmd.primal.core.api.PrimalAPI;
|
||||||
import nmd.primal.core.common.items.PrimalItem;
|
import nmd.primal.core.common.items.PrimalItem;
|
||||||
import nmd.primal.core.common.items.tools.WorkMallet;
|
import nmd.primal.core.common.items.tools.Gallagher;
|
||||||
import nmd.primal.forgecraft.CommonUtils;
|
import nmd.primal.forgecraft.CommonUtils;
|
||||||
import nmd.primal.forgecraft.blocks.IngotBall;
|
import nmd.primal.forgecraft.blocks.IngotBall;
|
||||||
import nmd.primal.forgecraft.crafting.AnvilCrafting;
|
import nmd.primal.forgecraft.crafting.AnvilCrafting;
|
||||||
@@ -60,7 +60,7 @@ public interface AnvilHandler {
|
|||||||
default boolean doAnvilRecipe(ItemStack pItem, String[] tempArray, World world, TileAnvil tile, BlockPos pos, EntityPlayer player) {
|
default boolean doAnvilRecipe(ItemStack pItem, String[] tempArray, World world, TileAnvil tile, BlockPos pos, EntityPlayer player) {
|
||||||
AnvilCrafting recipe = AnvilCrafting.getRecipe(tempArray);
|
AnvilCrafting recipe = AnvilCrafting.getRecipe(tempArray);
|
||||||
if (recipe != null) {
|
if (recipe != null) {
|
||||||
if (pItem.getItem() instanceof WorkMallet) {
|
if (pItem.getItem() instanceof Gallagher) {
|
||||||
pItem.damageItem(15, player);
|
pItem.damageItem(15, player);
|
||||||
}
|
}
|
||||||
if (pItem.getItem() instanceof ForgeHammer) {
|
if (pItem.getItem() instanceof ForgeHammer) {
|
||||||
@@ -175,7 +175,7 @@ public interface AnvilHandler {
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
default boolean doAnvilInventoryManager(ItemStack pItem, World world, TileAnvil tile, BlockPos pos, float hitx, float hity, float hitz, IBlockState state, EntityPlayer player) {
|
default boolean doAnvilInventoryManager(ItemStack pItem, World world, TileAnvil tile, BlockPos pos, float hitx, float hity, float hitz, IBlockState state, EntityPlayer player) {
|
||||||
if ( (!(pItem.getItem() instanceof WorkMallet)) || (!(pItem.getItem() instanceof ForgeHammer)) ) {
|
if ( (!(pItem.getItem() instanceof Gallagher)) || (!(pItem.getItem() instanceof ForgeHammer)) ) {
|
||||||
if(Block.getBlockFromItem(pItem.getItem()) instanceof IngotBall) {
|
if(Block.getBlockFromItem(pItem.getItem()) instanceof IngotBall) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user