update from master-1.12 #16

Closed
kitsu wants to merge 9 commits from master-1.12 into nbtCrucible
19 changed files with 145 additions and 36 deletions

View File

@@ -15,19 +15,22 @@ buildscript {
} }
} }
repositories { repositories {
maven {
name = "jei"
url "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "mobius"
url "http://mobiusstrip.eu/maven"
}
maven { maven {
name = "primal" name = "primal"
url "https://maven.nmd.so" url "https://maven.nmd.so"
} }
maven {
name = "jei"
url "http://dvs1.progwml6.com/files/maven"
} }
maven {
name "CraftTweaker"
url "http://maven.blamejared.com/"
}
}
apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'java' apply plugin: 'java'
compileJava { compileJava {
@@ -42,23 +45,27 @@ minecraft {
version = "${mc_version}" + "-" + "${forge_version}" version = "${mc_version}" + "-" + "${forge_version}"
runDir = "run" runDir = "run"
mappings = "${mcp_mappings}" mappings = "${mcp_mappings}"
// JEI // JEI
//useDepAts = true useDepAts = true
// Replace // Replace
replace "@VERSION@", project.mod_version replace "@VERSION@", project.mod_version
} }
dependencies { dependencies {
// PrimalCore
//compile against the JEI API
deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}:api"
//runtime "mezz.jei:jei_${mc_version}:${jei_version}"
deobfCompile "nmd.primal.core:PrimalCore:${mc_version}-${primal_version}:dev" deobfCompile "nmd.primal.core:PrimalCore:${mc_version}-${primal_version}:dev"
//runtime "nmd.primal.core:PrimalCore:${primal_version}"
// JEI
//runtime "mezz.jei:jei_${mc_version}:${jei_version}"
deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}:api"
// CraftTweaker
//compile "CraftTweaker2:CraftTweaker2-MC1120-Main:${craftweaker_version}"
compile "CraftTweaker2:CraftTweaker2-API:${craftweaker_version}"
} }
processResources { processResources {
// this will ensure that this task is redone when the versions change. // this will ensure that this task is redone when the versions change.
inputs.property "version", "${mod_version}" inputs.property "version", "${mod_version}"

View File

@@ -6,10 +6,13 @@ org.gradle.jvmargs=-Xmx3G
mod_group=nmd.primal.forgecraft mod_group=nmd.primal.forgecraft
mod_name=ForgeCraft mod_name=ForgeCraft
mod_version=1.4.01 mod_version=1.4.06
forge_version=14.23.0.2517 forge_version=14.23.1.2581
mcp_mappings=snapshot_20171003 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.8+ jei_version=4.8+
waila_version=1.7.0-B3
apple_version=2.1+
craftweaker_version=4.0.9.289

View File

@@ -17,9 +17,10 @@ public class ModInfo {
public static final String MOD_CONFIG = "primal/" + MOD_ID; public static final String MOD_CONFIG = "primal/" + MOD_ID;
//public static final String MOD_PREFIX = MOD_ID + ":"; //public static final String MOD_PREFIX = MOD_ID + ":";
public static final String MOD_CHANNEL = MOD_ID; public static final String MOD_CHANNEL = MOD_ID;
public static final String MOD_VERSION = "1.4.01";
public static final String MOD_VERSION = "1.4.06";
public static final String MC_VERSIONS = "[1.12.0, 1.13.0)"; 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.0,);"; public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.6,);";
/** Mod Structures **/ /** Mod Structures **/
public static final String SERVER_PROXY = "nmd.primal.forgecraft.proxy.ServerProxy"; public static final String SERVER_PROXY = "nmd.primal.forgecraft.proxy.ServerProxy";

View File

@@ -127,7 +127,7 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr
} }
if(tile.getSlotStack(0) != ItemStack.EMPTY) { if(tile.getSlotStack(0) != ItemStack.EMPTY) {
if((FireSource.useSource(world, pos, player, pItem, hand, facing, hitX, hitY, hitZ))) { if((FireSource.useSource(world, pos, facing, player, hand, pItem, hitX, hitY, hitZ))) {
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2); world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2);
tile.setHeat(100); tile.setHeat(100);
tile.markDirty(); tile.markDirty();

View File

@@ -142,7 +142,7 @@ public class Crucible extends Block {
} else if (name.equals("tile.coolwootzcrucible")){ } else if (name.equals("tile.coolwootzcrucible")){
return Item.getItemFromBlock(ModBlocks.wootzball); return Item.getItemFromBlock(ModBlocks.wootzball);
} else if (name.equals("tile.rawcleanironcrucible")){ } else if (name.equals("tile.rawcleanironcrucible")){
return PrimalAPI.Items.GOLDEN_STICK; return PrimalAPI.Items.IRON_DUST;
}else if (name.equals("tile.emptycruciblecracked")){ }else if (name.equals("tile.emptycruciblecracked")){
return Items.CLAY_BALL; return Items.CLAY_BALL;
} }

View File

@@ -46,7 +46,7 @@ import static nmd.primal.core.common.helper.FireHelper.makeSmoke;
public class Forge extends CustomContainerFacing implements ITileEntityProvider{ public class Forge extends CustomContainerFacing implements ITileEntityProvider{
private int maxHeat; private int maxHeat;
//public static final PropertyBool PrimalStates.ACTIVE = PropertyBool.create("PrimalStates.ACTIVE"); //public static final PropertyBool PrimalAPI.States.ACTIVE = PropertyBool.create("PrimalAPI.States.ACTIVE");
protected static final AxisAlignedBB collideBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.99D, 1.0D); protected static final AxisAlignedBB collideBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.99D, 1.0D);
protected static final AxisAlignedBB boundBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); protected static final AxisAlignedBB boundBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
@@ -118,7 +118,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{
} }
} }
} }
if((FireSource.useSource(world, pos, player, pItem, hand, facing, hitX, hitY, hitZ))) { if((FireSource.useSource(world, pos, facing, player, hand, pItem, hitX, hitY, hitZ))) {
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2); world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2);
tile.setHeat(100); tile.setHeat(100);
tile.markDirty(); tile.markDirty();
@@ -306,7 +306,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{
/*@Override /*@Override
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
IBlockState state = super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer); IBlockState state = super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer);
return state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)); return state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false));
}*/ }*/
@Override @Override

View File

@@ -127,8 +127,10 @@ public class BronzeAxe extends ItemAxe implements ToolNBT {
setLapisLevel(item, 0); setLapisLevel(item, 0);
setModifiers(item, 0); setModifiers(item, 0);
} }
//this.setDamage(item, this.getMaxDamage(item) -2);
if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){ if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.bronzeaxehead, 1)); PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenbronzetool, 1));
((EntityPlayer) player).inventory.deleteStack(item);
} }
} }
} }

View File

@@ -130,7 +130,8 @@ public class BronzeHoe extends ItemHoe implements ToolNBT {
} }
if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){ if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.bronzehoehead, 1)); PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenbronzetool, 1));
((EntityPlayer) player).inventory.deleteStack(item);
} }
} }
} }

View File

@@ -20,6 +20,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT; import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -129,6 +130,10 @@ public class BronzePickaxe extends ItemPickaxe implements ToolNBT{
setModifiers(item, 0); setModifiers(item, 0);
} }
if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenbronzetool, 1));
((EntityPlayer) player).inventory.deleteStack(item);
}
} }
} }

View File

@@ -133,7 +133,8 @@ Item drop;
} }
if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){ if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.bronzeshovelhead, 1)); PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenbronzetool, 1));
((EntityPlayer) player).inventory.deleteStack(item);
} }
} }
} }

View File

@@ -18,8 +18,10 @@ import net.minecraft.util.math.BlockPos;
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.api.PrimalAPI;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT; import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -269,6 +271,20 @@ public class CustomAxe extends ItemAxe implements ToolNBT {
setLapisLevel(item, 0); setLapisLevel(item, 0);
setModifiers(item, 0); setModifiers(item, 0);
} }
if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenwroughtirontool, 1));
}
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokencleanirontool, 1));
}
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokensteeltool, 1));
}
((EntityPlayer) player).inventory.deleteStack(item);
}
} }
} }

View File

@@ -19,8 +19,10 @@ import net.minecraft.util.math.BlockPos;
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.api.PrimalAPI;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT; import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -266,6 +268,21 @@ public class CustomHoe extends ItemHoe implements ToolNBT {
setModifiers(item, 0); setModifiers(item, 0);
} }
if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenwroughtirontool, 1));
}
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokencleanirontool, 1));
}
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokensteeltool, 1));
}
((EntityPlayer) player).inventory.deleteStack(item);
}
} }
} }

View File

@@ -18,8 +18,10 @@ import net.minecraft.util.math.BlockPos;
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.api.PrimalAPI;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT; import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -269,6 +271,22 @@ public class CustomPickaxe extends ItemPickaxe implements ToolNBT{
setModifiers(item, 0); setModifiers(item, 0);
} }
//this.setDamage(item, this.getMaxDamage(item) -2);
if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenwroughtirontool, 1));
}
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokencleanirontool, 1));
}
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokensteeltool, 1));
}
((EntityPlayer) player).inventory.deleteStack(item);
}
} }
} }

View File

@@ -20,8 +20,10 @@ import net.minecraft.util.math.BlockPos;
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.api.PrimalAPI;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT; import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -269,6 +271,22 @@ public class CustomShovel extends ItemSpade implements ToolNBT {
setModifiers(item, 0); setModifiers(item, 0);
} }
if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenwroughtirontool, 1));
}
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokencleanirontool, 1));
}
if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL){
PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokensteeltool, 1));
}
((EntityPlayer) player).inventory.deleteStack(item);
}
} }
} }

View File

@@ -10,7 +10,7 @@ import net.minecraft.util.*;
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.entities.projectiles.EntityMuck; import nmd.primal.core.common.entities.projectiles.EntityMud;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModSounds; import nmd.primal.forgecraft.init.ModSounds;
import nmd.primal.forgecraft.items.BaseItem; import nmd.primal.forgecraft.items.BaseItem;
@@ -51,7 +51,8 @@ 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); EntityMud entity = new EntityMud(world, player);
entity.setType("muck");
entity.shoot(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()) {
@@ -60,9 +61,6 @@ public class Musket extends BaseItem{
stack.getTagCompound().setBoolean("use", false); stack.getTagCompound().setBoolean("use", false);
//} //}
} }
/* /*
public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase entityLiving) public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase entityLiving)

View File

@@ -84,6 +84,22 @@ public interface BreakerHandler {
return true; return true;
} }
} }
if (RecipeHelper.isOreName(smashStack, "cobblestone")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(Blocks.GRAVEL, randomChanceReturn(9, 1, 1)));
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
return true;
}
}
if (RecipeHelper.isOreName(smashStack, "gravel")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(Blocks.SAND, randomChanceReturn(9, 1, 1)));
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
return true;
}
}
} }
} else { } else {
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 10); tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 10);

View File

@@ -86,6 +86,12 @@ tile.steelchunk.name=Steel Chunk
tile.wootzball.name=Damascus Steel Ingot tile.wootzball.name=Damascus Steel Ingot
tile.wootzchunk.name=Damascus Steel Chunk tile.wootzchunk.name=Damascus Steel Chunk
item.brokenbronzetool.name=Broken Bronze Tool
item.brokenwroughtirontool.name=Broken Wrought Iron Tool
item.brokencleanirontool.name=Broken Clean Iron Tool
item.brokensteeltool.name=Broken Steel Tool
item.brokenwootztool.name=Broken Damascus Tool
item.unstrunglongbow.name=Unstrung Longbow item.unstrunglongbow.name=Unstrung Longbow
item.longbow.name=Longbow item.longbow.name=Longbow
item.rawlongbow.name=Raw Longbow item.rawlongbow.name=Raw Longbow

View File

@@ -2,8 +2,8 @@
"modid": "forgecraft", "modid": "forgecraft",
"name": "Kitsu's Forgecraft", "name": "Kitsu's Forgecraft",
"description": "Forged with sweat and blood", "description": "Forged with sweat and blood",
"version": "1.4.01", "version": "1.4.06",
"mcversion": "1.12.1", "mcversion": "1.12.2",
"url": "", "url": "",
"updateUrl": "", "updateUrl": "",
"authorList": ["KitsuShadow"], "authorList": ["KitsuShadow"],