mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-21 04:32:18 +00:00
Dark Steel Shears
* Dark Steel Shears are crafted with 2 Dark Steel Ingots * They are configurable more durable and configurable faster * They can be empowered and will then AOE with a configurable radius * I plan on adding another upgrade later (diamond edge)
This commit is contained in:
1 parent
b1b1a925d7
commit
cd2d6cf73e
6 files changed
+420
-88
No files matched your search
@@ -599,6 +599,7 @@ item.darkSteel_boots.name=Dark Boots
|
||||
item.darkSteel_sword.name=The Ender
|
||||
item.darkSteel_pickaxe.name=Dark Pick
|
||||
item.darkSteel_axe.name=Dark Axe
|
||||
item.darkSteel_shears.name=Dark Shears
|
||||
|
||||
enderio.item.tooltip.showDetails=<Hold Shift>
|
||||
enderio.item.darkSteel.tooltip.durability=Durability:
|
||||
@@ -610,6 +611,8 @@ enderio.item.darkSteel_pickaxe.tooltip.cost=cost
|
||||
|
||||
enderio.item.darkSteel_axe.tooltip.multiHarvest=Sneak to harvest multiple logs
|
||||
|
||||
enderio.item.darkSteel_shears.tooltip.multiHarvest=Shears multiple blocks/sheep when empowered
|
||||
|
||||
enderio.item.darkSteel_sword.tooltip.line1=Increased skull and ender pearl drops
|
||||
enderio.item.darkSteel_sword.tooltip.line2=Endermen can't teleport once hit
|
||||
enderio.item.darkSteel_sword.tooltip.line3=+2 Damage when Powered
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 426 B |
@@ -81,7 +81,7 @@ public final class Config {
|
||||
public static boolean useAlternateTesseractModel = false;
|
||||
|
||||
public static boolean photovoltaicCellEnabled = true;
|
||||
|
||||
|
||||
public static boolean reservoirEnabled = true;
|
||||
|
||||
public static double conduitScale = DEFAULT_CONDUIT_SCALE;
|
||||
@@ -156,16 +156,16 @@ public final class Config {
|
||||
public static float darkSteelSpeedOneSprintModifier = 0.1f;
|
||||
public static float darkSteelSpeedTwoSprintMultiplier = 0.3f;
|
||||
public static float darkSteelSpeedThreeSprintMultiplier = 0.5f;
|
||||
|
||||
|
||||
public static int darkSteelSpeedOneCost = 10;
|
||||
public static int darkSteelSpeedTwoCost = 15;
|
||||
public static int darkSteelSpeedThreeCost = 20;
|
||||
|
||||
|
||||
public static double darkSteelBootsJumpModifier = 1.5;
|
||||
|
||||
public static double darkSteelBootsJumpModifier = 1.5;
|
||||
public static int darkSteelJumpOneCost = 10;
|
||||
public static int darkSteelJumpTwoCost = 15;
|
||||
public static int darkSteelJumpThreeCost = 20;
|
||||
public static int darkSteelJumpThreeCost = 20;
|
||||
|
||||
public static boolean slotZeroPlacesEight = true;
|
||||
|
||||
@@ -201,6 +201,12 @@ public final class Config {
|
||||
public static float darkSteelAxeEffeciencyBoostWhenPowered = 2;
|
||||
public static float darkSteelAxeSpeedPenaltyMultiHarvest = 4;
|
||||
|
||||
public static int darkSteelShearsDurabilityFactor = 5;
|
||||
public static int darkSteelShearsPowerUsePerDamagePoint = 250;
|
||||
public static float darkSteelShearsEffeciencyBoostWhenPowered = 2.0f;
|
||||
public static int darkSteelShearsBlockAreaBoostWhenPowered = 2;
|
||||
public static float darkSteelShearsEntityAreaBoostWhenPowered = 3.0f;
|
||||
|
||||
public static int darkSteelUpgradeVibrantCost = 10;
|
||||
public static int darkSteelUpgradePowerOneCost = 10;
|
||||
public static int darkSteelUpgradePowerTwoCost = 15;
|
||||
@@ -210,7 +216,7 @@ public final class Config {
|
||||
public static double darkSteelGliderHorizontalSpeed = 0.03;
|
||||
public static double darkSteelGliderVerticalSpeed = -0.05;
|
||||
public static double darkSteelGliderVerticalSpeedSprinting = -0.15;
|
||||
|
||||
|
||||
public static int darkSteelGogglesOfRevealingCost = 10;
|
||||
|
||||
public static int darkSteelApiaristArmorCost = 10;
|
||||
@@ -222,10 +228,10 @@ public final class Config {
|
||||
public static int darkSteelSoundLocatorCost = 10;
|
||||
public static int darkSteelSoundLocatorRange = 40;
|
||||
public static int darkSteelSoundLocatorLifespan = 40;
|
||||
|
||||
public static int darkSteelTravelCost = 30;
|
||||
|
||||
public static int darkSteelTravelCost = 30;
|
||||
public static int darkSteelSpoonCost = 10;
|
||||
|
||||
|
||||
public static int darkSteelSolarOneGen = 10;
|
||||
public static int darkSteelSolarOneCost = 15;
|
||||
public static int darkSteelSolarTwoGen = 40;
|
||||
@@ -233,9 +239,9 @@ public final class Config {
|
||||
public static boolean darkSteelSolarChargeOthers = true;
|
||||
|
||||
public static float darkSteelAnvilDamageChance = 0.024f;
|
||||
|
||||
|
||||
public static float darkSteelLadderSpeedBoost = 0.06f;
|
||||
|
||||
|
||||
public static int hootchPowerPerCycleRF = 60;
|
||||
public static int hootchPowerTotalBurnTime = 6000;
|
||||
public static int rocketFuelPowerPerCycleRF = 160;
|
||||
@@ -303,7 +309,7 @@ public final class Config {
|
||||
|
||||
public static int capacitorBankMaxIoRF = 5000;
|
||||
public static int capacitorBankMaxStorageRF = 5000000;
|
||||
|
||||
|
||||
public static int capacitorBankTierOneMaxIoRF = 1000;
|
||||
public static int capacitorBankTierOneMaxStorageRF = 1000000;
|
||||
|
||||
@@ -346,7 +352,7 @@ public final class Config {
|
||||
public static int killerJoeNutrientUsePerAttackMb = 5;
|
||||
public static double killerJoeAttackHeight = 2;
|
||||
public static double killerJoeAttackWidth = 2;
|
||||
public static double killerJoeAttackLength = 4;
|
||||
public static double killerJoeAttackLength = 4;
|
||||
public static double killerJoeHooverXpWidth = 5;
|
||||
public static double killerJoeHooverXpLength = 10;
|
||||
public static int killerJoeMaxXpLevel = Integer.MAX_VALUE;
|
||||
@@ -393,7 +399,7 @@ public final class Config {
|
||||
public static int attractorPowerPerTickLevelTwo = 40;
|
||||
public static int attractorRangeLevelThree = 64;
|
||||
public static int attractorPowerPerTickLevelThree = 80;
|
||||
|
||||
|
||||
public static int spawnGuardRangeLevelOne = 64;
|
||||
public static int spawnGuardPowerPerTickLevelOne = 80;
|
||||
public static int spawnGuardRangeLevelTwo = 96;
|
||||
@@ -402,7 +408,7 @@ public final class Config {
|
||||
public static int spawnGuardPowerPerTickLevelThree = 800;
|
||||
public static boolean spawnGuardStopAllSlimesDebug = false;
|
||||
public static boolean spawnGuardStopAllSquidSpawning = false;
|
||||
|
||||
|
||||
public static String weatherObeliskClearItem = "minecraft:cake";
|
||||
public static String weatherObeliskRainItem = "minecraft:water_bucket";
|
||||
public static String weatherObeliskThunderItem = "minecraft:lava_bucket";
|
||||
@@ -423,11 +429,11 @@ public final class Config {
|
||||
public static boolean lootTravelStaff = true;
|
||||
public static boolean lootTheEnder = true;
|
||||
public static boolean lootDarkSteelBoots = true;
|
||||
|
||||
|
||||
public static boolean dumpMobNames = false;
|
||||
|
||||
public static boolean enderRailEnabled = true;
|
||||
public static int enderRailPowerRequireCrossDimensions = 10000;
|
||||
public static int enderRailPowerRequireCrossDimensions = 10000;
|
||||
public static int enderRailPowerRequiredPerBlock = 10;
|
||||
public static boolean enderRailCapSameDimensionPowerAtCrossDimensionCost = true;
|
||||
public static int enderRailTicksBeforeForceSpawningLinkedCarts = 60;
|
||||
@@ -435,7 +441,7 @@ public final class Config {
|
||||
|
||||
public static int xpObeliskMaxXpLevel = Integer.MAX_VALUE;
|
||||
public static String xpJuiceName = "xpjuice";
|
||||
|
||||
|
||||
public static boolean clearGlassSameTexture = false;
|
||||
public static boolean clearGlassConnectToFusedQuartz = false;
|
||||
|
||||
@@ -483,7 +489,7 @@ public final class Config {
|
||||
postInit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
@Method(modid = "ttCore")
|
||||
public void onConfigFileChanged(ConfigFileChangedEvent event) {
|
||||
@@ -534,15 +540,15 @@ public final class Config {
|
||||
.getBoolean("powerConduitCanDifferentTiersConnect", sectionPower.name, powerConduitCanDifferentTiersConnect,
|
||||
"If set to false power conduits of different tiers cannot be connected. in this case a block such as a cap. bank is needed to bridge different tiered networks");
|
||||
powerConduitOutputMJ = config.getBoolean("powerConduitOutputMJ", sectionPower.name, powerConduitOutputMJ, "When set to true power conduits will output MJ if RF is not supported");
|
||||
|
||||
|
||||
|
||||
|
||||
painterEnergyPerTaskRF = config.get(sectionPower.name, "painterEnergyPerTaskRF", painterEnergyPerTaskRF,
|
||||
"The total amount of RF required to paint one block")
|
||||
.getInt(painterEnergyPerTaskRF);
|
||||
|
||||
useHardRecipes = config.get(sectionRecipe.name, "useHardRecipes", useHardRecipes, "When enabled machines cost significantly more.")
|
||||
.getBoolean(useHardRecipes);
|
||||
soulBinderRequiresEndermanSkull = config.getBoolean("soulBinderRequiresEndermanSkull", sectionRecipe.name, soulBinderRequiresEndermanSkull,
|
||||
soulBinderRequiresEndermanSkull = config.getBoolean("soulBinderRequiresEndermanSkull", sectionRecipe.name, soulBinderRequiresEndermanSkull,
|
||||
"When true the Soul Binder requires an Enderman Skull to craft");
|
||||
allowTileEntitiesAsPaintSource = config.get(sectionRecipe.name, "allowTileEntitiesAsPaintSource", allowTileEntitiesAsPaintSource,
|
||||
"When enabled blocks with tile entities (e.g. machines) can be used as paint targets.")
|
||||
@@ -564,7 +570,7 @@ public final class Config {
|
||||
reservoirEnabled= config.get(sectionItems.name, "reservoirEnabled", reservoirEnabled,
|
||||
"If set to false reservoirs will not be craftable.")
|
||||
.getBoolean(reservoirEnabled);
|
||||
|
||||
|
||||
transceiverEnabled = config.get(sectionItems.name, "transceiverEnabled", transceiverEnabled,
|
||||
"If set to false: Dimensional Transceivers will not be craftable.")
|
||||
.getBoolean(transceiverEnabled);
|
||||
@@ -698,9 +704,9 @@ public final class Config {
|
||||
.getBoolean();
|
||||
travelStaffBlinkBlackList = config.getStringList("travelStaffBlinkBlackList", sectionStaff.name, travelStaffBlinkBlackList,
|
||||
"Lists the blocks that cannot be teleported through in the form 'modID:blockName'");
|
||||
travelAnchorZoomScale = config.getFloat("travelAnchorZoomScale", sectionStaff.name, travelAnchorZoomScale, 0, 1,
|
||||
travelAnchorZoomScale = config.getFloat("travelAnchorZoomScale", sectionStaff.name, travelAnchorZoomScale, 0, 1,
|
||||
"Set the max zoomed size of a travel anchor as an aprox. percentage of screen height");
|
||||
|
||||
|
||||
|
||||
enderIoRange = config.get(sectionEfficiency.name, "enderIoRange", enderIoRange,
|
||||
"Range accessible (in blocks) when using the Ender IO.").getInt(enderIoRange);
|
||||
@@ -742,16 +748,16 @@ public final class Config {
|
||||
"Number of levels required for the 'Jump 2' upgrade.").getInt(darkSteelJumpTwoCost);
|
||||
darkSteelJumpThreeCost = config.get(sectionDarkSteel.name, "darkSteelJumpThreeCost", darkSteelJumpThreeCost,
|
||||
"Number of levels required for the 'Jump 3' upgrade.").getInt(darkSteelJumpThreeCost);
|
||||
|
||||
|
||||
darkSteelSpeedOneCost = config.get(sectionDarkSteel.name, "darkSteelSpeedOneCost", darkSteelSpeedOneCost,
|
||||
"Number of levels required for the 'Speed 1' upgrade.").getInt(darkSteelSpeedOneCost);
|
||||
darkSteelSpeedTwoCost = config.get(sectionDarkSteel.name, "darkSteelSpeedTwoCost", darkSteelSpeedTwoCost,
|
||||
"Number of levels required for the 'Speed 2' upgrade.").getInt(darkSteelSpeedTwoCost);
|
||||
darkSteelSpeedThreeCost = config.get(sectionDarkSteel.name, "darkSteelSpeedThreeCost", darkSteelSpeedThreeCost,
|
||||
"Number of levels required for the 'Speed 3' upgrade.").getInt(darkSteelSpeedThreeCost);
|
||||
|
||||
|
||||
slotZeroPlacesEight = config.get(sectionDarkSteel.name, "shouldSlotZeroWrap", slotZeroPlacesEight, "Should the dark steel placement, when in the first (0th) slot, place the item in the last slot. If false, will place what's in the second slot.").getBoolean();
|
||||
|
||||
|
||||
darkSteelSpeedOneWalkModifier = (float) config.get(sectionDarkSteel.name, "darkSteelSpeedOneWalkModifier", darkSteelSpeedOneWalkModifier,
|
||||
"Speed modifier applied when walking in the Dark Steel Boots with Speed I.").getDouble(darkSteelSpeedOneWalkModifier);
|
||||
darkSteelSpeedTwoWalkMultiplier = (float) config.get(sectionDarkSteel.name, "darkSteelSpeedTwoWalkMultiplier", darkSteelSpeedTwoWalkMultiplier,
|
||||
@@ -805,16 +811,16 @@ public final class Config {
|
||||
"Range of the 'Sound Locator' upgrade.").getInt(darkSteelSoundLocatorRange);
|
||||
darkSteelSoundLocatorLifespan = config.get(sectionDarkSteel.name, "darkSteelSoundLocatorLifespan", darkSteelSoundLocatorLifespan,
|
||||
"Number of ticks the 'Sound Locator' icons are displayed for.").getInt(darkSteelSoundLocatorLifespan);
|
||||
|
||||
|
||||
darkSteelGogglesOfRevealingCost= config.get(sectionDarkSteel.name, "darkSteelGogglesOfRevealingCost", darkSteelGogglesOfRevealingCost,
|
||||
"Number of levels required for the Goggles of Revealing upgrade.").getInt(darkSteelGogglesOfRevealingCost);
|
||||
|
||||
|
||||
darkSteelApiaristArmorCost= config.get(sectionDarkSteel.name, "darkSteelApiaristArmorCost", darkSteelApiaristArmorCost,
|
||||
"Number of levels required for the Apiarist Armor upgrade.").getInt(darkSteelApiaristArmorCost);
|
||||
|
||||
darkSteelTravelCost = config.get(sectionDarkSteel.name, "darkSteelTravelCost", darkSteelTravelCost,
|
||||
"Number of levels required for the 'Travel' upgrade.").getInt(darkSteelTravelCost);
|
||||
|
||||
|
||||
darkSteelSpoonCost = config.get(sectionDarkSteel.name, "darkSteelSpoonCost", darkSteelSpoonCost,
|
||||
"Number of levels required for the 'Spoon' upgrade.").getInt(darkSteelSpoonCost);
|
||||
|
||||
@@ -822,7 +828,7 @@ public final class Config {
|
||||
"Cost in XP levels of the Solar I upgrade.").getInt();
|
||||
darkSteelSolarOneGen = config.get(sectionDarkSteel.name, "darkSteelSolarOneGen", darkSteelSolarOneGen,
|
||||
"RF per SECOND generated by the Solar I upgrade. Split between all equipped DS armors.").getInt();
|
||||
|
||||
|
||||
darkSteelSolarTwoCost = config.get(sectionDarkSteel.name, "darkSteelSolarTwoCost", darkSteelSolarTwoCost,
|
||||
"Cost in XP levels of the Solar II upgrade.").getInt();
|
||||
darkSteelSolarTwoGen = config.get(sectionDarkSteel.name, "darkSteelSolarTwoGen", darkSteelSolarTwoGen,
|
||||
@@ -905,10 +911,21 @@ public final class Config {
|
||||
darkSteelAxeEffeciencyBoostWhenPowered = (float) config.get(sectionDarkSteel.name, "darkSteelAxeEffeciencyBoostWhenPowered",
|
||||
darkSteelAxeEffeciencyBoostWhenPowered, "The increase in efficiency when powered.").getDouble(darkSteelAxeEffeciencyBoostWhenPowered);
|
||||
|
||||
darkSteelShearsDurabilityFactor = config.get(sectionDarkSteel.name, "darkSteelShearsDurabilityFactor", darkSteelShearsDurabilityFactor,
|
||||
"How much more durable as vanilla shears they are.").getInt(darkSteelShearsDurabilityFactor);
|
||||
darkSteelShearsPowerUsePerDamagePoint = config.get(sectionDarkSteel.name, "darkSteelShearsPowerUsePerDamagePoint", darkSteelShearsPowerUsePerDamagePoint,
|
||||
"Power use (RF) per damage/durability point avoided.").getInt(darkSteelShearsPowerUsePerDamagePoint);
|
||||
darkSteelShearsEffeciencyBoostWhenPowered = (float) config.get(sectionDarkSteel.name, "darkSteelShearsEffeciencyBoostWhenPowered",
|
||||
darkSteelShearsEffeciencyBoostWhenPowered, "The increase in efficiency when powered.").getDouble(darkSteelShearsEffeciencyBoostWhenPowered);
|
||||
darkSteelShearsBlockAreaBoostWhenPowered = config.get(sectionDarkSteel.name, "darkSteelShearsBlockAreaBoostWhenPowered", darkSteelShearsBlockAreaBoostWhenPowered,
|
||||
"The increase in effected area (radius) when powered and used on blocks.").getInt(darkSteelShearsBlockAreaBoostWhenPowered);
|
||||
darkSteelShearsEntityAreaBoostWhenPowered = (float) config.get(sectionDarkSteel.name, "darkSteelShearsEntityAreaBoostWhenPowered",
|
||||
darkSteelShearsEntityAreaBoostWhenPowered, "The increase in effected area (radius) when powered and used on sheep.").getDouble(darkSteelShearsEntityAreaBoostWhenPowered);
|
||||
|
||||
darkSteelAnvilDamageChance = (float) config.get(sectionDarkSteel.name, "darkSteelAnvilDamageChance", darkSteelAnvilDamageChance, "Chance that the dark steel anvil will take damage after repairing something.").getDouble();
|
||||
|
||||
darkSteelLadderSpeedBoost = (float) config.get(sectionDarkSteel.name, "darkSteelLadderSpeedBoost", darkSteelLadderSpeedBoost, "Speed boost, in blocks per tick, that the DS ladder gives over the vanilla ladder.").getDouble();
|
||||
|
||||
|
||||
hootchPowerPerCycleRF = config.get(sectionPower.name, "hootchPowerPerCycleRF", hootchPowerPerCycleRF,
|
||||
"The amount of power generated per BC engine cycle. Examples: BC Oil = 30, BC Fuel = 60").getInt(hootchPowerPerCycleRF);
|
||||
hootchPowerTotalBurnTime = config.get(sectionPower.name, "hootchPowerTotalBurnTime", hootchPowerTotalBurnTime,
|
||||
@@ -967,15 +984,15 @@ public final class Config {
|
||||
|
||||
disableFarmNotification = config.get(sectionFarm.name, "disableFarmNotifications", disableFarmNotification,
|
||||
"Disable the notification text above the farm block.").getBoolean();
|
||||
|
||||
|
||||
farmEssenceBerriesEnabled = config.get(sectionFarm.name, "farmEssenceBerriesEnabled", farmEssenceBerriesEnabled,
|
||||
"This setting controls whether essence berry bushes from TiC can be harvested by the farm.").getBoolean();
|
||||
|
||||
farmManaBeansEnabled = config.get(sectionFarm.name, "farmManaBeansEnabled", farmManaBeansEnabled,
|
||||
"This setting controls whether mana beans from Thaumcraft can be harvested by the farm.").getBoolean();
|
||||
|
||||
|
||||
farmHarvestJungleWhenCocoa = config.get(sectionFarm.name, "farmHarvestJungleWhenCocoa", farmHarvestJungleWhenCocoa,
|
||||
"If this is enabled the farm will harvest jungle wood even if it has cocoa beans in its inventory.").getBoolean();
|
||||
"If this is enabled the farm will harvest jungle wood even if it has cocoa beans in its inventory.").getBoolean();
|
||||
|
||||
hoeStrings = config.get(sectionFarm.name, "farmHoes", hoeStrings,
|
||||
"Use this to specify items that can be hoes in the farming station. Use the registry name (eg. modid:name).").getStringList();
|
||||
@@ -1019,12 +1036,12 @@ public final class Config {
|
||||
poweredSpawnerUseVanillaSpawChecks = config.get(sectionSpawner.name, "poweredSpawnerUseVanillaSpawChecks", poweredSpawnerUseVanillaSpawChecks,
|
||||
"If true, regular spawn checks such as lighting level and dimension will be made before spawning mobs").getBoolean(poweredSpawnerUseVanillaSpawChecks);
|
||||
brokenSpawnerDropChance = (float) config.get(sectionSpawner.name, "brokenSpawnerDropChance", brokenSpawnerDropChance,
|
||||
"The chance a broken spawner will be dropped when a spawner is broken. 1 = 100% chance, 0 = 0% chance").getDouble(brokenSpawnerDropChance);
|
||||
brokenSpawnerToolBlacklist = config.getStringList("brokenSpawnerToolBlacklist", sectionSpawner.name, brokenSpawnerToolBlacklist,
|
||||
"The chance a broken spawner will be dropped when a spawner is broken. 1 = 100% chance, 0 = 0% chance").getDouble(brokenSpawnerDropChance);
|
||||
brokenSpawnerToolBlacklist = config.getStringList("brokenSpawnerToolBlacklist", sectionSpawner.name, brokenSpawnerToolBlacklist,
|
||||
"When a spawner is broken with these tools they will not drop a broken spawner");
|
||||
|
||||
|
||||
powerSpawnerAddSpawnerCost = config.get(sectionSpawner.name, "powerSpawnerAddSpawnerCost", powerSpawnerAddSpawnerCost,
|
||||
"The number of levels it costs to add a broken spawner").getInt(powerSpawnerAddSpawnerCost);
|
||||
"The number of levels it costs to add a broken spawner").getInt(powerSpawnerAddSpawnerCost);
|
||||
|
||||
useModMetals = config.get(sectionRecipe.name, "useModMetals", useModMetals,
|
||||
"If true copper and tin will be used in recipes when registered in the ore dictionary").getBoolean(useModMetals);
|
||||
@@ -1040,7 +1057,7 @@ public final class Config {
|
||||
killerJoeAttackWidth = config.get(sectionKiller.name, "killerJoeAttackWidth", killerJoeAttackWidth,
|
||||
"The reach of attacks to each side of Joe.").getDouble(killerJoeAttackWidth);
|
||||
killerJoeAttackLength = config.get(sectionKiller.name, "killerJoeAttackLength", killerJoeAttackLength,
|
||||
"The reach of attacks in front of Joe.").getDouble(killerJoeAttackLength);
|
||||
"The reach of attacks in front of Joe.").getDouble(killerJoeAttackLength);
|
||||
killerJoeHooverXpLength = config.get(sectionKiller.name, "killerJoeHooverXpLength", killerJoeHooverXpLength,
|
||||
"The distance from which XP will be gathered to each side of Joe.").getDouble(killerJoeHooverXpLength);
|
||||
killerJoeHooverXpWidth = config.get(sectionKiller.name, "killerJoeHooverXpWidth", killerJoeHooverXpWidth,
|
||||
@@ -1077,7 +1094,7 @@ public final class Config {
|
||||
"The number of RF required to create an attractor crystal.").getInt(soulBinderAttractorCystalRF);
|
||||
soulBinderEnderRailRF = config.get(sectionSoulBinder.name, "soulBinderEnderRailRF", soulBinderEnderRailRF,
|
||||
"The number of RF required to create an ender rail.").getInt(soulBinderEnderRailRF);
|
||||
|
||||
|
||||
soulBinderAttractorCystalLevels = config.get(sectionSoulBinder.name, "soulBinderAttractorCystalLevels", soulBinderAttractorCystalLevels,
|
||||
"The number of levels required to create an attractor crystal.").getInt(soulBinderAttractorCystalLevels);
|
||||
soulBinderEnderCystalLevels = config.get(sectionSoulBinder.name, "soulBinderEnderCystalLevels", soulBinderEnderCystalLevels,
|
||||
@@ -1087,7 +1104,7 @@ public final class Config {
|
||||
soulBinderBrokenSpawnerLevels = config.get(sectionSoulBinder.name, "soulBinderBrokenSpawnerLevels", soulBinderBrokenSpawnerLevels,
|
||||
"The number of levels required to change the type of a broken spawner.").getInt(soulBinderBrokenSpawnerLevels);
|
||||
soulBinderEnderRailLevels = config.get(sectionSoulBinder.name, "soulBinderEnderRailLevels", soulBinderEnderRailLevels,
|
||||
"The number of levels required to create an ender rail.").getInt(soulBinderEnderRailLevels);
|
||||
"The number of levels required to create an ender rail.").getInt(soulBinderEnderRailLevels);
|
||||
|
||||
soulBinderMaxXpLevel = config.get(sectionSoulBinder.name, "soulBinderMaxXPLevel", soulBinderMaxXpLevel, "Maximum level of XP the soul binder can contain.").getInt();
|
||||
|
||||
@@ -1098,36 +1115,36 @@ public final class Config {
|
||||
"The number of RF/t consumed by a Slice'N'Splice with a double layer capacitor upgrade.").getInt(sliceAndSpliceLevelTwoPowerPerTickRF);
|
||||
sliceAndSpliceLevelThreePowerPerTickRF = config.get(sectionPower.name, "sliceAndSpliceLevelThreePowerPerTickRF", sliceAndSpliceLevelThreePowerPerTickRF,
|
||||
"The number of RF/t consumed by a Slice'N'Splice with an octadic capacitor upgrade.").getInt(sliceAndSpliceLevelThreePowerPerTickRF);
|
||||
|
||||
attractorRangeLevelOne = config.get(sectionAttractor.name, "attractorRangeLevelOne", attractorRangeLevelOne,
|
||||
|
||||
attractorRangeLevelOne = config.get(sectionAttractor.name, "attractorRangeLevelOne", attractorRangeLevelOne,
|
||||
"The range of the mob attractor with no upgrades").getInt(attractorRangeLevelOne);
|
||||
attractorRangeLevelTwo = config.get(sectionAttractor.name, "attractorRangeLevelTwo", attractorRangeLevelTwo,
|
||||
attractorRangeLevelTwo = config.get(sectionAttractor.name, "attractorRangeLevelTwo", attractorRangeLevelTwo,
|
||||
"The range of the mob attractor with a double layer capacitor upgrade").getInt(attractorRangeLevelTwo);
|
||||
attractorRangeLevelThree = config.get(sectionAttractor.name, "attractorRangeLevelThree", attractorRangeLevelThree,
|
||||
"The range of the mob attractor with an octadic capacitor upgrade").getInt(attractorRangeLevelThree);
|
||||
attractorPowerPerTickLevelOne = config.get(sectionAttractor.name, "attractorPowerPerTickLevelOne", attractorPowerPerTickLevelOne,
|
||||
attractorRangeLevelThree = config.get(sectionAttractor.name, "attractorRangeLevelThree", attractorRangeLevelThree,
|
||||
"The range of the mob attractor with an octadic capacitor upgrade").getInt(attractorRangeLevelThree);
|
||||
attractorPowerPerTickLevelOne = config.get(sectionAttractor.name, "attractorPowerPerTickLevelOne", attractorPowerPerTickLevelOne,
|
||||
"The RF/t power use of a levele 1 mob attractor").getInt(attractorPowerPerTickLevelOne);
|
||||
attractorPowerPerTickLevelTwo = config.get(sectionAttractor.name, "attractorPowerPerTickLevelTwo", attractorPowerPerTickLevelTwo,
|
||||
attractorPowerPerTickLevelTwo = config.get(sectionAttractor.name, "attractorPowerPerTickLevelTwo", attractorPowerPerTickLevelTwo,
|
||||
"The RF/t power use of a levele 2 mob attractor").getInt(attractorPowerPerTickLevelTwo);
|
||||
attractorPowerPerTickLevelThree = config.get(sectionAttractor.name, "attractorPowerPerTickLevelThree", attractorPowerPerTickLevelThree,
|
||||
attractorPowerPerTickLevelThree = config.get(sectionAttractor.name, "attractorPowerPerTickLevelThree", attractorPowerPerTickLevelThree,
|
||||
"The RF/t power use of a levele 3 mob attractor").getInt(attractorPowerPerTickLevelThree);
|
||||
|
||||
|
||||
spawnGuardRangeLevelOne = config.get(sectionAttractor.name, "spawnGuardRangeLevelOne", spawnGuardRangeLevelOne,
|
||||
|
||||
|
||||
spawnGuardRangeLevelOne = config.get(sectionAttractor.name, "spawnGuardRangeLevelOne", spawnGuardRangeLevelOne,
|
||||
"The range of the spawn guard with no upgrades").getInt(spawnGuardRangeLevelOne);
|
||||
spawnGuardRangeLevelTwo = config.get(sectionAttractor.name, "spawnGuardRangeLevelTwo", spawnGuardRangeLevelTwo,
|
||||
spawnGuardRangeLevelTwo = config.get(sectionAttractor.name, "spawnGuardRangeLevelTwo", spawnGuardRangeLevelTwo,
|
||||
"The range of the spawn guard with a double layer capacitor upgrade").getInt(spawnGuardRangeLevelTwo);
|
||||
spawnGuardRangeLevelThree = config.get(sectionAttractor.name, "spawnGuardRangeLevelThree", spawnGuardRangeLevelThree,
|
||||
"The range of the spawn guard with an octadic capacitor upgrade").getInt(spawnGuardRangeLevelThree);
|
||||
spawnGuardPowerPerTickLevelOne = config.get(sectionAttractor.name, "spawnGuardPowerPerTickLevelOne", spawnGuardPowerPerTickLevelOne,
|
||||
spawnGuardRangeLevelThree = config.get(sectionAttractor.name, "spawnGuardRangeLevelThree", spawnGuardRangeLevelThree,
|
||||
"The range of the spawn guard with an octadic capacitor upgrade").getInt(spawnGuardRangeLevelThree);
|
||||
spawnGuardPowerPerTickLevelOne = config.get(sectionAttractor.name, "spawnGuardPowerPerTickLevelOne", spawnGuardPowerPerTickLevelOne,
|
||||
"The RF/t power use of a levele 1 spawn guard").getInt(spawnGuardPowerPerTickLevelOne);
|
||||
spawnGuardPowerPerTickLevelTwo = config.get(sectionAttractor.name, "spawnGuardPowerPerTickLevelTwo", spawnGuardPowerPerTickLevelTwo,
|
||||
spawnGuardPowerPerTickLevelTwo = config.get(sectionAttractor.name, "spawnGuardPowerPerTickLevelTwo", spawnGuardPowerPerTickLevelTwo,
|
||||
"The RF/t power use of a levele 2 spawn guard").getInt(spawnGuardPowerPerTickLevelTwo);
|
||||
spawnGuardPowerPerTickLevelThree = config.get(sectionAttractor.name, "spawnGuardPowerPerTickLevelThree", spawnGuardPowerPerTickLevelThree,
|
||||
spawnGuardPowerPerTickLevelThree = config.get(sectionAttractor.name, "spawnGuardPowerPerTickLevelThree", spawnGuardPowerPerTickLevelThree,
|
||||
"The RF/t power use of a levele 3 spawn guard").getInt(spawnGuardPowerPerTickLevelThree);
|
||||
spawnGuardStopAllSlimesDebug = config.getBoolean("spawnGuardStopAllSlimesDebug", sectionAttractor.name, spawnGuardStopAllSlimesDebug,
|
||||
"When true slimes wont be allowed to spawn at all. Only added to aid testing in super flat worlds.");
|
||||
spawnGuardStopAllSquidSpawning = config.getBoolean("spawnGuardStopAllSquidSpawning", sectionAttractor.name, spawnGuardStopAllSquidSpawning,
|
||||
spawnGuardStopAllSlimesDebug = config.getBoolean("spawnGuardStopAllSlimesDebug", sectionAttractor.name, spawnGuardStopAllSlimesDebug,
|
||||
"When true slimes wont be allowed to spawn at all. Only added to aid testing in super flat worlds.");
|
||||
spawnGuardStopAllSquidSpawning = config.getBoolean("spawnGuardStopAllSquidSpawning", sectionAttractor.name, spawnGuardStopAllSquidSpawning,
|
||||
"When true no squid will be spawned.");
|
||||
|
||||
weatherObeliskClearItem = config.get(sectionWeather.name, "weatherObeliskClearItem", weatherObeliskClearItem,
|
||||
@@ -1156,24 +1173,24 @@ public final class Config {
|
||||
lootTravelStaff = config.getBoolean("lootTravelStaff", sectionLootConfig.name, lootTravelStaff, "Adds Travel Staff to loot tables");
|
||||
lootTheEnder = config.getBoolean("lootTheEnder", sectionLootConfig.name, lootTheEnder, "Adds The Ender to loot tables");
|
||||
lootDarkSteelBoots = config.getBoolean("lootDarkSteelBoots", sectionLootConfig.name, lootDarkSteelBoots, "Adds Darksteel Boots to loot tables");
|
||||
|
||||
|
||||
enderRailEnabled = config.getBoolean("enderRailEnabled", sectionRailConfig.name, enderRailEnabled, "Wether Ender Rails are enabled");
|
||||
enderRailPowerRequireCrossDimensions = config.get(sectionRailConfig.name, "enderRailPowerRequireCrossDimensions", enderRailPowerRequireCrossDimensions,
|
||||
enderRailPowerRequireCrossDimensions = config.get(sectionRailConfig.name, "enderRailPowerRequireCrossDimensions", enderRailPowerRequireCrossDimensions,
|
||||
"The amount of power required to transport a cart across dimensions").getInt(enderRailPowerRequireCrossDimensions);
|
||||
enderRailPowerRequiredPerBlock = config.get(sectionRailConfig.name, "enderRailPowerRequiredPerBlock", enderRailPowerRequiredPerBlock,
|
||||
enderRailPowerRequiredPerBlock = config.get(sectionRailConfig.name, "enderRailPowerRequiredPerBlock", enderRailPowerRequiredPerBlock,
|
||||
"The amount of power required to teleport a cart per block in the same dimension").getInt(enderRailPowerRequiredPerBlock);
|
||||
enderRailCapSameDimensionPowerAtCrossDimensionCost = config.getBoolean("enderRailCapSameDimensionPowerAtCrossDimensionCost", sectionRailConfig.name, enderRailCapSameDimensionPowerAtCrossDimensionCost,
|
||||
enderRailCapSameDimensionPowerAtCrossDimensionCost = config.getBoolean("enderRailCapSameDimensionPowerAtCrossDimensionCost", sectionRailConfig.name, enderRailCapSameDimensionPowerAtCrossDimensionCost,
|
||||
"When set to true the RF cost of sending a cart within the same dimension will be capped to the cross dimension cost");
|
||||
enderRailTicksBeforeForceSpawningLinkedCarts = config.get(sectionRailConfig.name, "enderRailTicksBeforeForceSpawningLinkedCarts", enderRailTicksBeforeForceSpawningLinkedCarts,
|
||||
enderRailTicksBeforeForceSpawningLinkedCarts = config.get(sectionRailConfig.name, "enderRailTicksBeforeForceSpawningLinkedCarts", enderRailTicksBeforeForceSpawningLinkedCarts,
|
||||
"The number of ticks to wait for the track to clear before force spawning the next cart in a (RailCraft) linked set").getInt(enderRailTicksBeforeForceSpawningLinkedCarts);
|
||||
enderRailTeleportPlayers = config.getBoolean("enderRailTeleportPlayers", sectionRailConfig.name, enderRailTeleportPlayers, "If true player in minecarts will be teleported. WARN: WIP, seems to cause a memory leak.");
|
||||
|
||||
dumpMobNames = config.getBoolean("dumpMobNames", sectionMobConfig.name, dumpMobNames,
|
||||
|
||||
dumpMobNames = config.getBoolean("dumpMobNames", sectionMobConfig.name, dumpMobNames,
|
||||
"When set to true a list of all registered mobs will be dumped to config/enderio/mobTypes.txt The names are in the format required by EIOs mob blacklists.");
|
||||
|
||||
|
||||
xpObeliskMaxXpLevel = config.get(sectionMisc.name, "xpObeliskMaxXpLevel", xpObeliskMaxXpLevel, "Maximum level of XP the xp obelisk can contain.").getInt();
|
||||
xpJuiceName = config.getString("xpJuiceName", sectionMisc.name, xpJuiceName, "Id of liquid XP fluid (WARNING: only for users who know what they are doing - changing this id can break worlds) - this should match the with OpenBlocks when installed");
|
||||
|
||||
|
||||
clearGlassSameTexture = config.getBoolean("clearGlassSameTexture", sectionMisc.name, clearGlassSameTexture, "If true, quite clear glass will use the fused quartz border texture for the block instead of the white border.");
|
||||
clearGlassConnectToFusedQuartz = config.getBoolean("clearGlassConnectToFusedQuartz", sectionMisc.name, clearGlassConnectToFusedQuartz, "If true, quite clear glass will connect textures with fused quartz.");
|
||||
|
||||
@@ -1215,7 +1232,7 @@ public final class Config {
|
||||
stack.setItemDamage(meta);
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
||||
private Config() {
|
||||
}
|
||||
}
|
||||
@@ -26,37 +26,38 @@ public class ItemRecipes {
|
||||
// Wrench
|
||||
ItemStack wrench = new ItemStack(EnderIO.itemYetaWench, 1, 0);
|
||||
GameRegistry.addShapedRecipe(wrench, "s s", " b ", " s ", 's', electricalSteel, 'b', basicGear);
|
||||
|
||||
|
||||
//Magnet
|
||||
ItemStack magnet = new ItemStack(EnderIO.itemMagnet, 1, 0);
|
||||
ItemStack magnet = new ItemStack(EnderIO.itemMagnet, 1, 0);
|
||||
EnderIO.itemMagnet.setEnergy(magnet, 0);
|
||||
GameRegistry.addShapedRecipe(magnet, "scc", " v", "scc", 's', electricalSteel, 'c', conductiveIron, 'v', vibCry);
|
||||
|
||||
//Dark Steel
|
||||
//Dark Steel
|
||||
GameRegistry.addShapedRecipe(DarkSteelItems.itemDarkSteelHelmet.createItemStack(), "sss", "s s", 's', darkSteel);
|
||||
GameRegistry.addShapedRecipe(DarkSteelItems.itemDarkSteelChestplate.createItemStack(), "s s", "sss", "sss", 's', darkSteel);
|
||||
GameRegistry.addShapedRecipe(DarkSteelItems.itemDarkSteelLeggings.createItemStack(), "sss", "s s", "s s", 's', darkSteel);
|
||||
GameRegistry.addShapedRecipe(DarkSteelItems.itemDarkSteelBoots.createItemStack(), "s s", "s s", 's', darkSteel);
|
||||
|
||||
|
||||
ItemStack wing = new ItemStack(DarkSteelItems.itemGliderWing,1,0);
|
||||
GameRegistry.addShapedRecipe(wing, " s", " sl", "sll", 's', darkSteel, 'l', Items.leather);
|
||||
GameRegistry.addShapedRecipe(new ItemStack(DarkSteelItems.itemGliderWing,1,1), " s ", "wsw", " ", 's', darkSteel, 'w', wing);
|
||||
|
||||
|
||||
|
||||
GameRegistry.addShapedRecipe(DarkSteelItems.itemDarkSteelShears.createItemStack(), " s", "s ", 's', darkSteel);
|
||||
|
||||
ItemStack dspp = new ItemStack(EnderIO.blockDarkSteelPressurePlate);
|
||||
GameRegistry.addShapedRecipe(dspp, "ss", 's', darkSteel);
|
||||
|
||||
|
||||
ItemStack dsppSilent = new ItemStack(EnderIO.blockDarkSteelPressurePlate, 1, 1);
|
||||
GameRegistry.addShapedRecipe(dsppSilent, "p", "w", 'p', dspp, 'w', Blocks.wool);
|
||||
|
||||
|
||||
//Soul Vessel
|
||||
GameRegistry.addShapedRecipe(new ItemStack(EnderIO.itemSoulVessel), " s ", "q q", " q ", 's', soularium, 'q', new ItemStack(EnderIO.blockFusedQuartz,1,0));
|
||||
|
||||
|
||||
//XP Rod
|
||||
GameRegistry.addShapedRecipe(new ItemStack(EnderIO.itemXpTransfer), " s", " v ", "s ", 's', soularium, 'v', enAlloy);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void addOreDictionaryRecipes() {
|
||||
ItemStack darkSteel = new ItemStack(EnderIO.itemAlloy, 1, Alloy.DARK_STEEL.ordinal());
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(DarkSteelItems.itemDarkSteelSword.createItemStack(), " s ", " s ", " w ", 's', darkSteel, 'w', "stickWood"));
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package crazypants.enderio.item.darksteel;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraftforge.common.ChestGenHooks;
|
||||
|
||||
import crazypants.enderio.config.Config;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.ChestGenHooks;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.config.Config;
|
||||
|
||||
public class DarkSteelItems {
|
||||
|
||||
@@ -20,6 +19,7 @@ public class DarkSteelItems {
|
||||
public static ItemDarkSteelSword itemDarkSteelSword;
|
||||
public static ItemDarkSteelPickaxe itemDarkSteelPickaxe;
|
||||
public static ItemDarkSteelAxe itemDarkSteelAxe;
|
||||
public static ItemDarkSteelShears itemDarkSteelShears;
|
||||
|
||||
private DarkSteelItems() {
|
||||
}
|
||||
@@ -35,6 +35,8 @@ public class DarkSteelItems {
|
||||
itemDarkSteelSword = ItemDarkSteelSword.create();
|
||||
itemDarkSteelPickaxe = ItemDarkSteelPickaxe.create();
|
||||
itemDarkSteelAxe = ItemDarkSteelAxe.create();
|
||||
itemDarkSteelShears = ItemDarkSteelShears.create();
|
||||
|
||||
}
|
||||
|
||||
public static void addLoot() {
|
||||
@@ -63,5 +65,6 @@ public class DarkSteelItems {
|
||||
MinecraftForgeClient.registerItemRenderer(itemDarkSteelSword, dsr);
|
||||
MinecraftForgeClient.registerItemRenderer(itemDarkSteelPickaxe, dsr);
|
||||
MinecraftForgeClient.registerItemRenderer(itemDarkSteelAxe, dsr);
|
||||
MinecraftForgeClient.registerItemRenderer(itemDarkSteelShears, dsr);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,308 @@
|
||||
package crazypants.enderio.item.darksteel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.command.IEntitySelector;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemShears;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.common.IShearable;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
import cofh.api.energy.IEnergyContainerItem;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIOTab;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.gui.IAdvancedTooltipProvider;
|
||||
import crazypants.enderio.machine.farm.farmers.HarvestResult;
|
||||
import crazypants.util.BlockCoord;
|
||||
import crazypants.util.ItemUtil;
|
||||
import crazypants.util.Lang;
|
||||
|
||||
public class ItemDarkSteelShears extends ItemShears implements IEnergyContainerItem, IAdvancedTooltipProvider, IDarkSteelItem {
|
||||
|
||||
public static boolean isEquipped(EntityPlayer player) {
|
||||
if(player == null) {
|
||||
return false;
|
||||
}
|
||||
ItemStack equipped = player.getCurrentEquippedItem();
|
||||
if(equipped == null) {
|
||||
return false;
|
||||
}
|
||||
return equipped.getItem() == DarkSteelItems.itemDarkSteelShears;
|
||||
}
|
||||
|
||||
public static boolean isEquippedAndPowered(EntityPlayer player, int requiredPower) {
|
||||
return getStoredPower(player) > requiredPower;
|
||||
}
|
||||
|
||||
public static int getStoredPower(EntityPlayer player) {
|
||||
if(!isEquipped(player)) {
|
||||
return 0;
|
||||
}
|
||||
return EnergyUpgrade.getEnergyStored(player.getCurrentEquippedItem());
|
||||
}
|
||||
|
||||
public static ItemDarkSteelShears create() {
|
||||
ItemDarkSteelShears res = new ItemDarkSteelShears();
|
||||
MinecraftForge.EVENT_BUS.register(res);
|
||||
res.init();
|
||||
return res;
|
||||
}
|
||||
|
||||
private final MultiHarvestComparator harvestComparator = new MultiHarvestComparator();
|
||||
private final EntityComparator entityComparator = new EntityComparator();
|
||||
|
||||
protected ItemDarkSteelShears() {
|
||||
super();
|
||||
this.setMaxDamage(this.getMaxDamage() * Config.darkSteelShearsDurabilityFactor);
|
||||
setCreativeTab(EnderIOTab.tabEnderIO);
|
||||
String str = "darkSteel_shears";
|
||||
setUnlocalizedName(str);
|
||||
setTextureName("enderIO:" + str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIngotsRequiredForFullRepair() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
ItemStack is = new ItemStack(this);
|
||||
par3List.add(is);
|
||||
|
||||
is = new ItemStack(this);
|
||||
EnergyUpgrade.EMPOWERED_FOUR.writeToItem(is);
|
||||
EnergyUpgrade.setPowerFull(is);
|
||||
par3List.add(is);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDamaged(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) {
|
||||
if (player.worldObj.isRemote) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int powerStored = getStoredPower(player);
|
||||
if (powerStored < Config.darkSteelShearsPowerUsePerDamagePoint) {
|
||||
return super.onBlockStartBreak(itemstack, x, y, z, player);
|
||||
}
|
||||
|
||||
Block block = player.worldObj.getBlock(x, y, z);
|
||||
if (block instanceof IShearable && ((IShearable)block).isShearable(itemstack, player.worldObj, x, y, z)) {
|
||||
BlockCoord bc = new BlockCoord(x, y, z);
|
||||
HarvestResult res = new HarvestResult(null, bc);
|
||||
|
||||
for (int dx = -Config.darkSteelShearsBlockAreaBoostWhenPowered; dx <= Config.darkSteelShearsBlockAreaBoostWhenPowered; dx++) {
|
||||
for (int dy = -Config.darkSteelShearsBlockAreaBoostWhenPowered; dy <= Config.darkSteelShearsBlockAreaBoostWhenPowered; dy++) {
|
||||
for (int dz = -Config.darkSteelShearsBlockAreaBoostWhenPowered; dz <= Config.darkSteelShearsBlockAreaBoostWhenPowered; dz++) {
|
||||
Block block2 = player.worldObj.getBlock(x+dx, y+dy, z+dz);
|
||||
if (block2 instanceof IShearable && ((IShearable)block2).isShearable(itemstack, player.worldObj, x+dx, y+dy, z+dz)) {
|
||||
res.getHarvestedBlocks().add(new BlockCoord(x+dx, y+dy, z+dz));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<BlockCoord> sortedTargets = new ArrayList<BlockCoord>(res.getHarvestedBlocks());
|
||||
harvestComparator.refPoint = bc;
|
||||
Collections.sort(sortedTargets, harvestComparator);
|
||||
|
||||
int maxBlocks = Math.min(sortedTargets.size(), powerStored / Config.darkSteelShearsPowerUsePerDamagePoint);
|
||||
for (int i=0 ; i < maxBlocks ; i++) {
|
||||
BlockCoord bc2 = sortedTargets.get(i);
|
||||
super.onBlockStartBreak(itemstack, bc2.x, bc2.y, bc2.z, player);
|
||||
if (bc2 != bc) {
|
||||
player.worldObj.setBlockToAir(bc2.x, bc2.y, bc2.z);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
IEntitySelector selectShearable = new IEntitySelector() {
|
||||
@Override
|
||||
public boolean isEntityApplicable(Entity entity) {
|
||||
return entity instanceof IShearable && ((IShearable)entity).isShearable(null, entity.worldObj, (int)entity.posX, (int)entity.posY, (int)entity.posZ);
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public boolean itemInteractionForEntity(ItemStack itemstack, EntityPlayer player, EntityLivingBase entity) {
|
||||
if (entity.worldObj.isRemote) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int powerStored = getStoredPower(player);
|
||||
if (powerStored < Config.darkSteelShearsPowerUsePerDamagePoint) {
|
||||
return super.itemInteractionForEntity(itemstack, player, entity);
|
||||
}
|
||||
|
||||
if (entity instanceof IShearable) {
|
||||
AxisAlignedBB bb = AxisAlignedBB.getBoundingBox(
|
||||
entity.posX - Config.darkSteelShearsEntityAreaBoostWhenPowered, entity.posY - Config.darkSteelShearsEntityAreaBoostWhenPowered, entity.posZ - Config.darkSteelShearsEntityAreaBoostWhenPowered,
|
||||
entity.posX + Config.darkSteelShearsEntityAreaBoostWhenPowered, entity.posY + Config.darkSteelShearsEntityAreaBoostWhenPowered, entity.posZ + Config.darkSteelShearsEntityAreaBoostWhenPowered);
|
||||
List<Entity> sortedTargets = new ArrayList<Entity>(entity.worldObj.selectEntitiesWithinAABB(IShearable.class, bb, selectShearable));
|
||||
entityComparator.refPoint = entity;
|
||||
Collections.sort(sortedTargets, entityComparator);
|
||||
|
||||
boolean result = false;
|
||||
int maxSheep = Math.min(sortedTargets.size(), powerStored / Config.darkSteelShearsPowerUsePerDamagePoint);
|
||||
for (int i=0 ; i < maxSheep ; i++) {
|
||||
Entity entity2 = sortedTargets.get(i);
|
||||
if (entity2 instanceof EntityLivingBase && super.itemInteractionForEntity(itemstack, player, (EntityLivingBase) entity2)) {
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBreakSpeedEvent(PlayerEvent.BreakSpeed evt) {
|
||||
if(evt.originalSpeed > 2.0 && isEquippedAndPowered(evt.entityPlayer, Config.darkSteelShearsPowerUsePerDamagePoint)) {
|
||||
evt.newSpeed = evt.originalSpeed * Config.darkSteelShearsEffeciencyBoostWhenPowered;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDamage(ItemStack stack, int newDamage) {
|
||||
int oldDamage = getDamage(stack);
|
||||
if (newDamage <= oldDamage) {
|
||||
super.setDamage(stack, newDamage);
|
||||
}
|
||||
int damage = newDamage - oldDamage;
|
||||
|
||||
EnergyUpgrade eu = EnergyUpgrade.loadFromItem(stack);
|
||||
if(eu != null && eu.isAbsorbDamageWithPower(stack) && eu.getEnergy() > 0) {
|
||||
eu.extractEnergy(damage * Config.darkSteelShearsPowerUsePerDamagePoint, false);
|
||||
} else {
|
||||
super.setDamage(stack, newDamage);
|
||||
}
|
||||
if(eu != null) {
|
||||
eu.writeToItem(stack);
|
||||
}
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
GameRegistry.registerItem(this, getUnlocalizedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
return EnergyUpgrade.receiveEnergy(container, maxReceive, simulate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
return EnergyUpgrade.extractEnergy(container, maxExtract, simulate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyStored(ItemStack container) {
|
||||
return EnergyUpgrade.getEnergyStored(container);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyStored(ItemStack container) {
|
||||
return EnergyUpgrade.getMaxEnergyStored(container);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack i1, ItemStack i2) {
|
||||
//return i2 != null && i2.getItem() == EnderIO.itemAlloy && i2.getItemDamage() == Alloy.DARK_STEEL.ordinal();
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCommonEntries(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) {
|
||||
DarkSteelRecipeManager.instance.addCommonTooltipEntries(itemstack, entityplayer, list, flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBasicEntries(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) {
|
||||
DarkSteelRecipeManager.instance.addBasicTooltipEntries(itemstack, entityplayer, list, flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDetailedEntries(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) {
|
||||
if(!Config.addDurabilityTootip) {
|
||||
list.add(ItemUtil.getDurabilityString(itemstack));
|
||||
}
|
||||
String str = EnergyUpgrade.getStoredEnergyString(itemstack);
|
||||
if(str != null) {
|
||||
list.add(str);
|
||||
}
|
||||
if(EnergyUpgrade.itemHasAnyPowerUpgrade(itemstack)) {
|
||||
list.add(Lang.localize("item.darkSteel_shears.tooltip.multiHarvest"));
|
||||
list.add(EnumChatFormatting.WHITE + "+" + Config.darkSteelShearsEffeciencyBoostWhenPowered + " "
|
||||
+ Lang.localize("item.darkSteel_pickaxe.tooltip.effPowered"));
|
||||
}
|
||||
DarkSteelRecipeManager.instance.addAdvancedTooltipEntries(itemstack, entityplayer, list, flag);
|
||||
}
|
||||
|
||||
public ItemStack createItemStack() {
|
||||
return new ItemStack(this);
|
||||
}
|
||||
|
||||
private static class MultiHarvestComparator implements Comparator<BlockCoord> {
|
||||
|
||||
BlockCoord refPoint;
|
||||
|
||||
@Override
|
||||
public int compare(BlockCoord arg0, BlockCoord arg1) {
|
||||
int d1 = refPoint.distanceSquared(arg0);
|
||||
int d2 = refPoint.distanceSquared(arg1);
|
||||
return compare(d1, d1);
|
||||
}
|
||||
|
||||
//NB: Copy of Integer.compare, which i sonly in Java 1.7+
|
||||
public static int compare(int x, int y) {
|
||||
return (x < y) ? -1 : ((x == y) ? 0 : 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class EntityComparator implements Comparator<Entity> {
|
||||
|
||||
Entity refPoint;
|
||||
|
||||
@Override
|
||||
public int compare(Entity paramT1, Entity paramT2) {
|
||||
double distanceSqToEntity1 = refPoint.getDistanceSqToEntity(paramT1);
|
||||
double distanceSqToEntity2 = refPoint.getDistanceSqToEntity(paramT2);
|
||||
if (distanceSqToEntity1 < distanceSqToEntity2)
|
||||
return -1;
|
||||
if (distanceSqToEntity1 > distanceSqToEntity2)
|
||||
return 1;
|
||||
// Double.compare() does something with bits now, but for distances it's clear:
|
||||
// if it's neither farther nor nearer is same.
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user