Merge branch 'BuildCraft-5.0.x' of https://github.com/AEnterprise/BuildCraft into AEnterprise-BuildCraft-5.0.x
This commit is contained in:
commit
0d49b93817
8 changed files with 138 additions and 1 deletions
|
@ -224,3 +224,30 @@ tip.PipeItemsEmzuli=Gate controlled extraction pipe
|
|||
tip.PipePowerWood=Power Input Pipe
|
||||
tip.PipePowerIron=Selectable Limiter Pipe
|
||||
tip.PipeStructureCobblestone=Support pipe
|
||||
|
||||
achievement.woodenGearAchievement=A bit rough around the edges
|
||||
achievement.woodenGearAchievement.desc=Craft a wooden gear
|
||||
achievement.stoneGearAchievement=Hard as a rock
|
||||
achievement.stoneGearAchievement.desc=Upgrade a wooden gear to a stone gear
|
||||
achievement.ironGearAchievement=Is it stainless?
|
||||
achievement.ironGearAchievement.desc=Upgrade a stone gear to a iron gear
|
||||
achievement.goldGearAchievement=No, it isn't made of honey
|
||||
achievement.goldGearAchievement.desc=Upgrade a iron gear to a gold gear
|
||||
achievement.diamondGearAchievement=Shiny!
|
||||
achievement.diamondGearAchievement.desc=Upgrade a gold gear to a diamond gear
|
||||
achievement.wrenchAchievement=Just hit it!
|
||||
achievement.wrenchAchievement.desc=Make a wrench
|
||||
achievement.aLotOfCraftingAchievement=A lot of crafting
|
||||
achievement.aLotOfCraftingAchievement.desc=Craft a auto workbench
|
||||
achievement.straightDownAchievement=Straight down
|
||||
achievement.straightDownAchievement.desc=Make a mining well in the world
|
||||
achievement.chunkDestroyerAchievement=Chunk destroyer
|
||||
achievement.chunkDestroyerAchievement.desc=Craft a quarry
|
||||
achievement.fasterFillingAchievement=Faster filling
|
||||
achievement.fasterFillingAchievement.desc=Make a filler
|
||||
achievement.timeForSomeLogicAchievement=Time for some logic
|
||||
achievement.timeForSomeLogicAchievement.desc=Craft an assembly table
|
||||
achievement.refineAndRedefineAchievement=Refine and redefine
|
||||
achievement.refineAndRedefineAchievement.desc=Make a refinery
|
||||
achievement.tinglyLaserAchievement=Tingly laser
|
||||
achievement.tinglyLaserAchievement.desc=Craft a laser
|
|
@ -24,10 +24,12 @@ import net.minecraft.init.Items;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.AchievementPage;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
@ -75,6 +77,7 @@ import buildcraft.core.triggers.TriggerInventory;
|
|||
import buildcraft.core.triggers.TriggerInventoryLevel;
|
||||
import buildcraft.core.triggers.TriggerMachine;
|
||||
import buildcraft.core.utils.BCLog;
|
||||
import buildcraft.core.utils.CraftingHandler;
|
||||
import buildcraft.core.recipes.AssemblyRecipeManager;
|
||||
import buildcraft.core.recipes.IntegrationRecipeManager;
|
||||
import buildcraft.core.triggers.TriggerRedstoneInput;
|
||||
|
@ -165,6 +168,21 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
@Instance("BuildCraft|Core")
|
||||
public static BuildCraftCore instance;
|
||||
|
||||
public static Achievement woodenGearAchievement;
|
||||
public static Achievement stoneGearAchievement;
|
||||
public static Achievement ironGearAchievement;
|
||||
public static Achievement goldGearAchievement;
|
||||
public static Achievement diamondGearAchievement;
|
||||
public static Achievement wrenchAchievement;
|
||||
public static Achievement aLotOfCraftingAchievement;
|
||||
public static Achievement straightDownAchievement;
|
||||
public static Achievement chunkDestroyerAchievement;
|
||||
public static Achievement fasterFillingAchievement;
|
||||
public static Achievement timeForSomeLogicAchievement;
|
||||
public static Achievement refineAndRedefineAchievement;
|
||||
public static Achievement tinglyLaserAchievement;
|
||||
public static AchievementPage BuildcraftAchievements;
|
||||
|
||||
@EventHandler
|
||||
public void loadConfiguration(FMLPreInitializationEvent evt) {
|
||||
|
||||
|
@ -292,8 +310,11 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
EntityList.stringToClassMapping.remove("BuildCraft|Core.bcLaser");
|
||||
EntityList.stringToClassMapping.remove("BuildCraft|Core.bcEnergyLaser");
|
||||
|
||||
FMLCommonHandler.instance().bus().register(new CraftingHandler());
|
||||
|
||||
CoreProxy.proxy.initializeRendering();
|
||||
CoreProxy.proxy.initializeEntityRendering();
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -348,4 +369,23 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
public void processIMCRequests(FMLInterModComms.IMCEvent event) {
|
||||
InterModComms.processIMC(event);
|
||||
}
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent event) {
|
||||
woodenGearAchievement = new Achievement("achievement.woodenGear", "woodenGearAchievement", 0, 0,woodenGearItem, null).registerStat();
|
||||
stoneGearAchievement = new Achievement("achievement.stoneGear", "stoneGearAchievement", 2, 0, stoneGearItem, woodenGearAchievement).registerStat();
|
||||
ironGearAchievement = new Achievement("achievement.ironGear", "ironGearAchievement", 4, 0, ironGearItem, stoneGearAchievement).registerStat();
|
||||
goldGearAchievement = new Achievement("achievement.goldGear", "goldGearAchievement", 6, 0, goldGearItem, ironGearAchievement).registerStat();
|
||||
diamondGearAchievement = new Achievement("achievement.diamondGear", "diamondGearAchievement", 8, 0, diamondGearItem, goldGearAchievement).registerStat();
|
||||
wrenchAchievement = new Achievement("achievement.wrench", "wrenchAchievement", 3, 2, wrenchItem, stoneGearAchievement).registerStat();
|
||||
aLotOfCraftingAchievement = new Achievement("achievement.aLotOfCrafting", "aLotOfCraftingAchievement", 1, 2, BuildCraftFactory.autoWorkbenchBlock, woodenGearAchievement).registerStat();
|
||||
straightDownAchievement = new Achievement("achievement.straightDown", "straightDownAchievement", 5, 2, BuildCraftFactory.miningWellBlock, ironGearAchievement).registerStat();
|
||||
chunkDestroyerAchievement = new Achievement("achievement.chunkDestroyer", "chunkDestroyerAchievement", 9, 2, BuildCraftFactory.quarryBlock, diamondGearAchievement).registerStat();
|
||||
fasterFillingAchievement = new Achievement("achievement.fasterFilling", "fasterFillingAchievement", 7, 2, BuildCraftBuilders.fillerBlock, goldGearAchievement).registerStat();
|
||||
timeForSomeLogicAchievement = new Achievement("achievement.timeForSomeLogic", "timeForSomeLogicAchievement", 9, -2, BuildCraftSilicon.assemblyTableBlock, diamondGearAchievement).registerStat();
|
||||
refineAndRedefineAchievement = new Achievement("achievement.refineAndRedefine", "refineAndRedefineAchievement", 10, 0, BuildCraftFactory.refineryBlock, diamondGearAchievement).registerStat();
|
||||
tinglyLaserAchievement = new Achievement("achievement.tinglyLaser", "tinglyLaserAchievement", 11, -2, BuildCraftSilicon.laserBlock ,timeForSomeLogicAchievement).registerStat();
|
||||
|
||||
BuildcraftAchievements = new AchievementPage("Buildcraft", woodenGearAchievement, stoneGearAchievement, ironGearAchievement, goldGearAchievement, diamondGearAchievement, wrenchAchievement, aLotOfCraftingAchievement, straightDownAchievement, chunkDestroyerAchievement, fasterFillingAchievement, timeForSomeLogicAchievement, refineAndRedefineAchievement, tinglyLaserAchievement);
|
||||
AchievementPage.registerAchievementPage(BuildcraftAchievements);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
package buildcraft.builders;
|
||||
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.api.filler.IFillerPattern;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.GuiIds;
|
||||
|
@ -16,6 +17,7 @@ import buildcraft.core.proxy.CoreProxy;
|
|||
import buildcraft.core.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ibxm.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -23,6 +25,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
|
57
common/buildcraft/core/utils/CraftingHandler.java
Normal file
57
common/buildcraft/core/utils/CraftingHandler.java
Normal file
|
@ -0,0 +1,57 @@
|
|||
package buildcraft.core.utils;
|
||||
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftFactory;
|
||||
import buildcraft.BuildCraftSilicon;
|
||||
|
||||
public class CraftingHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onCrafing(PlayerEvent.ItemCraftedEvent Event){
|
||||
if (Event.crafting.getItem().equals(BuildCraftCore.woodenGearItem)){
|
||||
Event.player.addStat(BuildCraftCore.woodenGearAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(BuildCraftCore.stoneGearItem)){
|
||||
Event.player.addStat(BuildCraftCore.stoneGearAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(BuildCraftCore.ironGearItem)){
|
||||
Event.player.addStat(BuildCraftCore.ironGearAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(BuildCraftCore.goldGearItem)){
|
||||
Event.player.addStat(BuildCraftCore.goldGearAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(BuildCraftCore.diamondGearItem)){
|
||||
Event.player.addStat(BuildCraftCore.diamondGearAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(BuildCraftCore.wrenchItem)){
|
||||
Event.player.addStat(BuildCraftCore.wrenchAchievement, 1);
|
||||
}
|
||||
if(Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftFactory.autoWorkbenchBlock))){
|
||||
Event.player.addStat(BuildCraftCore.aLotOfCraftingAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftFactory.miningWellBlock))){
|
||||
Event.player.addStat(BuildCraftCore.straightDownAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftFactory.quarryBlock))){
|
||||
Event.player.addStat(BuildCraftCore.chunkDestroyerAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftFactory.refineryBlock))){
|
||||
Event.player.addStat(BuildCraftCore.refineAndRedefineAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftBuilders.fillerBlock))){
|
||||
Event.player.addStat(BuildCraftCore.fasterFillingAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftSilicon.laserBlock))){
|
||||
Event.player.addStat(BuildCraftCore.tinglyLaserAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftSilicon.assemblyTableBlock))){
|
||||
Event.player.addStat(BuildCraftCore.timeForSomeLogicAchievement, 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package buildcraft.factory;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftFactory;
|
||||
import buildcraft.core.BlockBuildCraft;
|
||||
import buildcraft.core.GuiIds;
|
||||
|
@ -15,9 +16,12 @@ import buildcraft.core.IItemPipe;
|
|||
import buildcraft.core.proxy.CoreProxy;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
|
|
@ -8,19 +8,23 @@
|
|||
*/
|
||||
package buildcraft.factory;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftFactory;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.core.BlockBuildCraft;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ibxm.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
@ -61,7 +65,6 @@ public class BlockMiningWell extends BlockBuildCraft {
|
|||
@Override
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack) {
|
||||
ForgeDirection orientation = Utils.get2dOrientation(entityliving);
|
||||
|
||||
world.setBlockMetadataWithNotify(i, j, k, orientation.getOpposite().ordinal(),1);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package buildcraft.factory;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftFactory;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package buildcraft.silicon;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftSilicon;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
|
@ -22,6 +23,7 @@ import net.minecraft.block.BlockContainer;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
Loading…
Reference in a new issue