Sync with Primal 0.6 #14
@@ -6,11 +6,9 @@ org.gradle.jvmargs=-Xmx3G
|
||||
mod_group=nmd.primal.forgecraft
|
||||
mod_name=ForgeCraft
|
||||
mod_version=1.4.0
|
||||
forge_version=14.23.0.2493
|
||||
mcp_mappings=snapshot_20170624
|
||||
forge_version=14.23.0.2517
|
||||
mcp_mappings=snapshot_20171003
|
||||
mc_version=1.12.2
|
||||
|
||||
primal_version=0.6+
|
||||
jei_version=4.7+
|
||||
waila_version=1.7.0-B3
|
||||
apple_version=2.1+
|
||||
jei_version=4.8+
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
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.tiles.TileAnvil;
|
||||
import nmd.primal.forgecraft.util.AnvilHandler;
|
||||
@@ -33,7 +33,7 @@ public class AnvilIron extends AnvilBase implements AnvilHandler {
|
||||
ItemStack pItem = player.inventory.getCurrentItem();
|
||||
TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
|
||||
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];
|
||||
for (int i = 0; i < 25; i++) {
|
||||
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.math.BlockPos;
|
||||
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.tiles.TileAnvil;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class AnvilStone extends AnvilBase {
|
||||
ItemStack pItem = player.inventory.getCurrentItem();
|
||||
TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
|
||||
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];
|
||||
for (int i = 0; i < 25; i++) {
|
||||
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 nmd.primal.core.api.PrimalAPI;
|
||||
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.tiles.TileBreaker;
|
||||
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());
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
|
||||
return true;
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
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.AnvilIron;
|
||||
import nmd.primal.forgecraft.blocks.Anvil.AnvilStone;
|
||||
@@ -194,7 +194,7 @@ public class ModBlocks {
|
||||
Item pItem = player.getHeldItem(hand).getItem();
|
||||
BlockPos belowPos = pos.down();
|
||||
//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);
|
||||
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 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));
|
||||
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) {
|
||||
|
||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||
@@ -263,7 +263,7 @@ public class ModBlocks {
|
||||
//System.out.println("Activating");
|
||||
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) {
|
||||
|
||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||
@@ -315,7 +315,7 @@ public class ModBlocks {
|
||||
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
||||
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) {
|
||||
|
||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||
@@ -367,7 +367,7 @@ public class ModBlocks {
|
||||
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
||||
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) {
|
||||
|
||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ModCrafting {
|
||||
|
||||
/***CASTING BLOCK***/
|
||||
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***/
|
||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingform, 1),
|
||||
@@ -64,13 +64,13 @@ public class ModCrafting {
|
||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_brick),
|
||||
"X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE);
|
||||
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***/
|
||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_brick),
|
||||
"X X", "X X", "XXX", 'X', Items.BRICK);
|
||||
|
||||
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***/
|
||||
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);
|
||||
|
||||
@@ -233,15 +233,15 @@ public class BronzeAxe extends ItemAxe implements ToolNBT {
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||
{
|
||||
Material material = state.getMaterial();
|
||||
//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){
|
||||
return super.getStrVsBlock(stack, state);
|
||||
return super.getDestroySpeed(stack, state);
|
||||
} else {
|
||||
return this.efficiencyOnProperMaterial + 1;
|
||||
return this.efficiency + 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -249,15 +249,15 @@ public class BronzePickaxe extends ItemPickaxe implements ToolNBT{
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||
{
|
||||
Material material = state.getMaterial();
|
||||
//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){
|
||||
return super.getStrVsBlock(stack, state);
|
||||
return super.getDestroySpeed(stack, state);
|
||||
} else {
|
||||
return this.efficiencyOnProperMaterial + 1;
|
||||
return this.efficiency + 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -233,14 +233,14 @@ Item drop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||
{
|
||||
for (String type : getToolClasses(stack))
|
||||
{
|
||||
if (state.getBlock().isToolEffective(type, state))
|
||||
return efficiencyOnProperMaterial;
|
||||
return efficiency;
|
||||
}
|
||||
return this.efficiencyOnProperMaterial + 1;
|
||||
return this.efficiency + 1;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -376,15 +376,15 @@ public class CustomAxe extends ItemAxe implements ToolNBT {
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||
{
|
||||
Material material = state.getMaterial();
|
||||
//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){
|
||||
return super.getStrVsBlock(stack, state);
|
||||
return super.getDestroySpeed(stack, state);
|
||||
} 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
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||
{
|
||||
Material material = state.getMaterial();
|
||||
//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){
|
||||
return super.getStrVsBlock(stack, state);
|
||||
return super.getDestroySpeed(stack, state);
|
||||
} 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
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state)
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state)
|
||||
{
|
||||
for (String type : getToolClasses(stack))
|
||||
{
|
||||
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)
|
||||
|
||||
@@ -140,7 +140,7 @@ 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.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)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ public class Musket extends BaseItem{
|
||||
//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));
|
||||
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);
|
||||
if (!stack.hasTagCompound()) {
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
|
||||
@@ -42,13 +42,13 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
||||
}
|
||||
this.iteration++;
|
||||
if (this.iteration == 100) {
|
||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
|
||||
if(CommonUtils.randomCheck(1000)) {
|
||||
makeSmoke(world, pos);
|
||||
}
|
||||
}
|
||||
if (this.iteration == 200) {
|
||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
|
||||
if(CommonUtils.randomCheck(1000)) {
|
||||
makeSmoke(world, pos);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
||||
world.notifyBlockUpdate(pos, state, state, 2);
|
||||
}
|
||||
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)) {
|
||||
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 (this.iteration == 100) {
|
||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
|
||||
if(CommonUtils.randomCheck(1000)) {
|
||||
makeSmoke(world, pos);
|
||||
}
|
||||
}
|
||||
if (this.iteration == 200) {
|
||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
|
||||
if(CommonUtils.randomCheck(1000)) {
|
||||
makeSmoke(world, pos);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
|
||||
this.markDirty();
|
||||
world.notifyBlockUpdate(pos, state, state, 2);
|
||||
}
|
||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
|
||||
if(CommonUtils.randomCheck(1000)) {
|
||||
makeSmoke(world, pos);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
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.blocks.IngotBall;
|
||||
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) {
|
||||
AnvilCrafting recipe = AnvilCrafting.getRecipe(tempArray);
|
||||
if (recipe != null) {
|
||||
if (pItem.getItem() instanceof WorkMallet) {
|
||||
if (pItem.getItem() instanceof Gallagher) {
|
||||
pItem.damageItem(15, player);
|
||||
}
|
||||
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) {
|
||||
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) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user