2015-04-23 16:14:22 +00:00
package gregtech.common ;
import gregtech.api.GregTech_API ;
2015-10-22 02:06:25 +00:00
import gregtech.api.enums.* ;
2015-11-01 00:10:52 +00:00
import gregtech.api.enums.TC_Aspects.TC_AspectStack ;
2015-04-23 16:14:22 +00:00
import gregtech.api.interfaces.IProjectileItem ;
import gregtech.api.interfaces.internal.IGT_Mod ;
import gregtech.api.interfaces.internal.IThaumcraftCompat ;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity ;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity ;
import gregtech.api.items.GT_MetaGenerated_Item ;
import gregtech.api.items.GT_MetaGenerated_Tool ;
import gregtech.api.objects.GT_Fluid ;
import gregtech.api.objects.ItemData ;
import gregtech.api.objects.MaterialStack ;
2015-10-22 02:06:25 +00:00
import gregtech.api.util.* ;
2015-04-23 16:14:22 +00:00
import gregtech.common.entities.GT_Entity_Arrow ;
import gregtech.common.items.GT_MetaGenerated_Tool_01 ;
2016-12-23 19:41:22 +00:00
import gregtech.common.items.armor.GuiElectricArmor1 ;
import gregtech.common.items.armor.ModularArmor_Item ;
2016-10-30 21:39:40 +00:00
import gregtech.common.items.armor.gui.ContainerBasicArmor ;
import gregtech.common.items.armor.gui.ContainerElectricArmor1 ;
import gregtech.common.items.armor.gui.GuiModularArmor ;
import gregtech.common.items.armor.gui.InventoryArmor ;
2016-09-06 09:53:19 +00:00
import ic2.core.block.wiring.CableType ;
import ic2.core.item.type.* ;
import ic2.core.ref.ItemName ;
import ic2.core.util.Ic2Color ;
2015-04-23 16:14:22 +00:00
import net.minecraft.enchantment.EnchantmentHelper ;
import net.minecraft.entity.Entity ;
import net.minecraft.entity.EntityLivingBase ;
import net.minecraft.entity.item.EntityItem ;
import net.minecraft.entity.monster.EntityEnderman ;
import net.minecraft.entity.monster.EntitySkeleton ;
import net.minecraft.entity.player.EntityPlayer ;
import net.minecraft.entity.projectile.EntityArrow ;
2016-08-18 13:45:25 +00:00
import net.minecraft.init.* ;
import net.minecraft.inventory.EntityEquipmentSlot ;
2015-04-23 16:14:22 +00:00
import net.minecraft.item.ItemBlock ;
import net.minecraft.item.ItemBow ;
import net.minecraft.item.ItemStack ;
import net.minecraft.item.crafting.CraftingManager ;
import net.minecraft.nbt.NBTTagCompound ;
import net.minecraft.tileentity.TileEntity ;
import net.minecraft.util.DamageSource ;
2016-08-18 13:45:25 +00:00
import net.minecraft.util.SoundCategory ;
2016-09-06 09:53:19 +00:00
import net.minecraft.util.math.AxisAlignedBB ;
2016-08-18 13:45:25 +00:00
import net.minecraft.util.math.BlockPos ;
import net.minecraft.world.GameType ;
2015-04-23 16:14:22 +00:00
import net.minecraft.world.World ;
import net.minecraft.world.gen.feature.WorldGenMinable ;
import net.minecraftforge.common.MinecraftForge ;
import net.minecraftforge.event.entity.EntityJoinWorldEvent ;
import net.minecraftforge.event.entity.living.EnderTeleportEvent ;
import net.minecraftforge.event.entity.player.ArrowLooseEvent ;
import net.minecraftforge.event.entity.player.ArrowNockEvent ;
import net.minecraftforge.event.entity.player.PlayerInteractEvent ;
import net.minecraftforge.event.terraingen.OreGenEvent ;
import net.minecraftforge.event.world.BlockEvent ;
2015-12-06 20:15:41 +00:00
import net.minecraftforge.event.world.ChunkDataEvent ;
2015-04-23 16:14:22 +00:00
import net.minecraftforge.fluids.Fluid ;
import net.minecraftforge.fluids.FluidContainerRegistry ;
import net.minecraftforge.fluids.FluidRegistry ;
import net.minecraftforge.fluids.FluidStack ;
2016-12-23 19:41:22 +00:00
import net.minecraftforge.fml.common.* ;
2016-08-18 13:45:25 +00:00
import net.minecraftforge.fml.common.eventhandler.Event.Result ;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent ;
import net.minecraftforge.fml.common.gameevent.TickEvent ;
import net.minecraftforge.fml.common.network.FMLNetworkEvent ;
import net.minecraftforge.fml.common.network.IGuiHandler ;
import net.minecraftforge.fml.common.network.NetworkRegistry ;
import net.minecraftforge.fml.common.registry.GameRegistry ;
2015-04-23 16:14:22 +00:00
import net.minecraftforge.oredict.OreDictionary ;
import net.minecraftforge.oredict.RecipeSorter ;
import net.minecraftforge.oredict.ShapedOreRecipe ;
import net.minecraftforge.oredict.ShapelessOreRecipe ;
2016-07-25 22:04:21 +00:00
import java.io.File ;
import java.text.DateFormat ;
import java.util.* ;
2015-04-23 16:14:22 +00:00
public abstract class GT_Proxy implements IGT_Mod , IGuiHandler , IFuelHandler {
2015-10-22 02:06:25 +00:00
private static final EnumSet < OreGenEvent . GenerateMinable . EventType > PREVENTED_ORES = EnumSet . of ( OreGenEvent . GenerateMinable . EventType . COAL ,
2016-08-18 13:45:25 +00:00
OreGenEvent . GenerateMinable . EventType . IRON , OreGenEvent . GenerateMinable . EventType . GOLD ,
OreGenEvent . GenerateMinable . EventType . DIAMOND , OreGenEvent . GenerateMinable . EventType . REDSTONE , OreGenEvent . GenerateMinable . EventType . LAPIS ,
OreGenEvent . GenerateMinable . EventType . QUARTZ ) ;
2016-05-18 04:41:36 +00:00
public final HashSet < ItemStack > mRegisteredOres = new HashSet < ItemStack > ( 10000 ) ;
public final ArrayList < String > mSoundNames = new ArrayList < String > ( ) ;
public final ArrayList < ItemStack > mSoundItems = new ArrayList < ItemStack > ( ) ;
public final ArrayList < Integer > mSoundCounts = new ArrayList < Integer > ( ) ;
private final Collection < OreDictEventContainer > mEvents = new HashSet < OreDictEventContainer > ( ) ;
private final Collection < String > mIgnoredItems = new HashSet < String > ( Arrays . asList ( new String [ ] { " itemGhastTear " , " itemFlint " , " itemClay " , " itemBucketSaltWater " ,
2015-10-22 02:06:25 +00:00
" itemBucketFreshWater " , " itemBucketWater " , " itemRock " , " itemReed " , " itemArrow " , " itemSaw " , " itemKnife " , " itemHammer " , " itemChisel " , " itemRubber " ,
" itemEssence " , " itemIlluminatedPanel " , " itemSkull " , " itemRawRubber " , " itemBacon " , " itemJetpackAccelerator " , " itemLazurite " , " itemIridium " ,
" itemTear " , " itemClaw " , " itemFertilizer " , " itemTar " , " itemSlimeball " , " itemCoke " , " itemBeeswax " , " itemBeeQueen " , " itemForcicium " , " itemForcillium " ,
" itemRoyalJelly " , " itemHoneydew " , " itemHoney " , " itemPollen " , " itemReedTypha " , " itemSulfuricAcid " , " itemPotash " , " itemCompressedCarbon " ,
" itemBitumen " , " itemBioFuel " , " itemCokeSugar " , " itemCokeCactus " , " itemCharcoalSugar " , " itemCharcoalCactus " , " itemSludge " , " itemEnrichedAlloy " ,
" itemQuicksilver " , " itemMercury " , " itemOsmium " , " itemUltimateCircuit " , " itemEnergizedStar " , " itemAntimatterMolecule " , " itemAntimatterGlob " ,
" itemCoal " , " itemBoat " , " itemHerbalMedicineCake " , " itemCakeSponge " , " itemFishandPumpkinCakeSponge " , " itemSoulCleaver " , " itemInstantCake " ,
" itemWhippingCream " , " itemGlisteningWhippingCream " , " itemCleaver " , " itemHerbalMedicineWhippingCream " , " itemStrangeWhippingCream " ,
" itemBlazeCleaver " , " itemBakedCakeSponge " , " itemMagmaCake " , " itemGlisteningCake " , " itemOgreCleaver " , " itemFishandPumpkinCake " ,
" itemMagmaWhippingCream " , " itemMultimeter " , " itemSuperconductor " } ) ) ;
2016-05-18 04:41:36 +00:00
private final Collection < String > mIgnoredNames = new HashSet < String > ( Arrays . asList ( new String [ ] { " grubBee " , " chainLink " , " candyCane " , " bRedString " , " bVial " ,
2015-10-22 02:06:25 +00:00
" bFlask " , " anorthositeSmooth " , " migmatiteSmooth " , " slateSmooth " , " travertineSmooth " , " limestoneSmooth " , " orthogneissSmooth " , " marbleSmooth " ,
" honeyDrop " , " lumpClay " , " honeyEqualssugar " , " flourEqualswheat " , " bluestoneInsulated " , " blockWaterstone " , " blockSand " , " blockTorch " ,
" blockPumpkin " , " blockClothRock " , " blockStainedHardenedClay " , " blockQuartzPillar " , " blockQuartzChiselled " , " blockSpawner " , " blockCloth " , " mobHead " ,
" mobEgg " , " enderFlower " , " enderChest " , " clayHardened " , " dayGemMaterial " , " nightGemMaterial " , " snowLayer " , " bPlaceholder " , " hardenedClay " ,
" eternalLifeEssence " , " sandstone " , " wheatRice " , " transdimBlock " , " bambooBasket " , " lexicaBotania " , " livingwoodTwig " , " redstoneCrystal " ,
" pestleAndMortar " , " glowstone " , " whiteStone " , " stoneSlab " , " transdimBlock " , " clayBowl " , " clayPlate " , " ceramicBowl " , " ceramicPlate " , " ovenRack " ,
" clayCup " , " ceramicCup " , " batteryBox " , " transmutationStone " , " torchRedstoneActive " , " coal " , " charcoal " , " cloth " , " cobblestoneSlab " ,
" stoneBrickSlab " , " cobblestoneWall " , " stoneBrickWall " , " cobblestoneStair " , " stoneBrickStair " , " blockCloud " , " blockDirt " , " blockTyrian " ,
" blockCarpet " , " blockFft " , " blockLavastone " , " blockHolystone " , " blockConcrete " , " sunnariumPart " , " brSmallMachineCyaniteProcessor " , " meteoriteCoal " ,
" blockCobble " , " pressOreProcessor " , " crusherOreProcessor " , " grinderOreProcessor " , " blockRubber " , " blockHoney " , " blockHoneydew " , " blockPeat " ,
" blockRadioactive " , " blockSlime " , " blockCocoa " , " blockSugarCane " , " blockLeather " , " blockClayBrick " , " solarPanelHV " , " cableRedNet " , " stoneBowl " ,
" crafterWood " , " taintedSoil " , " brickXyEngineering " , " breederUranium " , " wireMill " , " chunkLazurite " , " aluminumNatural " , " aluminiumNatural " ,
" naturalAluminum " , " naturalAluminium " , " antimatterMilligram " , " antimatterGram " , " strangeMatter " , " coalGenerator " , " electricFurnace " ,
" unfinishedTank " , " valvePart " , " aquaRegia " , " leatherSeal " , " leatherSlimeSeal " , " hambone " , " slimeball " , " clay " , " enrichedUranium " , " camoPaste " ,
" antiBlock " , " burntQuartz " , " salmonRaw " , " blockHopper " , " blockEnderObsidian " , " blockIcestone " , " blockMagicWood " , " blockEnderCore " , " blockHeeEndium " ,
" oreHeeEndPowder " , " oreHeeStardust " , " oreHeeIgneousRock " , " oreHeeInstabilityOrb " , " crystalPureFluix " , " shardNether " , " gemFluorite " ,
2016-08-18 13:45:25 +00:00
" stickObsidian " , " caveCrystal " , " shardCrystal " , " DYECrystal " , " shardFire " , " shardWater " , " shardAir " , " shardEarth " , " ingotRefinedIron " , " blockMarble " , " ingotUnstable " } ) ) ;
2016-05-18 04:41:36 +00:00
private final Collection < String > mInvalidNames = new HashSet < String > ( Arrays . asList ( new String [ ] { " diamondShard " , " redstoneRoot " , " obsidianStick " , " bloodstoneOre " ,
2015-10-22 02:06:25 +00:00
" universalCable " , " bronzeTube " , " ironTube " , " netherTube " , " obbyTube " , " infiniteBattery " , " eliteBattery " , " advancedBattery " , " 10kEUStore " ,
" blueDye " , " MonazitOre " , " quartzCrystal " , " whiteLuminiteCrystal " , " darkStoneIngot " , " invisiumIngot " , " demoniteOrb " , " enderGem " , " starconiumGem " ,
" osmoniumIngot " , " tapaziteGem " , " zectiumIngot " , " foolsRubyGem " , " rubyGem " , " meteoriteGem " , " adamiteShard " , " sapphireGem " , " copperIngot " ,
" ironStick " , " goldStick " , " diamondStick " , " reinforcedStick " , " draconicStick " , " emeraldStick " , " copperStick " , " tinStick " , " silverStick " ,
" bronzeStick " , " steelStick " , " leadStick " , " manyullynStick " , " arditeStick " , " cobaltStick " , " aluminiumStick " , " alumiteStick " , " oilsandsOre " ,
" copperWire " , " superconductorWire " , " sulfuricAcid " , " conveyorBelt " , " ironWire " , " aluminumWire " , " aluminiumWire " , " silverWire " , " tinWire " ,
" dustSiliconSmall " , " AluminumOre " , " plateHeavyT2 " , " blockWool " , " alloyPlateEnergizedHardened " , " gasWood " , " alloyPlateEnergized " , " SilverOre " ,
" LeadOre " , " TinOre " , " CopperOre " , " silverOre " , " leadOre " , " tinOre " , " copperOre " , " bauxiteOre " , " HSLivingmetalIngot " , " oilMoving " , " oilStill " ,
" oilBucket " , " petroleumOre " , " dieselFuel " , " diamondNugget " , " planks " , " wood " , " stick " , " sticks " , " naquadah " , " obsidianRod " , " stoneRod " ,
" thaumiumRod " , " steelRod " , " netherrackRod " , " woodRod " , " ironRod " , " cactusRod " , " flintRod " , " copperRod " , " cobaltRod " , " alumiteRod " , " blueslimeRod " ,
" arditeRod " , " manyullynRod " , " bronzeRod " , " boneRod " , " slimeRod " , " redalloyBundled " , " bluestoneBundled " , " infusedteslatiteInsulated " ,
" redalloyInsulated " , " infusedteslatiteBundled " } ) ) ;
private final DateFormat mDateFormat = DateFormat . getInstance ( ) ;
public ArrayList < String > mBufferedPlayerActivity = new ArrayList ( ) ;
public boolean mHardcoreCables = false ;
public boolean mDisableVanillaOres = true ;
public boolean mNerfDustCrafting = true ;
public boolean mSortToTheEnd = true ;
public boolean mCraftingUnification = true ;
public boolean mInventoryUnification = true ;
public boolean mIncreaseDungeonLoot = true ;
public boolean mAxeWhenAdventure = true ;
public boolean mSurvivalIntoAdventure = false ;
public boolean mNerfedWoodPlank = true ;
public boolean mNerfedVanillaTools = true ;
public boolean mHardRock = false ;
public boolean mHungerEffect = true ;
public boolean mOnline = true ;
public boolean mIgnoreTcon = true ;
public boolean mDisableIC2Cables = false ;
public boolean mAchievements = true ;
public boolean mAE2Integration = true ;
2016-09-15 23:17:08 +00:00
public boolean mArcSmeltIntoAnnealed = true ;
public boolean mMagneticraftRecipes = true ;
2016-10-22 11:04:50 +00:00
public boolean mImmersiveEngineeringRecipes = true ;
2016-09-27 14:35:03 +00:00
private boolean isFirstServerWorldTick = true ;
private boolean mOreDictActivated = false ;
public boolean mChangeHarvestLevels = false ;
public boolean mNerfedCombs = true ;
2016-10-07 15:44:21 +00:00
public boolean mNerfedCrops = true ;
2016-09-27 14:35:03 +00:00
public boolean mGTBees = true ;
public boolean mHideUnusedOres = true ;
public boolean mHideRecyclingRecipes = true ;
public boolean mPollution = true ;
2016-10-13 20:26:10 +00:00
public boolean mExplosionItemDrop = false ;
2015-10-22 02:06:25 +00:00
public int mSkeletonsShootGTArrows = 16 ;
public int mMaxEqualEntitiesAtOneSpot = 3 ;
public int mFlintChance = 30 ;
public int mItemDespawnTime = 6000 ;
public int mUpgradeCount = 4 ;
2015-10-25 21:52:57 +00:00
public int [ ] mHarvestLevel = new int [ 1000 ] ;
public int mGraniteHavestLevel = 3 ;
public int mMaxHarvestLevel = 7 ;
2015-12-08 22:39:41 +00:00
public int mWireHeatingTicks = 4 ;
2016-09-27 14:35:03 +00:00
public int mPollutionSmogLimit = 500000 ;
public int mPollutionPoisonLimit = 750000 ;
public int mPollutionVegetationLimit = 1000000 ;
public int mPollutionSourRainLimit = 2000000 ;
2016-10-26 18:34:04 +00:00
public int mTicksUntilNextCraftSound = 0 ;
2016-09-15 23:17:08 +00:00
public double mMagneticraftBonusOutputPercent = 100 . 0d ;
2016-09-27 14:35:03 +00:00
private World mUniverse = null ;
2016-09-15 23:17:08 +00:00
private final String aTextThermalExpansion = " ThermalExpansion " ;
private final String aTextRailcraft = " Railcraft " ;
private final String aTextTwilightForest = " TwilightForest " ;
private final String aTextForestry = " Forestry " ;
private final String aTextArsmagica2 = " arsmagica2 " ;
2016-09-16 14:01:37 +00:00
public boolean mTEMachineRecipes = false ;
2016-10-13 17:51:14 +00:00
public boolean mEnableAllMaterials = false ;
public boolean mEnableAllComponents = false ;
2015-10-22 02:06:25 +00:00
public GT_Proxy ( ) {
GameRegistry . registerFuelHandler ( this ) ;
MinecraftForge . EVENT_BUS . register ( this ) ;
MinecraftForge . ORE_GEN_BUS . register ( this ) ;
FMLCommonHandler . instance ( ) . bus ( ) . register ( this ) ;
2016-08-18 13:45:25 +00:00
GregTech_API . sThaumcraftCompat = ( IThaumcraftCompat ) GT_Utility . callConstructor ( " gregtech.common.GT_ThaumcraftCompat " , 0 , null , GT_Values . D1 ) ;
2015-10-22 02:06:25 +00:00
for ( FluidContainerRegistry . FluidContainerData tData : FluidContainerRegistry . getRegisteredFluidContainerData ( ) ) {
onFluidContainerRegistration ( new FluidContainerRegistry . FluidContainerRegisterEvent ( tData ) ) ;
}
2016-08-13 02:04:47 +00:00
try {
for ( String tOreName : OreDictionary . getOreNames ( ) ) {
ItemStack tOreStack ;
for ( Iterator i$ = OreDictionary . getOres ( tOreName ) . iterator ( ) ; i$ . hasNext ( ) ; registerOre ( new OreDictionary . OreRegisterEvent ( tOreName , tOreStack ) ) ) {
tOreStack = ( ItemStack ) i$ . next ( ) ;
}
2015-10-22 02:06:25 +00:00
}
2016-08-13 02:04:47 +00:00
} catch ( Throwable e ) { e . printStackTrace ( GT_Log . err ) ; }
2015-10-22 02:06:25 +00:00
}
2016-08-18 13:45:25 +00:00
private static void registerRecipes ( OreDictEventContainer aOre ) {
if ( ( aOre . mEvent . getOre ( ) = = null ) | | ( aOre . mEvent . getOre ( ) . getItem ( ) = = null ) ) {
2015-10-22 02:06:25 +00:00
return ;
}
2016-08-18 13:45:25 +00:00
if ( aOre . mEvent . getOre ( ) . stackSize ! = 1 ) {
aOre . mEvent . getOre ( ) . stackSize = 1 ;
2015-10-22 02:06:25 +00:00
}
if ( aOre . mPrefix ! = null ) {
if ( ! aOre . mPrefix . isIgnored ( aOre . mMaterial ) ) {
2016-08-18 13:45:25 +00:00
aOre . mPrefix . processOre ( aOre . mMaterial = = null ? Materials . _NULL : aOre . mMaterial ,
aOre . mEvent . getName ( ) , aOre . mModID ,
GT_Utility . copyAmount ( 1 , aOre . mEvent . getOre ( ) ) ) ;
2015-10-22 02:06:25 +00:00
}
} else {
2016-12-23 19:41:22 +00:00
System . out . println ( " Thingy Name: " + aOre . mEvent . getName ( ) + " !!!Unknown 'Thingy' detected!!! This Object seems to probably not follow a valid OreDictionary Convention, or I missed a Convention. Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me. " ) ;
2015-10-22 02:06:25 +00:00
}
}
public void onPreLoad ( ) {
GT_Log . out . println ( " GT_Mod: Preload-Phase started! " ) ;
GT_Log . ore . println ( " GT_Mod: Preload-Phase started! " ) ;
GregTech_API . sPreloadStarted = true ;
this . mIgnoreTcon = GregTech_API . sOPStuff . get ( ConfigCategories . general , " ignoreTConstruct " , true ) ;
2015-12-08 22:39:41 +00:00
this . mWireHeatingTicks = GregTech_API . sOPStuff . get ( ConfigCategories . general , " WireHeatingTicks " , 4 ) ;
2015-10-22 02:06:25 +00:00
NetworkRegistry . INSTANCE . registerGuiHandler ( GT_Values . GT , this ) ;
for ( FluidContainerRegistry . FluidContainerData tData : FluidContainerRegistry . getRegisteredFluidContainerData ( ) ) {
2016-08-18 13:45:25 +00:00
if ( ( tData . filledContainer . getItem ( ) = = Items . POTIONITEM ) & & ( tData . filledContainer . getItemDamage ( ) = = 0 ) ) {
2015-10-22 02:06:25 +00:00
tData . fluid . amount = 0 ;
break ;
}
}
GT_Log . out . println ( " GT_Mod: Getting required Items of other Mods. " ) ;
2016-12-23 19:41:22 +00:00
ItemList . TE_Slag . set ( GT_ModHandler . getModItem ( aTextThermalExpansion , " slag " , 1 ) ) ;
ItemList . TE_Slag_Rich . set ( GT_ModHandler . getModItem ( aTextThermalExpansion , " slagRich " , 1 ) ) ;
ItemList . TE_Rockwool . set ( GT_ModHandler . getModItem ( aTextThermalExpansion , " rockwool " , 1 ) ) ;
ItemList . TE_Hardened_Glass . set ( GT_ModHandler . getModItem ( aTextThermalExpansion , " glassHardened " , 1 ) ) ;
ItemList . RC_ShuntingWire . set ( GT_ModHandler . getModItem ( aTextRailcraft , " tile.railcraft.machine.delta " , 1 , 0 ) ) ;
ItemList . RC_ShuntingWireFrame . set ( GT_ModHandler . getModItem ( aTextRailcraft , " tile.railcraft.frame " , 1 , 0 ) ) ;
ItemList . RC_Rail_Standard . set ( GT_ModHandler . getModItem ( aTextRailcraft , " part.rail " , 1 , 0 ) ) ;
ItemList . RC_Rail_Adv . set ( GT_ModHandler . getModItem ( aTextRailcraft , " part.rail " , 1 , 1 ) ) ;
ItemList . RC_Rail_Wooden . set ( GT_ModHandler . getModItem ( aTextRailcraft , " part.rail " , 1 , 2 ) ) ;
ItemList . RC_Rail_HS . set ( GT_ModHandler . getModItem ( aTextRailcraft , " part.rail " , 1 , 3 ) ) ;
ItemList . RC_Rail_Reinforced . set ( GT_ModHandler . getModItem ( aTextRailcraft , " part.rail " , 1 , 4 ) ) ;
ItemList . RC_Rail_Electric . set ( GT_ModHandler . getModItem ( aTextRailcraft , " part.rail " , 1 , 5 ) ) ;
ItemList . RC_Tie_Wood . set ( GT_ModHandler . getModItem ( aTextRailcraft , " part.tie " , 1 , 0 ) ) ;
ItemList . RC_Tie_Stone . set ( GT_ModHandler . getModItem ( aTextRailcraft , " part.tie " , 1 , 1 ) ) ;
ItemList . RC_Bed_Wood . set ( GT_ModHandler . getModItem ( aTextRailcraft , " part.railbed " , 1 , 0 ) ) ;
ItemList . RC_Bed_Stone . set ( GT_ModHandler . getModItem ( aTextRailcraft , " part.railbed " , 1 , 1 ) ) ;
ItemList . RC_Rebar . set ( GT_ModHandler . getModItem ( aTextRailcraft , " part.rebar " , 1 ) ) ;
ItemList . Tool_Sword_Steel . set ( GT_ModHandler . getModItem ( aTextRailcraft , " tool.steel.sword " , 1 ) ) ;
ItemList . Tool_Pickaxe_Steel . set ( GT_ModHandler . getModItem ( aTextRailcraft , " tool.steel.pickaxe " , 1 ) ) ;
ItemList . Tool_Shovel_Steel . set ( GT_ModHandler . getModItem ( aTextRailcraft , " tool.steel.shovel " , 1 ) ) ;
ItemList . Tool_Axe_Steel . set ( GT_ModHandler . getModItem ( aTextRailcraft , " tool.steel.axe " , 1 ) ) ;
ItemList . Tool_Hoe_Steel . set ( GT_ModHandler . getModItem ( aTextRailcraft , " tool.steel.hoe " , 1 ) ) ;
ItemList . TF_LiveRoot . set ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.liveRoot " , 1 , 0 ) ) ;
ItemList . TF_Vial_FieryBlood . set ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.fieryBlood " , 1 ) ) ;
ItemList . TF_Vial_FieryTears . set ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.fieryTears " , 1 ) ) ;
ItemList . FR_Lemon . set ( GT_ModHandler . getModItem ( aTextForestry , " fruits " , 1 , 3 ) ) ;
ItemList . FR_Mulch . set ( GT_ModHandler . getModItem ( aTextForestry , " mulch " , 1 ) ) ;
ItemList . FR_Fertilizer . set ( GT_ModHandler . getModItem ( aTextForestry , " fertilizerCompound " , 1 ) ) ;
ItemList . FR_Compost . set ( GT_ModHandler . getModItem ( aTextForestry , " fertilizerBio " , 1 ) ) ;
ItemList . FR_Silk . set ( GT_ModHandler . getModItem ( aTextForestry , " craftingMaterial " , 1 , 2 ) ) ;
ItemList . FR_Wax . set ( GT_ModHandler . getModItem ( aTextForestry , " beeswax " , 1 ) ) ;
ItemList . FR_WaxCapsule . set ( GT_ModHandler . getModItem ( aTextForestry , " waxCapsule " , 1 ) ) ;
ItemList . FR_RefractoryWax . set ( GT_ModHandler . getModItem ( aTextForestry , " refractoryWax " , 1 ) ) ;
ItemList . FR_RefractoryCapsule . set ( GT_ModHandler . getModItem ( aTextForestry , " refractoryEmpty " , 1 ) ) ;
ItemList . FR_Bee_Drone . set ( GT_ModHandler . getModItem ( aTextForestry , " beeDroneGE " , 1 ) ) ;
ItemList . FR_Bee_Princess . set ( GT_ModHandler . getModItem ( aTextForestry , " beePrincessGE " , 1 ) ) ;
ItemList . FR_Bee_Queen . set ( GT_ModHandler . getModItem ( aTextForestry , " beeQueenGE " , 1 ) ) ;
ItemList . FR_Tree_Sapling . set ( GT_ModHandler . getModItem ( aTextForestry , " sapling " , 1 , GT_ModHandler . getModItem ( aTextForestry , " saplingGE " , 1 ) ) ) ;
ItemList . FR_Butterfly . set ( GT_ModHandler . getModItem ( aTextForestry , " butterflyGE " , 1 ) ) ;
ItemList . FR_Larvae . set ( GT_ModHandler . getModItem ( aTextForestry , " beeLarvaeGE " , 1 ) ) ;
ItemList . FR_Serum . set ( GT_ModHandler . getModItem ( aTextForestry , " serumGE " , 1 ) ) ;
ItemList . FR_Caterpillar . set ( GT_ModHandler . getModItem ( aTextForestry , " caterpillarGE " , 1 ) ) ;
ItemList . FR_PollenFertile . set ( GT_ModHandler . getModItem ( aTextForestry , " pollenFertile " , 1 ) ) ;
ItemList . FR_Stick . set ( GT_ModHandler . getModItem ( aTextForestry , " oakStick " , 1 ) ) ;
ItemList . FR_Casing_Impregnated . set ( GT_ModHandler . getModItem ( aTextForestry , " impregnatedCasing " , 1 ) ) ;
ItemList . FR_Casing_Sturdy . set ( GT_ModHandler . getModItem ( aTextForestry , " sturdyMachine " , 1 ) ) ;
ItemList . FR_Casing_Hardened . set ( GT_ModHandler . getModItem ( aTextForestry , " hardenedMachine " , 1 ) ) ;
2016-08-18 13:45:25 +00:00
ItemList . Bottle_Empty . set ( new ItemStack ( Items . GLASS_BOTTLE , 1 ) ) ;
2016-09-06 09:53:19 +00:00
ItemList . Cell_Universal_Fluid . set ( GT_ModHandler . getIC2Item ( ItemName . fluid_cell , " " , 1 ) ) ;
ItemList . IC2_Item_Casing_Iron . set ( GT_ModHandler . getIC2Item ( ItemName . casing , CasingResourceType . iron , 1 ) ) ;
ItemList . IC2_Item_Casing_Gold . set ( GT_ModHandler . getIC2Item ( ItemName . casing , CasingResourceType . gold , 1 ) ) ;
ItemList . IC2_Item_Casing_Bronze . set ( GT_ModHandler . getIC2Item ( ItemName . casing , CasingResourceType . bronze , 1 ) ) ;
ItemList . IC2_Item_Casing_Copper . set ( GT_ModHandler . getIC2Item ( ItemName . casing , CasingResourceType . copper , 1 ) ) ;
ItemList . IC2_Item_Casing_Tin . set ( GT_ModHandler . getIC2Item ( ItemName . casing , CasingResourceType . tin , 1 ) ) ;
ItemList . IC2_Item_Casing_Lead . set ( GT_ModHandler . getIC2Item ( ItemName . casing , CasingResourceType . lead , 1 ) ) ;
ItemList . IC2_Item_Casing_Steel . set ( GT_ModHandler . getIC2Item ( ItemName . casing , CasingResourceType . steel , 1 ) ) ;
ItemList . IC2_Spray_WeedEx . set ( GT_ModHandler . getIC2Item ( ItemName . crop_res , CropResItemType . weed , 1 ) ) ;
ItemList . IC2_Fuel_Can_Empty . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . fuel_rod , 1 ) ) ;
ItemList . IC2_Fuel_Can_Filled . set ( GT_ModHandler . getIC2Item ( ItemName . uranium_fuel_rod , 1 ) ) ;
ItemList . IC2_Mixed_Metal_Ingot . set ( GT_ModHandler . getIC2Item ( ItemName . ingot , IngotResourceType . alloy , 1 ) ) ;
ItemList . IC2_Fertilizer . set ( GT_ModHandler . getIC2Item ( ItemName . crop_res , CropResItemType . fertilizer , 1 ) ) ;
ItemList . IC2_CoffeeBeans . set ( GT_ModHandler . getIC2Item ( ItemName . crop_res , CropResItemType . coffee_beans , 1 ) ) ;
ItemList . IC2_CoffeePowder . set ( GT_ModHandler . getIC2Item ( ItemName . crop_res , CropResItemType . coffee_powder , 1 ) ) ;
ItemList . IC2_Hops . set ( GT_ModHandler . getIC2Item ( ItemName . crop_res , CropResItemType . hops , 1 ) ) ;
ItemList . IC2_Resin . set ( GT_ModHandler . getIC2Item ( ItemName . misc_resource , MiscResourceType . resin , 1 ) ) ;
ItemList . IC2_Plantball . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . plant_ball , 1 ) ) ;
ItemList . IC2_PlantballCompressed . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . plant_ball , 1 ) ) ;
ItemList . IC2_Crop_Seeds . set ( GT_ModHandler . getIC2Item ( ItemName . crop_res , CropResItemType . coffee_beans , 1 ) ) ;
ItemList . IC2_Grin_Powder . set ( GT_ModHandler . getIC2Item ( ItemName . crop_res , CropResItemType . grin_powder , 1 ) ) ;
ItemList . IC2_Energium_Dust . set ( GT_ModHandler . getIC2Item ( ItemName . dust , DustResourceType . energium , 1 ) ) ;
ItemList . IC2_Scrap . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . scrap , 1 ) ) ;
ItemList . IC2_Scrapbox . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . scrap_box , 1 ) ) ;
ItemList . IC2_Fuel_Rod_Empty . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . fuel_rod , 1 ) ) ;
ItemList . IC2_Food_Can_Empty . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . tin_can , 1 ) ) ;
ItemList . IC2_Food_Can_Filled . set ( GT_ModHandler . getIC2Item ( ItemName . filled_tin_can , 1 ) ) ;
ItemList . IC2_Food_Can_Spoiled . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . tin_can , 1 ) ) ;
ItemList . IC2_Industrial_Diamond . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . industrial_diamond , 1 ) ) ;
ItemList . IC2_Compressed_Coal_Ball . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . coal_ball , 1 ) ) ;
ItemList . IC2_Compressed_Coal_Chunk . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . coal_chunk , 1 ) ) ;
ItemList . IC2_ShaftIron . set ( GT_ModHandler . getIC2Item ( ItemName . rotor_iron , 1 ) ) ;
ItemList . IC2_ShaftSteel . set ( GT_ModHandler . getIC2Item ( ItemName . rotor_steel , 1 ) ) ;
ItemList . IC2_SuBattery . set ( GT_ModHandler . getIC2Item ( ItemName . single_use_battery , 1 ) ) ;
ItemList . IC2_ReBattery . set ( GT_ModHandler . getIC2Item ( ItemName . re_battery , 1 ) ) ;
ItemList . IC2_AdvBattery . set ( GT_ModHandler . getIC2Item ( ItemName . advanced_re_battery , 1 ) ) ;
ItemList . IC2_EnergyCrystal . set ( GT_ModHandler . getIC2Item ( ItemName . energy_crystal , 1 ) ) ;
ItemList . IC2_LapotronCrystal . set ( GT_ModHandler . getIC2Item ( ItemName . lapotron_crystal , 1 ) ) ;
ItemList . IC2_LapotronCrystal . set ( GT_ModHandler . getIC2Item ( ItemName . lapotron_crystal , 1 ) ) ;
ItemList . IC2_LapotronCrystal . set ( GT_ModHandler . getIC2Item ( ItemName . lapotron_crystal , 1 ) ) ;
ItemList . IC2_LapotronCrystal . set ( GT_ModHandler . getIC2Item ( ItemName . lapotron_crystal , 1 ) ) ;
ItemList . Tool_Sword_Bronze . set ( GT_ModHandler . getIC2Item ( ItemName . bronze_sword , 1 ) ) ;
ItemList . Tool_Pickaxe_Bronze . set ( GT_ModHandler . getIC2Item ( ItemName . bronze_pickaxe , 1 ) ) ;
ItemList . Tool_Shovel_Bronze . set ( GT_ModHandler . getIC2Item ( ItemName . bronze_shovel , 1 ) ) ;
ItemList . Tool_Axe_Bronze . set ( GT_ModHandler . getIC2Item ( ItemName . bronze_axe , 1 ) ) ;
ItemList . Tool_Hoe_Bronze . set ( GT_ModHandler . getIC2Item ( ItemName . bronze_hoe , 1 ) ) ;
ItemList . IC2_ForgeHammer . set ( GT_ModHandler . getIC2Item ( ItemName . forge_hammer , 1 ) ) ;
ItemList . IC2_WireCutter . set ( GT_ModHandler . getIC2Item ( ItemName . cutter , 1 ) ) ;
ItemList . Credit_Iron . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . iron_shaft , 1 ) ) ;
ItemList . Circuit_Basic . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . circuit , 1 ) ) ;
ItemList . Circuit_Advanced . set ( GT_ModHandler . getIC2Item ( ItemName . crafting , CraftingItemType . advanced_circuit , 1 ) ) ;
2016-12-16 16:39:12 +00:00
//ItemList.Upgrade_Overclocker.set(GT_ModHandler.getIC2Item(ItemName.upgrade, ItemUpgradeModule.UpgradeType.overclocker, 1));
//ItemList.Upgrade_Battery.set(GT_ModHandler.getIC2Item(ItemName.upgrade, ItemUpgradeModule.UpgradeType.energy_storage, 1));
2016-08-18 13:45:25 +00:00
ItemList . Dye_Bonemeal . set ( new ItemStack ( Items . DYE , 1 , 15 ) ) ;
ItemList . Dye_SquidInk . set ( new ItemStack ( Items . DYE , 1 , 0 ) ) ;
ItemList . Dye_Cocoa . set ( new ItemStack ( Items . DYE , 1 , 3 ) ) ;
ItemList . Book_Written_00 . set ( new ItemStack ( Items . WRITTEN_BOOK , 1 , 0 ) ) ;
ItemList . Food_Baked_Bread . set ( new ItemStack ( Items . BREAD , 1 , 0 ) ) ;
ItemList . Food_Raw_Potato . set ( new ItemStack ( Items . POTATO , 1 , 0 ) ) ;
ItemList . Food_Baked_Potato . set ( new ItemStack ( Items . BAKED_POTATO , 1 , 0 ) ) ;
ItemList . Food_Poisonous_Potato . set ( new ItemStack ( Items . POISONOUS_POTATO , 1 , 0 ) ) ;
2016-12-15 14:58:15 +00:00
2016-08-18 13:45:25 +00:00
OrePrefixes . bottle . mContainerItem = ItemList . Bottle_Empty . get ( 1 ) ;
OrePrefixes . bucket . mContainerItem = new ItemStack ( Items . BUCKET , 1 ) ;
2016-09-06 09:53:19 +00:00
GregTech_API . sFrostHazmatList . add ( ItemName . hazmat_helmet . getItemStack ( ) ) ;
GregTech_API . sFrostHazmatList . add ( ItemName . hazmat_chestplate . getItemStack ( ) ) ;
GregTech_API . sFrostHazmatList . add ( ItemName . hazmat_leggings . getItemStack ( ) ) ;
GregTech_API . sFrostHazmatList . add ( ItemName . rubber_boots . getItemStack ( ) ) ;
GregTech_API . sHeatHazmatList . add ( ItemName . hazmat_helmet . getItemStack ( ) ) ;
GregTech_API . sHeatHazmatList . add ( ItemName . hazmat_chestplate . getItemStack ( ) ) ;
GregTech_API . sHeatHazmatList . add ( ItemName . hazmat_leggings . getItemStack ( ) ) ;
GregTech_API . sHeatHazmatList . add ( ItemName . rubber_boots . getItemStack ( ) ) ;
GregTech_API . sBioHazmatList . add ( ItemName . hazmat_helmet . getItemStack ( ) ) ;
GregTech_API . sBioHazmatList . add ( ItemName . hazmat_chestplate . getItemStack ( ) ) ;
GregTech_API . sBioHazmatList . add ( ItemName . hazmat_leggings . getItemStack ( ) ) ;
GregTech_API . sBioHazmatList . add ( ItemName . rubber_boots . getItemStack ( ) ) ;
GregTech_API . sGasHazmatList . add ( ItemName . hazmat_helmet . getItemStack ( ) ) ;
GregTech_API . sGasHazmatList . add ( ItemName . hazmat_chestplate . getItemStack ( ) ) ;
GregTech_API . sGasHazmatList . add ( ItemName . hazmat_leggings . getItemStack ( ) ) ;
GregTech_API . sGasHazmatList . add ( ItemName . rubber_boots . getItemStack ( ) ) ;
GregTech_API . sRadioHazmatList . add ( ItemName . hazmat_helmet . getItemStack ( ) ) ;
GregTech_API . sRadioHazmatList . add ( ItemName . hazmat_chestplate . getItemStack ( ) ) ;
GregTech_API . sRadioHazmatList . add ( ItemName . hazmat_leggings . getItemStack ( ) ) ;
GregTech_API . sRadioHazmatList . add ( ItemName . rubber_boots . getItemStack ( ) ) ;
GregTech_API . sElectroHazmatList . add ( ItemName . hazmat_helmet . getItemStack ( ) ) ;
GregTech_API . sElectroHazmatList . add ( ItemName . hazmat_chestplate . getItemStack ( ) ) ;
GregTech_API . sElectroHazmatList . add ( ItemName . hazmat_leggings . getItemStack ( ) ) ;
GregTech_API . sElectroHazmatList . add ( ItemName . rubber_boots . getItemStack ( ) ) ;
2016-08-18 13:45:25 +00:00
GregTech_API . sElectroHazmatList . add ( new ItemStack ( Items . CHAINMAIL_HELMET , 1 , 32767 ) ) ;
GregTech_API . sElectroHazmatList . add ( new ItemStack ( Items . CHAINMAIL_CHESTPLATE , 1 , 32767 ) ) ;
GregTech_API . sElectroHazmatList . add ( new ItemStack ( Items . CHAINMAIL_LEGGINGS , 1 , 32767 ) ) ;
GregTech_API . sElectroHazmatList . add ( new ItemStack ( Items . CHAINMAIL_BOOTS , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( new ItemStack ( Items . BOW , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( new ItemStack ( Items . FISHING_ROD , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemList . IC2_ForgeHammer . getWithDamage ( 1 , 32767L , new Object [ 0 ] ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemList . IC2_WireCutter . getWithDamage ( 1 , 32767L , new Object [ 0 ] ) ) ;
2016-09-06 09:53:19 +00:00
GT_ModHandler . sNonReplaceableItems . add ( ItemName . painter . getItemStack ( Ic2Color . white ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemName . cf_pack . getItemStack ( ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemName . jetpack . getItemStack ( ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemName . treetap . getItemStack ( ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemName . weeding_trowel . getItemStack ( ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemName . static_boots . getItemStack ( ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemName . alloy_chestplate . getItemStack ( ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemName . hazmat_helmet . getItemStack ( ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemName . hazmat_chestplate . getItemStack ( ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemName . hazmat_leggings . getItemStack ( ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( ItemName . rubber_boots . getItemStack ( ) ) ;
2016-12-23 19:41:22 +00:00
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextRailcraft , " part.turbine.disk " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextRailcraft , " part.turbine.blade " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextRailcraft , " part.turbine.rotor " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextRailcraft , " borehead.diamond " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextRailcraft , " borehead.steel " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextRailcraft , " borehead.iron " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.plateNaga " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.legsNaga " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.arcticHelm " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.arcticPlate " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.arcticLegs " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.arcticBoots " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.yetiHelm " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.yetiPlate " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.yetiLegs " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextTwilightForest , " item.yetiBoots " , 1 , 32767 ) ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( " appliedenergistics2 " , " item.ToolCertusQuartzCuttingKnife " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( " appliedenergistics2 " , " item.ToolNetherQuartzCuttingKnife " , 1 , 32767 ) ) ;
2016-12-23 19:41:22 +00:00
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextForestry , " apiaristHelmet " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextForestry , " apiaristChest " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextForestry , " apiaristLegs " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextForestry , " apiaristBoots " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextForestry , " frameUntreated " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextForestry , " frameImpregnated " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextForestry , " frameProven " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( aTextForestry , " waxCast " , 1 , 32767 ) ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( " GalacticraftCore " , " item.sensorGlasses " , 1 , 32767 ) ) ;
GT_ModHandler . sNonReplaceableItems . add ( GT_ModHandler . getModItem ( " IC2NuclearControl " , " ItemToolThermometer " , 1 , 32767 ) ) ;
2015-10-22 02:06:25 +00:00
RecipeSorter . register ( " gregtech:shaped " , GT_Shaped_Recipe . class , RecipeSorter . Category . SHAPED , " after:minecraft:shaped before:minecraft:shapeless " ) ;
RecipeSorter . register ( " gregtech:shapeless " , GT_Shapeless_Recipe . class , RecipeSorter . Category . SHAPELESS , " after:minecraft:shapeless " ) ;
}
public void onLoad ( ) {
GT_Log . out . println ( " GT_Mod: Beginning Load-Phase. " ) ;
GT_Log . ore . println ( " GT_Mod: Beginning Load-Phase. " ) ;
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " cropChilipepper " , GT_ModHandler . getModItem ( " magicalcrops " , " magicalcrops_CropProduce " , 1 , 2 ) ) ;
GT_OreDictUnificator . registerOre ( " cropTomato " , GT_ModHandler . getModItem ( " magicalcrops " , " magicalcrops_CropProduce " , 1 , 8 ) ) ;
GT_OreDictUnificator . registerOre ( " cropGrape " , GT_ModHandler . getModItem ( " magicalcrops " , " magicalcrops_CropProduce " , 1 , 4 ) ) ;
GT_OreDictUnificator . registerOre ( " cropTea " , GT_ModHandler . getModItem ( " ganyssurface " , " teaLeaves " , 1 , 0 ) ) ;
2015-10-22 02:06:25 +00:00
GregTech_API . sLoadStarted = true ;
for ( FluidContainerRegistry . FluidContainerData tData : FluidContainerRegistry . getRegisteredFluidContainerData ( ) ) {
2016-08-18 13:45:25 +00:00
if ( ( tData . filledContainer . getItem ( ) = = Items . POTIONITEM ) & & ( tData . filledContainer . getItemDamage ( ) = = 0 ) ) {
2015-10-22 02:06:25 +00:00
tData . fluid . amount = 0 ;
break ;
}
}
}
public void onPostLoad ( ) {
GT_Log . out . println ( " GT_Mod: Beginning PostLoad-Phase. " ) ;
GT_Log . ore . println ( " GT_Mod: Beginning PostLoad-Phase. " ) ;
if ( GT_Log . pal ! = null ) {
new Thread ( new GT_PlayerActivityLogger ( ) ) . start ( ) ;
}
GregTech_API . sPostloadStarted = true ;
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addItemData ( new ItemStack ( Items . IRON_DOOR , 1 ) , new ItemData ( Materials . Iron , 21772800L , new MaterialStack [ 0 ] ) ) ;
GT_OreDictUnificator . addItemData ( new ItemStack ( Items . ACACIA_DOOR , 1 , 32767 ) , new ItemData ( Materials . Wood , 21772800L , new MaterialStack [ 0 ] ) ) ;
GT_OreDictUnificator . addItemData ( new ItemStack ( Items . BIRCH_DOOR , 1 , 32767 ) , new ItemData ( Materials . Wood , 21772800L , new MaterialStack [ 0 ] ) ) ;
GT_OreDictUnificator . addItemData ( new ItemStack ( Items . JUNGLE_DOOR , 1 , 32767 ) , new ItemData ( Materials . Wood , 21772800L , new MaterialStack [ 0 ] ) ) ;
GT_OreDictUnificator . addItemData ( new ItemStack ( Items . OAK_DOOR , 1 , 32767 ) , new ItemData ( Materials . Wood , 21772800L , new MaterialStack [ 0 ] ) ) ;
GT_OreDictUnificator . addItemData ( new ItemStack ( Items . SPRUCE_DOOR , 1 , 32767 ) , new ItemData ( Materials . Wood , 21772800L , new MaterialStack [ 0 ] ) ) ;
GT_OreDictUnificator . addItemData ( new ItemStack ( Items . DARK_OAK_DOOR , 1 , 32767 ) , new ItemData ( Materials . Wood , 21772800L , new MaterialStack [ 0 ] ) ) ;
2015-10-22 02:06:25 +00:00
for ( FluidContainerRegistry . FluidContainerData tData : FluidContainerRegistry . getRegisteredFluidContainerData ( ) ) {
2016-08-18 13:45:25 +00:00
if ( ( tData . filledContainer . getItem ( ) = = Items . POTIONITEM ) & & ( tData . filledContainer . getItemDamage ( ) = = 0 ) ) {
2015-10-22 02:06:25 +00:00
tData . fluid . amount = 0 ;
break ;
}
}
GT_Log . out . println ( " GT_Mod: Adding Configs specific for MetaTileEntities " ) ;
2016-09-15 23:17:08 +00:00
try {
for ( int i = 1 ; i < GregTech_API . METATILEENTITIES . length ; i + + ) {
2015-10-22 02:06:25 +00:00
for ( ; i < GregTech_API . METATILEENTITIES . length ; i + + ) {
if ( GregTech_API . METATILEENTITIES [ i ] ! = null ) {
GregTech_API . METATILEENTITIES [ i ] . onConfigLoad ( GregTech_API . sMachineFile ) ;
}
}
}
2016-12-23 19:41:22 +00:00
} catch ( Throwable e ) {
e . printStackTrace ( GT_Log . err ) ;
2015-10-22 02:06:25 +00:00
}
GT_Log . out . println ( " GT_Mod: Adding Tool Usage Crafting Recipes for OreDict Items. " ) ;
long tBits = GT_ModHandler . RecipeBits . DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler . RecipeBits . BUFFERED
| GT_ModHandler . RecipeBits . ONLY_ADD_IF_RESULT_IS_NOT_NULL | GT_ModHandler . RecipeBits . NOT_REMOVABLE ;
2016-08-21 10:57:36 +00:00
for ( Materials aMaterial : Materials . values ( ) ) {
2015-10-22 02:06:25 +00:00
if ( ( aMaterial . mUnificatable ) & & ( aMaterial . mMaterialInto = = aMaterial ) ) {
2016-12-23 19:41:22 +00:00
/ * if ( ! aMaterial . contains ( SubTag . NO_SMASHING ) ) {
2015-10-22 02:06:25 +00:00
if ( GregTech_API . sRecipeFile . get ( ConfigCategories . Tools . hammerplating , aMaterial . toString ( ) , true ) ) {
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . plate , aMaterial , 1 ) , tBits , new Object [ ] { " h " , " X " , " X " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'X' ) , OrePrefixes . ingot . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . plate , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " h " , " X " , Character . valueOf ( 'X' ) , OrePrefixes . gem . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . plate , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " H " , " X " , Character . valueOf ( 'H' ) , ToolDictNames . craftingToolForgeHammer , Character . valueOf ( 'X' ) ,
OrePrefixes . ingot . get ( aMaterial ) } ) ;
GT_ModHandler . addCraftingRecipe (
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . get ( OrePrefixes . plate , aMaterial , 1 ) ,
2015-10-22 02:06:25 +00:00
tBits ,
new Object [ ] { " H " , " X " , Character . valueOf ( 'H' ) , ToolDictNames . craftingToolForgeHammer , Character . valueOf ( 'X' ) ,
OrePrefixes . gem . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . plate , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " h " , " X " , Character . valueOf ( 'X' ) , OrePrefixes . ingotDouble . get ( aMaterial ) } ) ;
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . plate , aMaterial , 2L ) , tBits ,
new Object [ ] { " H " , " X " , Character . valueOf ( 'H' ) , ToolDictNames . craftingToolForgeHammer , Character . valueOf ( 'X' ) ,
OrePrefixes . ingotDouble . get ( aMaterial ) } ) ;
}
if ( GregTech_API . sRecipeFile . get ( ConfigCategories . Tools . hammermultiingot , aMaterial . toString ( ) , true ) ) {
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . ingotDouble , aMaterial , 1 ) , tBits , new Object [ ] { " I " , " I " , " h " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'I' ) , OrePrefixes . ingot . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . ingotTriple , aMaterial , 1 ) , tBits , new Object [ ] { " I " , " B " , " h " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'I' ) , OrePrefixes . ingotDouble . get ( aMaterial ) , Character . valueOf ( 'B' ) , OrePrefixes . ingot . get ( aMaterial ) } ) ;
GT_ModHandler
2016-08-18 13:45:25 +00:00
. addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . ingotQuadruple , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " I " , " B " , " h " , Character . valueOf ( 'I' ) , OrePrefixes . ingotTriple . get ( aMaterial ) , Character . valueOf ( 'B' ) ,
OrePrefixes . ingot . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . ingotQuintuple , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " I " , " B " , " h " , Character . valueOf ( 'I' ) , OrePrefixes . ingotQuadruple . get ( aMaterial ) , Character . valueOf ( 'B' ) ,
OrePrefixes . ingot . get ( aMaterial ) } ) ;
}
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadAxe , aMaterial , 1 ) , tBits , new Object [ ] { " PIh " , " P " ,
2015-10-22 02:06:25 +00:00
" f " , Character . valueOf ( 'P' ) , OrePrefixes . plate . get ( aMaterial ) , Character . valueOf ( 'I' ) , OrePrefixes . ingot . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadHammer , aMaterial , 1 ) , tBits , new Object [ ] { " II " , " IIh " ,
2015-10-22 02:06:25 +00:00
" II " , Character . valueOf ( 'P' ) , OrePrefixes . plate . get ( aMaterial ) , Character . valueOf ( 'I' ) , OrePrefixes . ingot . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadHoe , aMaterial , 1 ) , tBits , new Object [ ] { " PIh " , " f " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'P' ) , OrePrefixes . plate . get ( aMaterial ) , Character . valueOf ( 'I' ) , OrePrefixes . ingot . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadPickaxe , aMaterial , 1 ) , tBits , new Object [ ] { " PII " , " f h " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'P' ) , OrePrefixes . plate . get ( aMaterial ) , Character . valueOf ( 'I' ) , OrePrefixes . ingot . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadPlow , aMaterial , 1 ) , tBits , new Object [ ] { " PP " , " PP " , " hf " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'P' ) , OrePrefixes . plate . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadSaw , aMaterial , 1 ) , tBits , new Object [ ] { " PP " , " fh " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'P' ) , OrePrefixes . plate . get ( aMaterial ) , Character . valueOf ( 'I' ) , OrePrefixes . ingot . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadSense , aMaterial , 1 ) , tBits , new Object [ ] { " PPI " , " hf " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'P' ) , OrePrefixes . plate . get ( aMaterial ) , Character . valueOf ( 'I' ) , OrePrefixes . ingot . get ( aMaterial ) } ) ;
GT_ModHandler . addCraftingRecipe (
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . get ( OrePrefixes . toolHeadShovel , aMaterial , 1 ) ,
2015-10-22 02:06:25 +00:00
tBits ,
2016-08-18 13:45:25 +00:00
new Object [ ] { " fPh " , 'P' , OrePrefixes . plate . get ( aMaterial ) , 'I' ,
2015-10-22 02:06:25 +00:00
OrePrefixes . ingot . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadSword , aMaterial , 1 ) , tBits , new Object [ ] { " P " , " fPh " ,
'P' , OrePrefixes . plate . get ( aMaterial ) , 'I' , OrePrefixes . ingot . get ( aMaterial ) } ) ;
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . ring , aMaterial , 1 ) , tBits ,
new Object [ ] { " h " , " X " , 'X' , OrePrefixes . stick . get ( aMaterial ) } ) ;
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . stickLong , aMaterial , 1 ) , tBits ,
new Object [ ] { " ShS " , 'S' , OrePrefixes . stick . get ( aMaterial ) } ) ;
2016-12-23 19:41:22 +00:00
} * /
/ * if ( ! aMaterial . contains ( SubTag . NO_WORKING ) ) {
2015-10-22 02:06:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . stick , aMaterial , 2L ) , tBits ,
new Object [ ] { " s " , " X " , Character . valueOf ( 'X' ) , OrePrefixes . stickLong . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . stick , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " f " , " X " , Character . valueOf ( 'X' ) , OrePrefixes . ingot . get ( aMaterial ) } ) ;
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . bolt , aMaterial , 2L ) , tBits ,
new Object [ ] { " s " , " X " , Character . valueOf ( 'X' ) , OrePrefixes . stick . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . screw , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " fX " , " X " , Character . valueOf ( 'X' ) , OrePrefixes . bolt . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . round , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " fX " , " X " , Character . valueOf ( 'X' ) , OrePrefixes . nugget . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . rotor , aMaterial , 1 ) , tBits , new Object [ ] { " PhP " , " SRf " , " PdP " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'P' ) , aMaterial = = Materials . Wood ? OrePrefixes . plank . get ( aMaterial ) : OrePrefixes . plate . get ( aMaterial ) ,
Character . valueOf ( 'R' ) , OrePrefixes . ring . get ( aMaterial ) , Character . valueOf ( 'S' ) , OrePrefixes . screw . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_Values . RA . addAssemblerRecipe ( GT_OreDictUnificator . get ( OrePrefixes . plate , aMaterial , 4L ) , GT_OreDictUnificator . get ( OrePrefixes . ring , aMaterial , 1 ) , Materials . Tin . getMolten ( 32 ) , GT_OreDictUnificator . get ( OrePrefixes . rotor , aMaterial , 1 ) , 240 , 24 ) ;
GT_Values . RA . addAssemblerRecipe ( GT_OreDictUnificator . get ( OrePrefixes . plate , aMaterial , 4L ) , GT_OreDictUnificator . get ( OrePrefixes . ring , aMaterial , 1 ) , Materials . Lead . getMolten ( 48 ) , GT_OreDictUnificator . get ( OrePrefixes . rotor , aMaterial , 1 ) , 240 , 24 ) ;
GT_Values . RA . addAssemblerRecipe ( GT_OreDictUnificator . get ( OrePrefixes . plate , aMaterial , 4L ) , GT_OreDictUnificator . get ( OrePrefixes . ring , aMaterial , 1 ) , Materials . SolderingAlloy . getMolten ( 16 ) , GT_OreDictUnificator . get ( OrePrefixes . rotor , aMaterial , 1 ) , 240 , 24 ) ;
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . stickLong , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " sf " , " G " , Character . valueOf ( 'G' ) , OrePrefixes . gemFlawless . get ( aMaterial ) } ) ;
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . stickLong , aMaterial , 2L ) , tBits ,
new Object [ ] { " sf " , " G " , Character . valueOf ( 'G' ) , OrePrefixes . gemExquisite . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . wireGt01 , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " Xx " , Character . valueOf ( 'X' ) , OrePrefixes . plate . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . wireFine , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " Xx " , Character . valueOf ( 'X' ) , OrePrefixes . foil . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . turbineBlade , aMaterial , 1 ) , tBits , new Object [ ] { " fPd " , " SPS " , " P " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'P' ) , aMaterial = = Materials . Wood ? OrePrefixes . plank . get ( aMaterial ) : OrePrefixes . plateDouble . get ( aMaterial ) ,
Character . valueOf ( 'R' ) , OrePrefixes . ring . get ( aMaterial ) , Character . valueOf ( 'S' ) , OrePrefixes . screw . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . arrowGtWood , aMaterial , 1 ) , tBits , new Object [ ] { " A " , " S " ,
2015-10-22 02:06:25 +00:00
" F " , Character . valueOf ( 'S' ) , OrePrefixes . stick . get ( Materials . Wood ) , Character . valueOf ( 'F' ) , OreDictNames . craftingFeather ,
Character . valueOf ( 'A' ) , OrePrefixes . toolHeadArrow . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . arrowGtPlastic , aMaterial , 1 ) , tBits , new Object [ ] { " A " , " S " ,
2015-10-22 02:06:25 +00:00
" F " , Character . valueOf ( 'S' ) , OrePrefixes . stick . get ( Materials . Plastic ) , Character . valueOf ( 'F' ) , OreDictNames . craftingFeather ,
Character . valueOf ( 'A' ) , OrePrefixes . toolHeadArrow . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadArrow , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " Xf " , Character . valueOf ( 'X' ) , OrePrefixes . gemChipped . get ( aMaterial ) } ) ;
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadArrow , aMaterial , 3L ) , tBits ,
new Object [ ] { ( aMaterial . contains ( SubTag . WOOD ) ? 115 : 'x' ) + " Pf " , Character . valueOf ( 'P' ) , OrePrefixes . plate . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadAxe , aMaterial , 1 ) , tBits , new Object [ ] { " GG " , " G " ,
2015-10-22 02:06:25 +00:00
" f " , Character . valueOf ( 'G' ) , OrePrefixes . gem . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadHoe , aMaterial , 1 ) , tBits , new Object [ ] { " GG " , " f " ,
2015-10-22 02:06:25 +00:00
" " , Character . valueOf ( 'G' ) , OrePrefixes . gem . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadPickaxe , aMaterial , 1 ) , tBits , new Object [ ] { " GGG " , " f " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'G' ) , OrePrefixes . gem . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadPlow , aMaterial , 1 ) , tBits , new Object [ ] { " GG " , " GG " , " f " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'G' ) , OrePrefixes . gem . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadSaw , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " GGf " , Character . valueOf ( 'G' ) , OrePrefixes . gem . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadSense , aMaterial , 1 ) , tBits , new Object [ ] { " GGG " , " f " ,
2015-10-22 02:06:25 +00:00
" " , Character . valueOf ( 'G' ) , OrePrefixes . gem . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadShovel , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " fG " , Character . valueOf ( 'G' ) , OrePrefixes . gem . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadSword , aMaterial , 1 ) , tBits , new Object [ ] { " G " , " fG " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'G' ) , OrePrefixes . gem . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadUniversalSpade , aMaterial , 1 ) , tBits , new Object [ ] { " fX " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'X' ) , OrePrefixes . toolHeadShovel . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadBuzzSaw , aMaterial , 1 ) , tBits , new Object [ ] { " wXh " , " X X " ,
2015-10-22 02:06:25 +00:00
" fXx " , Character . valueOf ( 'X' ) , OrePrefixes . plate . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadWrench , aMaterial , 1 ) , tBits , new Object [ ] { " hXW " , " XRX " ,
2015-10-22 02:06:25 +00:00
" WXd " , Character . valueOf ( 'X' ) , OrePrefixes . plate . get ( aMaterial ) , Character . valueOf ( 'S' ) , OrePrefixes . plate . get ( Materials . Steel ) ,
Character . valueOf ( 'R' ) , OrePrefixes . ring . get ( Materials . Steel ) , Character . valueOf ( 'W' ) , OrePrefixes . screw . get ( Materials . Steel ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadChainsaw , aMaterial , 1 ) , tBits , new Object [ ] { " SRS " , " XhX " ,
2015-10-22 02:06:25 +00:00
" SRS " , Character . valueOf ( 'X' ) , OrePrefixes . plate . get ( aMaterial ) , Character . valueOf ( 'S' ) , OrePrefixes . plate . get ( Materials . Steel ) ,
Character . valueOf ( 'R' ) , OrePrefixes . ring . get ( Materials . Steel ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . toolHeadDrill , aMaterial , 1 ) , tBits , new Object [ ] { " XSX " , " XSX " ,
2015-10-22 02:06:25 +00:00
" ShS " , Character . valueOf ( 'X' ) , OrePrefixes . plate . get ( aMaterial ) , Character . valueOf ( 'S' ) , OrePrefixes . plate . get ( Materials . Steel ) } ) ;
2016-12-23 19:41:22 +00:00
switch ( aMaterial . mName ) {
case " Wood " :
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . gearGtSmall , aMaterial , 1 ) , tBits , new Object [ ] { " P " , " s " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'P' ) , OrePrefixes . plank . get ( aMaterial ) } ) ;
break ;
2016-12-23 19:41:22 +00:00
case " Stone " :
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . gearGtSmall , aMaterial , 1 ) , tBits , new Object [ ] { " P " , " f " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'P' ) , OrePrefixes . stoneSmooth } ) ;
break ;
default :
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . gearGtSmall , aMaterial , 1 ) , tBits ,
2015-10-22 02:06:25 +00:00
new Object [ ] { " P " , aMaterial . contains ( SubTag . WOOD ) ? " s " : " h " , Character . valueOf ( 'P' ) , OrePrefixes . plate . get ( aMaterial ) } ) ;
}
2016-12-23 19:41:22 +00:00
switch ( aMaterial . mName ) {
case " Wood " :
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . gearGt , aMaterial , 1 ) , tBits , new Object [ ] { " SPS " , " PsP " , " SPS " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'P' ) , OrePrefixes . plank . get ( aMaterial ) , Character . valueOf ( 'S' ) , OrePrefixes . stick . get ( aMaterial ) } ) ;
break ;
2016-12-23 19:41:22 +00:00
case " Stone " :
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . gearGt , aMaterial , 1 ) , tBits , new Object [ ] { " SPS " , " PfP " , " SPS " ,
Character . valueOf ( 'P' ) , OrePrefixes . stoneSmooth , Character . valueOf ( 'S' ) , new ItemStack ( Blocks . STONE_BUTTON , 1 , 32767 ) } ) ;
2015-10-22 02:06:25 +00:00
break ;
default :
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . gearGt , aMaterial , 1 ) , tBits , new Object [ ] { " SPS " , " PwP " , " SPS " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'P' ) , OrePrefixes . plate . get ( aMaterial ) , Character . valueOf ( 'S' ) , OrePrefixes . stick . get ( aMaterial ) } ) ;
}
2016-12-23 19:41:22 +00:00
} * /
/ * if ( aMaterial . contains ( SubTag . SMELTING_TO_GEM ) ) {
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . gem , aMaterial , 1 ) , tBits , new Object [ ] { " XXX " , " XXX " , " XXX " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'X' ) , OrePrefixes . nugget . get ( aMaterial ) } ) ;
} else {
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . ingot , aMaterial , 1 ) , tBits , new Object [ ] { " XXX " , " XXX " , " XXX " ,
2015-10-22 02:06:25 +00:00
Character . valueOf ( 'X' ) , OrePrefixes . nugget . get ( aMaterial ) } ) ;
2016-12-23 19:41:22 +00:00
} * /
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dust , aMaterial . mMacerateInto , 1 ) , tBits , new Object [ ] { " h " , " X " ,
2016-10-19 11:37:36 +00:00
'X' , OrePrefixes . crushedCentrifuged . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dust , aMaterial . mMacerateInto , 1 ) , tBits , new Object [ ] { " h " , " X " ,
2016-10-19 11:37:36 +00:00
'X' , OrePrefixes . crystalline . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dust , aMaterial . mMacerateInto , 1 ) , tBits , new Object [ ] { " h " , " X " ,
2016-10-19 11:37:36 +00:00
'X' , OrePrefixes . crystal . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dustPure , aMaterial . mMacerateInto , 1 ) , tBits , new Object [ ] { " h " , " X " ,
2016-10-19 11:37:36 +00:00
'X' , OrePrefixes . crushedPurified . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dustPure , aMaterial . mMacerateInto , 1 ) , tBits , new Object [ ] { " h " , " X " ,
2016-10-19 11:37:36 +00:00
'X' , OrePrefixes . cleanGravel . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dustPure , aMaterial . mMacerateInto , 1 ) , tBits , new Object [ ] { " h " , " X " ,
2016-10-19 11:37:36 +00:00
'X' , OrePrefixes . reduced . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dustImpure , aMaterial . mMacerateInto , 1 ) , tBits , new Object [ ] { " h " , " X " ,
2016-10-19 11:37:36 +00:00
'X' , OrePrefixes . clump . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dustImpure , aMaterial . mMacerateInto , 1 ) , tBits , new Object [ ] { " h " , " X " ,
2016-10-19 11:37:36 +00:00
'X' , OrePrefixes . shard . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dustImpure , aMaterial . mMacerateInto , 1 ) , tBits , new Object [ ] { " h " , " X " ,
2016-10-19 11:37:36 +00:00
'X' , OrePrefixes . crushed . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dustImpure , aMaterial . mMacerateInto , 1 ) , tBits , new Object [ ] { " h " , " X " ,
2016-10-19 11:37:36 +00:00
'X' , OrePrefixes . dirtyGravel . get ( aMaterial ) } ) ;
2015-10-22 02:06:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dustSmall , aMaterial , 4L ) , tBits ,
2016-10-19 11:37:36 +00:00
new Object [ ] { " X " , " " , 'X' , OrePrefixes . dust . get ( aMaterial ) } ) ;
2015-10-22 02:06:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dustTiny , aMaterial , 9L ) , tBits ,
2016-10-19 11:37:36 +00:00
new Object [ ] { " X " , " " , 'X' , OrePrefixes . dust . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dust , aMaterial , 1 ) , tBits ,
2016-10-19 11:37:36 +00:00
new Object [ ] { " XX " , " XX " , 'X' , OrePrefixes . dustSmall . get ( aMaterial ) } ) ;
2016-08-18 13:45:25 +00:00
GT_ModHandler . addCraftingRecipe ( GT_OreDictUnificator . get ( OrePrefixes . dust , aMaterial , 1 ) , tBits ,
2016-10-19 11:37:36 +00:00
new Object [ ] { " XXX " , " XXX " , " XXX " , 'X' , OrePrefixes . dustTiny . get ( aMaterial ) } ) ;
2016-12-23 19:41:22 +00:00
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), tBits, new Object[]{"Xc", Character.valueOf('X'),
// OrePrefixes.crateGtDust.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L), tBits, new Object[]{"Xc", Character.valueOf('X'),
// OrePrefixes.crateGtGem.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L), tBits, new Object[]{"Xc",
// Character.valueOf('X'), OrePrefixes.crateGtIngot.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L), tBits, new Object[]{"Xc",
// Character.valueOf('X'), OrePrefixes.crateGtPlate.get(aMaterial)});
//
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, 2L), tBits,
// new Object[]{"h", "X", Character.valueOf('X'), OrePrefixes.gemFlawed.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 2L), tBits,
// new Object[]{"h", "X", Character.valueOf('X'), OrePrefixes.gem.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 2L), tBits,
// new Object[]{"h", "X", Character.valueOf('X'), OrePrefixes.gemFlawless.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 2L), tBits,
// new Object[]{"h", "X", Character.valueOf('X'), OrePrefixes.gemExquisite.get(aMaterial)});
// if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true))) {
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1), tBits,
// new Object[]{"X", "m", Character.valueOf('X'), OrePrefixes.gemChipped.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 2L), tBits,
// new Object[]{"X", "m", Character.valueOf('X'), OrePrefixes.gemFlawed.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1), tBits,
// new Object[]{"X", "m", Character.valueOf('X'), OrePrefixes.gem.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), tBits,
// new Object[]{"X", "m", Character.valueOf('X'), OrePrefixes.gemFlawless.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 4L), tBits,
// new Object[]{"X", "m", Character.valueOf('X'), OrePrefixes.gemExquisite.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1), tBits,
// new Object[]{"X", "m", Character.valueOf('X'), OrePrefixes.ingot.get(aMaterial)});
// GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1), tBits,
// new Object[]{"X", "m", Character.valueOf('X'), OrePrefixes.plate.get(aMaterial)});
// }
2015-10-22 02:06:25 +00:00
}
}
}
public void onServerStarting ( ) {
GT_Log . out . println ( " GT_Mod: ServerStarting-Phase started! " ) ;
GT_Log . ore . println ( " GT_Mod: ServerStarting-Phase started! " ) ;
this . mUniverse = null ;
this . isFirstServerWorldTick = true ;
for ( FluidContainerRegistry . FluidContainerData tData : FluidContainerRegistry . getRegisteredFluidContainerData ( ) ) {
2016-08-18 13:45:25 +00:00
if ( ( tData . filledContainer . getItem ( ) = = Items . POTIONITEM ) & & ( tData . filledContainer . getItemDamage ( ) = = 0 ) ) {
2015-10-22 02:06:25 +00:00
tData . fluid . amount = 0 ;
break ;
}
}
2016-09-15 23:17:08 +00:00
try {
for ( int i = 1 ; i < GregTech_API . METATILEENTITIES . length ; i + + ) {
2015-10-22 02:06:25 +00:00
for ( ; i < GregTech_API . METATILEENTITIES . length ; i + + ) {
if ( GregTech_API . METATILEENTITIES [ i ] ! = null ) {
GregTech_API . METATILEENTITIES [ i ] . onServerStart ( ) ;
}
}
}
2016-12-23 19:41:22 +00:00
} catch ( Throwable e ) {
e . printStackTrace ( GT_Log . err ) ;
2015-10-22 02:06:25 +00:00
}
}
public void onServerStarted ( ) {
GregTech_API . sWirelessRedstone . clear ( ) ;
GT_Log . out . println ( " GT_Mod: Cleaning up all OreDict Crafting Recipes, which have an empty List in them, since they are never meeting any Condition. " ) ;
List tList = CraftingManager . getInstance ( ) . getRecipeList ( ) ;
for ( int i = 0 ; i < tList . size ( ) ; i + + ) {
2016-08-18 13:45:25 +00:00
2015-10-22 02:06:25 +00:00
if ( ( tList . get ( i ) instanceof ShapedOreRecipe ) ) {
for ( Object tObject : ( ( ShapedOreRecipe ) tList . get ( i ) ) . getInput ( ) ) {
if ( ( ( tObject instanceof List ) ) & & ( ( ( List ) tObject ) . isEmpty ( ) ) ) {
tList . remove ( i - - ) ;
break ;
}
}
} else if ( ( tList . get ( i ) instanceof ShapelessOreRecipe ) ) {
for ( Object tObject : ( ( ShapelessOreRecipe ) tList . get ( i ) ) . getInput ( ) ) {
if ( ( ( tObject instanceof List ) ) & & ( ( ( List ) tObject ) . isEmpty ( ) ) ) {
tList . remove ( i - - ) ;
break ;
}
}
}
2016-08-18 13:45:25 +00:00
2015-10-22 02:06:25 +00:00
}
2016-08-18 13:45:25 +00:00
2015-10-22 02:06:25 +00:00
}
public void onServerStopping ( ) {
File tSaveDirectory = getSaveDirectory ( ) ;
GregTech_API . sWirelessRedstone . clear ( ) ;
if ( tSaveDirectory ! = null ) {
2016-09-15 23:17:08 +00:00
try {
for ( int i = 1 ; i < GregTech_API . METATILEENTITIES . length ; i + + ) {
2015-10-22 02:06:25 +00:00
for ( ; i < GregTech_API . METATILEENTITIES . length ; i + + ) {
if ( GregTech_API . METATILEENTITIES [ i ] ! = null ) {
GregTech_API . METATILEENTITIES [ i ] . onWorldSave ( tSaveDirectory ) ;
}
}
}
2016-12-23 19:41:22 +00:00
} catch ( Throwable e ) {
e . printStackTrace ( GT_Log . err ) ;
2015-10-22 02:06:25 +00:00
}
}
this . mUniverse = null ;
}
@SubscribeEvent
public void onClientConnectedToServerEvent ( FMLNetworkEvent . ClientConnectedToServerEvent aEvent ) {
}
@SubscribeEvent
public void onArrowNockEvent ( ArrowNockEvent aEvent ) {
2016-08-18 13:45:25 +00:00
if ( ( ! aEvent . isCanceled ( ) ) & & ( GT_Utility . isStackValid ( aEvent . getBow ( ) ) )
& & ( GT_Utility . getProjectile ( SubTag . PROJECTILE_ARROW , aEvent . getEntityPlayer ( ) . inventory ) ! = null ) ) {
//aEvent.getEntityPlayer().setItemInUse(aEvent.result, aEvent.getR.getItem().getMaxItemUseDuration(aEvent.result));
2015-10-22 02:06:25 +00:00
aEvent . setCanceled ( true ) ;
}
}
@SubscribeEvent
public void onArrowLooseEvent ( ArrowLooseEvent aEvent ) {
2016-08-18 13:45:25 +00:00
ItemStack aArrow = GT_Utility . getProjectile ( SubTag . PROJECTILE_ARROW , aEvent . getEntityPlayer ( ) . inventory ) ;
if ( ( ! aEvent . isCanceled ( ) ) & & ( GT_Utility . isStackValid ( aEvent . getBow ( ) ) ) & & ( aArrow ! = null ) & & ( ( aEvent . getBow ( ) . getItem ( ) instanceof ItemBow ) ) ) {
float tSpeed = aEvent . getCharge ( ) / 20 . 0F ;
2015-10-22 02:06:25 +00:00
tSpeed = ( tSpeed * tSpeed + tSpeed * 2 . 0F ) / 3 . 0F ;
if ( tSpeed < 0 . 1D ) {
return ;
}
if ( tSpeed > 1 . 0D ) {
tSpeed = 1 . 0F ;
}
2016-08-18 13:45:25 +00:00
EntityArrow tArrowEntity = ( ( IProjectileItem ) aArrow . getItem ( ) ) . getProjectile ( SubTag . PROJECTILE_ARROW , aArrow , aEvent . getEntityPlayer ( ) . worldObj ,
aEvent . getEntityPlayer ( ) , tSpeed * 2 . 0F ) ;
2015-10-22 02:06:25 +00:00
if ( tSpeed > = 1 . 0F ) {
tArrowEntity . setIsCritical ( true ) ;
}
2016-08-18 13:45:25 +00:00
int tLevel = EnchantmentHelper . getEnchantmentLevel ( Enchantments . POWER , aEvent . getBow ( ) ) ;
2015-10-22 02:06:25 +00:00
if ( tLevel > 0 ) {
tArrowEntity . setDamage ( tArrowEntity . getDamage ( ) + tLevel * 0 . 5D + 0 . 5D ) ;
}
2016-08-18 13:45:25 +00:00
tLevel = EnchantmentHelper . getEnchantmentLevel ( Enchantments . PUNCH , aEvent . getBow ( ) ) ;
2015-10-22 02:06:25 +00:00
if ( tLevel > 0 ) {
tArrowEntity . setKnockbackStrength ( tLevel ) ;
}
2016-08-18 13:45:25 +00:00
tLevel = EnchantmentHelper . getEnchantmentLevel ( Enchantments . FLAME , aEvent . getBow ( ) ) ;
2015-10-22 02:06:25 +00:00
if ( tLevel > 0 ) {
tArrowEntity . setFire ( tLevel * 100 ) ;
}
2016-08-18 13:45:25 +00:00
aEvent . getBow ( ) . damageItem ( 1 , aEvent . getEntityPlayer ( ) ) ;
2016-12-23 19:41:22 +00:00
aEvent . getEntityPlayer ( ) . worldObj . playSound ( null , new BlockPos ( aEvent . getEntity ( ) ) ,
2016-08-18 13:45:25 +00:00
SoundEvents . ENTITY_ARROW_SHOOT , SoundCategory . PLAYERS ,
2016-12-23 19:41:22 +00:00
1 . 0F , 0 . 64893958288F + tSpeed * 0 . 5F ) ;
2015-10-22 02:06:25 +00:00
2016-08-18 13:45:25 +00:00
if ( ! aEvent . getEntityPlayer ( ) . capabilities . isCreativeMode ) {
2015-10-22 02:06:25 +00:00
aArrow . stackSize - = 1 ;
}
2016-12-23 19:41:22 +00:00
2015-10-22 02:06:25 +00:00
if ( aArrow . stackSize = = 0 ) {
2016-08-18 13:45:25 +00:00
GT_Utility . removeNullStacksFromInventory ( aEvent . getEntityPlayer ( ) . inventory ) ;
2015-10-22 02:06:25 +00:00
}
2016-12-23 19:41:22 +00:00
2016-08-18 13:45:25 +00:00
if ( ! aEvent . getEntityPlayer ( ) . worldObj . isRemote ) {
aEvent . getEntityPlayer ( ) . worldObj . spawnEntityInWorld ( tArrowEntity ) ;
2015-10-22 02:06:25 +00:00
}
2016-12-23 19:41:22 +00:00
2015-10-22 02:06:25 +00:00
aEvent . setCanceled ( true ) ;
}
}
@SubscribeEvent
public void onEndermanTeleportEvent ( EnderTeleportEvent aEvent ) {
2016-08-18 13:45:25 +00:00
if ( aEvent . getEntity ( ) instanceof EntityEnderman & & aEvent . getEntityLiving ( )
. getActivePotionEffect ( MobEffects . WEAKNESS ) ! = null ) {
2015-10-22 02:06:25 +00:00
aEvent . setCanceled ( true ) ;
}
}
@SubscribeEvent
public void onEntitySpawningEvent ( EntityJoinWorldEvent aEvent ) {
2016-08-18 13:45:25 +00:00
if ( aEvent . getEntity ( ) ! = null & & ! aEvent . getEntity ( ) . worldObj . isRemote ) {
if ( aEvent . getEntity ( ) instanceof EntityItem ) {
( ( EntityItem ) aEvent . getEntity ( ) ) . setEntityItemStack ( GT_OreDictUnificator . get ( ( ( EntityItem ) aEvent . getEntity ( ) ) . getEntityItem ( ) ) ) ;
2015-10-22 02:06:25 +00:00
}
2016-08-18 13:45:25 +00:00
if ( ( this . mSkeletonsShootGTArrows > 0 ) & & ( aEvent . getEntity ( ) . getClass ( ) = = EntityArrow . class )
& & ( aEvent . getEntity ( ) . worldObj . rand . nextInt ( this . mSkeletonsShootGTArrows ) = = 0 )
& & ( ( ( ( EntityArrow ) aEvent . getEntity ( ) ) . shootingEntity instanceof EntitySkeleton ) ) ) {
aEvent . getWorld ( ) . spawnEntityInWorld ( new GT_Entity_Arrow ( aEvent . getWorld ( ) ,
( EntityLivingBase ) ( ( EntityArrow ) aEvent . getEntity ( ) ) . shootingEntity ,
OrePrefixes . arrowGtWood . mPrefixedItems
2016-12-23 19:41:22 +00:00
. get ( aEvent . getWorld ( ) . rand . nextInt ( OrePrefixes . arrowGtWood . mPrefixedItems . size ( ) ) ) ) ) ;
2016-08-18 13:45:25 +00:00
aEvent . getEntity ( ) . setDead ( ) ;
2015-10-22 02:06:25 +00:00
}
}
}
@SubscribeEvent
public void onOreGenEvent ( OreGenEvent . GenerateMinable aGenerator ) {
2016-08-18 13:45:25 +00:00
if ( ( this . mDisableVanillaOres ) & & ( ( aGenerator . getGenerator ( ) instanceof WorldGenMinable ) )
& & ( PREVENTED_ORES . contains ( aGenerator . getType ( ) ) ) ) {
2015-10-22 02:06:25 +00:00
aGenerator . setResult ( Result . DENY ) ;
}
}
private String getDataAndTime ( ) {
return this . mDateFormat . format ( new Date ( ) ) ;
}
@SubscribeEvent
2016-08-18 13:45:25 +00:00
public void onPlayerInteraction ( PlayerInteractEvent . RightClickBlock aEvent ) {
ItemStack aStack = aEvent . getItemStack ( ) ;
if ( aStack ! = null & & aStack . getItem ( ) = = Items . FLINT_AND_STEEL ) {
2016-12-23 19:41:22 +00:00
if ( ! aEvent . getWorld ( ) . isRemote & &
! aEvent . getEntityPlayer ( ) . capabilities . isCreativeMode & &
2016-08-18 13:45:25 +00:00
aEvent . getWorld ( ) . rand . nextInt ( 100 ) > = this . mFlintChance ) {
aStack . damageItem ( 1 , aEvent . getEntityPlayer ( ) ) ;
2016-12-23 19:41:22 +00:00
if ( aStack . getItemDamage ( ) > = aStack . getMaxDamage ( ) )
2015-10-22 02:06:25 +00:00
aStack . stackSize - = 1 ;
2016-08-18 13:45:25 +00:00
aEvent . setCanceled ( true ) ;
2015-10-22 02:06:25 +00:00
}
}
}
@SubscribeEvent
public void onBlockHarvestingEvent ( BlockEvent . HarvestDropsEvent aEvent ) {
2016-08-18 13:45:25 +00:00
if ( aEvent . getHarvester ( ) ! = null ) {
ItemStack aStack = aEvent . getHarvester ( ) . getHeldItemMainhand ( ) ;
2015-10-22 02:06:25 +00:00
if ( aStack ! = null ) {
if ( ( aStack . getItem ( ) instanceof GT_MetaGenerated_Tool ) ) {
2016-08-18 13:45:25 +00:00
( ( GT_MetaGenerated_Tool ) aStack . getItem ( ) )
. onHarvestBlockEvent ( new ArrayList < > ( aEvent . getDrops ( ) ) , aStack , aEvent . getHarvester ( ) ,
aEvent . getWorld ( ) . getBlockState ( aEvent . getPos ( ) ) , aEvent . getPos ( ) ,
aEvent . getFortuneLevel ( ) , aEvent . isSilkTouching ( ) , aEvent ) ;
2015-10-22 02:06:25 +00:00
}
2016-08-18 13:45:25 +00:00
if ( EnchantmentHelper . getEnchantmentLevel ( Enchantments . FIRE_ASPECT , aStack ) > 2 ) {
for ( ItemStack tDrop : aEvent . getDrops ( ) ) {
2015-10-22 02:06:25 +00:00
ItemStack tSmeltingOutput = GT_ModHandler . getSmeltingOutput ( tDrop , false , null ) ;
if ( tSmeltingOutput ! = null ) {
tDrop . stackSize * = tSmeltingOutput . stackSize ;
tSmeltingOutput . stackSize = tDrop . stackSize ;
GT_Utility . setStack ( tDrop , tSmeltingOutput ) ;
}
}
}
}
}
}
@SubscribeEvent
public void registerOre ( OreDictionary . OreRegisterEvent aEvent ) {
ModContainer tContainer = Loader . instance ( ) . activeModContainer ( ) ;
String aMod = tContainer = = null ? " UNKNOWN " : tContainer . getModId ( ) ;
String aOriginalMod = aMod ;
if ( GT_OreDictUnificator . isRegisteringOres ( ) ) {
aMod = " gregtech " ;
} else if ( aMod . equals ( " gregtech " ) ) {
aMod = " UNKNOWN " ;
}
2016-08-18 13:45:25 +00:00
if ( ( aEvent = = null ) | | ( aEvent . getOre ( ) = = null ) | | ( aEvent . getOre ( ) . getItem ( ) = = null ) | | ( aEvent . getName ( ) = = null ) | | ( aEvent . getName ( ) . isEmpty ( ) )
| | ( aEvent . getName ( ) . replaceAll ( " _ " , " " ) . length ( ) - aEvent . getName ( ) . length ( ) = = 9 ) ) {
2015-10-22 02:06:25 +00:00
if ( aOriginalMod . equals ( " gregtech " ) ) {
aOriginalMod = " UNKNOWN " ;
}
GT_Log . ore
. println ( aOriginalMod
+ " did something very bad! The registration is too invalid to even be shown properly. This happens only if you register null, invalid Items, empty Strings or even nonexisting Events to the OreDict. " ) ;
throw new IllegalArgumentException (
aOriginalMod
+ " did something very bad! The registration is too invalid to even be shown properly. This happens only if you register null, invalid Items, empty Strings or even nonexisting Events to the OreDict. " ) ;
}
try {
2016-08-18 13:45:25 +00:00
aEvent . getOre ( ) . stackSize = 1 ;
if ( this . mIgnoreTcon | | aEvent . getOre ( ) . getUnlocalizedName ( ) . startsWith ( " item.oreberry " ) ) {
2016-08-14 07:06:00 +00:00
if ( ( aOriginalMod . toLowerCase ( Locale . ENGLISH ) . contains ( " xycraft " ) ) | | ( aOriginalMod . toLowerCase ( Locale . ENGLISH ) . contains ( " tconstruct " ) )
| | ( ( aOriginalMod . toLowerCase ( Locale . ENGLISH ) . contains ( " natura " ) ) & & ( ! aOriginalMod . toLowerCase ( Locale . ENGLISH ) . contains ( " natural " ) ) ) ) {
2015-10-22 02:06:25 +00:00
if ( GT_Values . D1 ) {
2016-08-18 13:45:25 +00:00
GT_Log . ore . println ( aMod + " -> " + aEvent . getName ( ) + " is getting ignored, because of racism. :P " ) ;
2015-10-22 02:06:25 +00:00
}
return ;
}
}
2016-08-18 13:45:25 +00:00
String tModToName = aMod + " -> " + aEvent . getName ( ) ;
2015-10-22 02:06:25 +00:00
if ( ( this . mOreDictActivated ) | | ( GregTech_API . sPostloadStarted ) | | ( ( this . mSortToTheEnd ) & & ( GregTech_API . sLoadFinished ) ) ) {
2016-08-18 13:45:25 +00:00
tModToName = aOriginalMod + " --Late--> " + aEvent . getName ( ) ;
2015-10-22 02:06:25 +00:00
}
2016-08-18 13:45:25 +00:00
if ( ( ( aEvent . getOre ( ) . getItem ( ) instanceof ItemBlock ) ) | | ( GT_Utility . getBlockFromStack ( aEvent . getOre ( ) ) ! = Blocks . AIR ) ) {
GT_OreDictUnificator . addToBlacklist ( aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
2016-08-18 13:45:25 +00:00
this . mRegisteredOres . add ( aEvent . getOre ( ) ) ;
2016-12-23 19:41:22 +00:00
if ( this . mIgnoredItems . contains ( aEvent . getName ( ) ) ) {
if ( ( aEvent . getName ( ) . startsWith ( " item " ) ) ) {
2016-08-14 06:19:03 +00:00
GT_Log . ore . println ( tModToName ) ;
2016-12-23 19:41:22 +00:00
if ( aEvent . getName ( ) . equals ( " itemCopperWire " ) ) {
GT_OreDictUnificator . registerOre ( OreDictNames . craftingWireCopper , aEvent . getOre ( ) ) ;
2016-09-15 23:17:08 +00:00
}
2016-12-23 19:41:22 +00:00
if ( aEvent . getName ( ) . equals ( " itemRubber " ) ) {
GT_OreDictUnificator . registerOre ( OrePrefixes . ingot , Materials . Rubber , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
}
return ;
2015-10-22 02:06:25 +00:00
}
2016-12-23 19:41:22 +00:00
} else if ( this . mIgnoredNames . contains ( aEvent . getName ( ) ) ) {
2015-10-22 02:06:25 +00:00
GT_Log . ore . println ( tModToName + " is getting ignored via hardcode. " ) ;
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " stone " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " stoneSmooth " , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " cobblestone " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " stoneCobble " , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( ( aEvent . getName ( ) . contains ( " | " ) ) | | ( aEvent . getName ( ) . contains ( " * " ) ) | | ( aEvent . getName ( ) . contains ( " : " ) ) | | ( aEvent . getName ( ) . contains ( " . " ) )
2016-08-18 13:45:25 +00:00
| | ( aEvent . getName ( ) . contains ( " $ " ) ) ) {
2015-10-22 02:06:25 +00:00
GT_Log . ore . println ( tModToName + " is using a private Prefix and is therefor getting ignored properly. " ) ;
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " copperWire " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OreDictNames . craftingWireCopper , aEvent . getOre ( ) ) ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " oreHeeEndrium " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . ore , Materials . Endium , aEvent . getOre ( ) ) ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " sheetPlastic " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . plate , Materials . Plastic , aEvent . getOre ( ) ) ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " shard " ) ) {
if ( aEvent . getName ( ) . equals ( " shardAir " ) ) {
GT_OreDictUnificator . registerOre ( OrePrefixes . gem , Materials . InfusedAir , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " shardWater " ) ) {
GT_OreDictUnificator . registerOre ( OrePrefixes . gem , Materials . InfusedWater , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " shardFire " ) ) {
GT_OreDictUnificator . registerOre ( OrePrefixes . gem , Materials . InfusedFire , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " shardEarth " ) ) {
GT_OreDictUnificator . registerOre ( OrePrefixes . gem , Materials . InfusedEarth , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " shardOrder " ) ) {
GT_OreDictUnificator . registerOre ( OrePrefixes . gem , Materials . InfusedOrder , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " shardEntropy " ) ) {
GT_OreDictUnificator . registerOre ( OrePrefixes . gem , Materials . InfusedEntropy , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
return ;
}
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " fieryIngot " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . ingot , Materials . FierySteel , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " ironwood " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . ingot , Materials . IronWood , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " steeleaf " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . ingot , Materials . Steeleaf , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " knightmetal " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . ingot , Materials . Knightmetal , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . equals ( " compressedAluminum " ) ) {
GT_OreDictUnificator . registerOre ( OrePrefixes . compressed , Materials . Aluminium , aEvent . getOre ( ) ) ;
2016-10-18 16:49:48 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . contains ( " " ) ) {
2015-10-22 02:06:25 +00:00
GT_Log . ore . println ( tModToName + " is getting re-registered because the OreDict Name containing invalid spaces. " ) ;
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( aEvent . getName ( ) . replaceAll ( " " , " " ) , GT_Utility . copyAmount ( 1 , aEvent . getOre ( ) ) ) ;
aEvent . getOre ( ) . setStackDisplayName ( " Invalid OreDictionary Tag " ) ;
2015-10-22 02:06:25 +00:00
return ;
2016-12-23 19:41:22 +00:00
} else if ( this . mInvalidNames . contains ( aEvent . getName ( ) ) ) {
2015-10-22 02:06:25 +00:00
GT_Log . ore . println ( tModToName + " is wrongly registered and therefor getting ignored. " ) ;
return ;
}
2016-08-18 13:45:25 +00:00
OrePrefixes aPrefix = OrePrefixes . getOrePrefix ( aEvent . getName ( ) ) ;
2015-10-22 02:06:25 +00:00
Materials aMaterial = Materials . _NULL ;
2016-08-18 13:45:25 +00:00
if ( ( aPrefix = = OrePrefixes . nugget ) & & ( aMod . equals ( " Thaumcraft " ) ) & & ( aEvent . getOre ( ) . getItem ( ) . getUnlocalizedName ( ) . contains ( " ItemResource " ) ) ) {
2015-10-22 02:06:25 +00:00
return ;
}
if ( aPrefix = = null ) {
2016-08-18 13:45:25 +00:00
if ( aEvent . getName ( ) . toLowerCase ( ) . equals ( aEvent . getName ( ) ) ) {
2015-10-22 02:06:25 +00:00
GT_Log . ore . println ( tModToName + " is invalid due to being solely lowercased. " ) ;
return ;
2016-12-23 19:41:22 +00:00
} else if ( aEvent . getName ( ) . toUpperCase ( ) . equals ( aEvent . getName ( ) ) ) {
2015-10-22 02:06:25 +00:00
GT_Log . ore . println ( tModToName + " is invalid due to being solely uppercased. " ) ;
return ;
2016-12-23 19:41:22 +00:00
} else if ( Character . isUpperCase ( aEvent . getName ( ) . charAt ( 0 ) ) ) {
2015-10-22 02:06:25 +00:00
GT_Log . ore . println ( tModToName + " is invalid due to the first character being uppercased. " ) ;
}
} else {
if ( aPrefix . mDontUnificateActively ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . addToBlacklist ( aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
if ( aPrefix ! = aPrefix . mPrefixInto ) {
2016-08-18 13:45:25 +00:00
String tNewName = aEvent . getName ( ) . replaceFirst ( aPrefix . toString ( ) , aPrefix . mPrefixInto . toString ( ) ) ;
2015-10-22 02:06:25 +00:00
if ( ! GT_OreDictUnificator . isRegisteringOres ( ) ) {
GT_Log . ore . println ( tModToName + " uses a depricated Prefix, and is getting re-registered as " + tNewName ) ;
}
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( tNewName , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
return ;
}
2016-08-18 13:45:25 +00:00
String tName = aEvent . getName ( ) . replaceFirst ( aPrefix . toString ( ) , " " ) ;
2015-10-22 02:06:25 +00:00
if ( tName . length ( ) > 0 ) {
char firstChar = tName . charAt ( 0 ) ;
if ( Character . isUpperCase ( firstChar ) | | Character . isLowerCase ( firstChar ) | | firstChar = = '_' ) {
if ( aPrefix . mIsMaterialBased ) {
aMaterial = Materials . get ( tName ) ;
if ( aMaterial ! = aMaterial . mMaterialInto ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( aPrefix , aMaterial . mMaterialInto , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
if ( ! GT_OreDictUnificator . isRegisteringOres ( ) ) {
GT_Log . ore . println ( tModToName + " uses a deprecated Material and is getting re-registered as "
+ aPrefix . get ( aMaterial . mMaterialInto ) ) ;
}
return ;
}
if ( ! aPrefix . isIgnored ( aMaterial ) ) {
2016-08-18 13:45:25 +00:00
aPrefix . add ( GT_Utility . copyAmount ( 1 , new Object [ ] { aEvent . getOre ( ) } ) ) ;
2015-10-22 02:06:25 +00:00
}
if ( aMaterial ! = Materials . _NULL ) {
Materials tReRegisteredMaterial ;
for ( Iterator i$ = aMaterial . mOreReRegistrations . iterator ( ) ; i$ . hasNext ( ) ; GT_OreDictUnificator . registerOre ( aPrefix ,
2016-08-18 13:45:25 +00:00
tReRegisteredMaterial , aEvent . getOre ( ) ) ) {
2015-10-22 02:06:25 +00:00
tReRegisteredMaterial = ( Materials ) i$ . next ( ) ;
}
2016-08-18 13:45:25 +00:00
aMaterial . add ( GT_Utility . copyAmount ( 1 , new Object [ ] { aEvent . getOre ( ) } ) ) ;
2016-05-18 04:41:36 +00:00
2016-09-15 23:17:08 +00:00
if ( GregTech_API . sThaumcraftCompat ! = null & & aPrefix . doGenerateItem ( aMaterial ) & & ! aPrefix . isIgnored ( aMaterial ) ) {
List < TC_AspectStack > tAspects = new ArrayList < TC_AspectStack > ( ) ;
for ( TC_AspectStack tAspect : aPrefix . mAspects ) tAspect . addToAspectList ( tAspects ) ;
if ( aPrefix . mMaterialAmount > = 3628800 | | aPrefix . mMaterialAmount < 0 ) for ( TC_AspectStack tAspect : aMaterial . mAspects ) tAspect . addToAspectList ( tAspects ) ;
2016-12-23 19:41:22 +00:00
GregTech_API . sThaumcraftCompat . registerThaumcraftAspectsToItem ( GT_Utility . copyAmount ( 1 , aEvent . getOre ( ) ) , tAspects , aEvent . getName ( ) ) ;
2016-09-15 23:17:08 +00:00
}
2016-05-18 04:41:36 +00:00
2015-10-22 02:06:25 +00:00
switch ( aPrefix ) {
case crystal :
if ( ( aMaterial = = Materials . CertusQuartz ) | | ( aMaterial = = Materials . NetherQuartz ) | | ( aMaterial = = Materials . Fluix ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . gem , aMaterial , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case gem :
2016-08-14 06:19:03 +00:00
if ( aMaterial = = Materials . Lapis | | aMaterial = = Materials . Sodalite ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . registerOre ( Dyes . dyeBlue , aEvent . getOre ( ) ) ;
2016-09-15 23:17:08 +00:00
} else if ( aMaterial = = Materials . Lazurite ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . registerOre ( Dyes . dyeCyan , aEvent . getOre ( ) ) ;
2016-09-15 23:17:08 +00:00
} else if ( aMaterial = = Materials . InfusedAir | | aMaterial = = Materials . InfusedWater | | aMaterial = = Materials . InfusedFire | | aMaterial = = Materials . InfusedEarth | | aMaterial = = Materials . InfusedOrder | | aMaterial = = Materials . InfusedEntropy ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . registerOre ( aMaterial . mName . replaceFirst ( " Infused " , " shard " ) , aEvent . getOre ( ) ) ;
2016-09-15 23:17:08 +00:00
} else if ( aMaterial = = Materials . Chocolate ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . registerOre ( Dyes . dyeBrown , aEvent . getOre ( ) ) ;
2016-09-15 23:17:08 +00:00
} else if ( aMaterial = = Materials . CertusQuartz | | aMaterial = = Materials . NetherQuartz ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . item . get ( aMaterial ) , aEvent . getOre ( ) ) ;
GT_OreDictUnificator . registerOre ( OrePrefixes . crystal , aMaterial , aEvent . getOre ( ) ) ;
GT_OreDictUnificator . registerOre ( OreDictNames . craftingQuartz , aEvent . getOre ( ) ) ;
2016-09-15 23:17:08 +00:00
} else if ( aMaterial = = Materials . Fluix | | aMaterial = = Materials . Quartz | | aMaterial = = Materials . Quartzite ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . crystal , aMaterial , aEvent . getOre ( ) ) ;
GT_OreDictUnificator . registerOre ( OreDictNames . craftingQuartz , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case cableGt01 :
if ( aMaterial = = Materials . Tin ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OreDictNames . craftingWireTin , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . AnyCopper ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OreDictNames . craftingWireCopper , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Gold ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OreDictNames . craftingWireGold , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . AnyIron ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OreDictNames . craftingWireIron , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case lens :
if ( ( aMaterial . contains ( SubTag . TRANSPARENT ) ) & & ( aMaterial . mColor ! = Dyes . _NULL ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " craftingLens " + aMaterial . mColor . toString ( ) . replaceFirst ( " DYE " , " " ) , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case plate :
if ( ( aMaterial = = Materials . Plastic ) | | ( aMaterial = = Materials . Rubber ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . sheet , aMaterial , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Silicon ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . item , aMaterial , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Wood ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . addToBlacklist ( aEvent . getOre ( ) ) ;
GT_OreDictUnificator . registerOre ( OrePrefixes . plank , aMaterial , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case cell :
if ( aMaterial = = Materials . Empty ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . addToBlacklist ( aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case gearGt :
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . gear , aMaterial , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
break ;
case stick :
if ( ! GT_RecipeRegistrator . sRodMaterialList . contains ( aMaterial ) ) {
GT_RecipeRegistrator . sRodMaterialList . add ( aMaterial ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Wood ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . addToBlacklist ( aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( ( aMaterial = = Materials . Tin ) | | ( aMaterial = = Materials . Lead ) | | ( aMaterial = = Materials . SolderingAlloy ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( ToolDictNames . craftingToolSolderingMetal , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case dust :
if ( aMaterial = = Materials . Salt ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " itemSalt " , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Wood ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " pulpWood " , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Wheat ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " foodFlour " , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Lapis ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( Dyes . dyeBlue , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Lazurite ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( Dyes . dyeCyan , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Sodalite ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( Dyes . dyeBlue , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Cocoa ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( Dyes . dyeBrown , aEvent . getOre ( ) ) ;
GT_OreDictUnificator . registerOre ( " foodCocoapowder " , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Coffee ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( Dyes . dyeBrown , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . BrownLimonite ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( Dyes . dyeBrown , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . YellowLimonite ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( Dyes . dyeYellow , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case ingot :
if ( aMaterial = = Materials . Rubber ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " itemRubber " , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . FierySteel ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " fieryIngot " , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . IronWood ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " ironwood " , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Steeleaf ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " steeleaf " , aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( aMaterial = = Materials . Knightmetal ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " knightmetal " , aEvent . getOre ( ) ) ;
2016-12-23 19:41:22 +00:00
} else if ( ( aMaterial = = Materials . Brass ) & & ( aEvent . getOre ( ) . getItemDamage ( ) = = 2 )
2016-08-18 13:45:25 +00:00
& & ( aEvent . getOre ( ) . getUnlocalizedName ( ) . equals ( " item.ingotBrass " ) )
& & ( new ItemStack ( aEvent . getOre ( ) . getItem ( ) , 1 , 0 ) . getUnlocalizedName ( ) . contains ( " red " ) ) ) {
GT_OreDictUnificator . set ( OrePrefixes . ingot , Materials . RedAlloy , new ItemStack ( aEvent . getOre ( ) . getItem ( ) , 1 , 0 ) ) ;
GT_OreDictUnificator . set ( OrePrefixes . ingot , Materials . BlueAlloy , new ItemStack ( aEvent . getOre ( ) . getItem ( ) , 1 , 1 ) ) ;
GT_OreDictUnificator . set ( OrePrefixes . ingot , Materials . Brass , new ItemStack ( aEvent . getOre ( ) . getItem ( ) , 1 , 2 ) ) ;
2015-10-22 02:06:25 +00:00
if ( ! mDisableIC2Cables ) {
2016-09-06 09:53:19 +00:00
GT_Values . RA . addWiremillRecipe (
GT_ModHandler . getIC2Item ( ItemName . cable , CableType . copper , 3 ) ,
new ItemStack ( aEvent . getOre ( ) . getItem ( ) , 1 ,
2016-12-23 19:41:22 +00:00
8 ) , 400 , 1 ) ;
2016-09-06 09:53:19 +00:00
GT_Values . RA . addWiremillRecipe (
GT_ModHandler . getIC2Item ( ItemName . cable , CableType . iron , 6 ) ,
2016-08-18 13:45:25 +00:00
new ItemStack ( aEvent . getOre ( ) . getItem ( ) , 1 , 9 ) , 400 , 2 ) ;
2015-10-22 02:06:25 +00:00
}
2016-08-18 13:45:25 +00:00
GT_Values . RA . addCutterRecipe ( new ItemStack ( aEvent . getOre ( ) . getItem ( ) , 1 , 3 ) , new ItemStack ( aEvent . getOre ( ) . getItem ( ) , 16 , 4 ) ,
2015-10-22 02:06:25 +00:00
null , 400 , 8 ) ;
}
break ;
default :
break ;
}
if ( aPrefix . mIsUnificatable & & ! aMaterial . mUnificatable ) {
return ;
}
} else {
for ( Dyes tDye : Dyes . VALUES ) {
2016-08-18 13:45:25 +00:00
if ( aEvent . getName ( ) . endsWith ( tDye . name ( ) . replaceFirst ( " dye " , " " ) ) ) {
GT_OreDictUnificator . addToBlacklist ( aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
GT_Log . ore . println ( tModToName + " Oh man, why the fuck would anyone need a OreDictified Color for this, that is even too much for GregTech... do not report this, this is just a random Comment about how ridiculous this is. " ) ;
return ;
}
}
2016-12-23 19:41:22 +00:00
//System.out.println("Material Name: "+aEvent.getName()+ " !!!Unknown Material detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
//GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech.");
GT_Log . ore . println ( tModToName + " uses an unknown Material. " ) ;
2015-10-22 02:06:25 +00:00
return ;
}
} else {
2016-08-18 13:45:25 +00:00
aPrefix . add ( GT_Utility . copyAmount ( 1 , new Object [ ] { aEvent . getOre ( ) } ) ) ;
2015-10-22 02:06:25 +00:00
}
}
} else if ( aPrefix . mIsSelfReferencing ) {
2016-08-18 13:45:25 +00:00
aPrefix . add ( GT_Utility . copyAmount ( 1 , new Object [ ] { aEvent . getOre ( ) } ) ) ;
2015-10-22 02:06:25 +00:00
} else {
GT_Log . ore . println ( tModToName + " uses a Prefix as full OreDict Name, and is therefor invalid. " ) ;
2016-08-18 13:45:25 +00:00
aEvent . getOre ( ) . setStackDisplayName ( " Invalid OreDictionary Tag " ) ;
2015-10-22 02:06:25 +00:00
return ;
}
switch ( aPrefix ) {
case dye :
if ( GT_Utility . isStringValid ( tName ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . dye , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case stoneSmooth :
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " stone " , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
break ;
case stoneCobble :
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " cobblestone " , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
break ;
case plank :
if ( tName . equals ( " Wood " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . addItemData ( aEvent . getOre ( ) , new ItemData ( Materials . Wood , 3628800L ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case slab :
if ( tName . equals ( " Wood " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . addItemData ( aEvent . getOre ( ) , new ItemData ( Materials . Wood , 1814400L ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case sheet :
if ( tName . equals ( " Plastic " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . plate , Materials . Plastic , aEvent . getOre ( ) ) ;
2016-09-15 23:17:08 +00:00
} else if ( tName . equals ( " Rubber " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . plate , Materials . Rubber , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case crafting :
if ( tName . equals ( " ToolSolderingMetal " ) ) {
2016-08-18 13:45:25 +00:00
GregTech_API . registerSolderingMetal ( aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( tName . equals ( " IndustrialDiamond " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . addToBlacklist ( aEvent . getOre ( ) ) ;
2016-08-14 06:19:03 +00:00
} else if ( tName . equals ( " WireCopper " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . wire , Materials . Copper , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case wood :
if ( tName . equals ( " Rubber " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( " logRubber " , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
case food :
if ( tName . equals ( " Cocoapowder " ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . registerOre ( OrePrefixes . dust , Materials . Cocoa , aEvent . getOre ( ) ) ;
2015-10-22 02:06:25 +00:00
}
break ;
default :
break ;
}
}
GT_Log . ore . println ( tModToName ) ;
OreDictEventContainer tOre = new OreDictEventContainer ( aEvent , aPrefix , aMaterial , aMod ) ;
if ( ( ! this . mOreDictActivated ) | | ( ! GregTech_API . sUnificationEntriesRegistered ) ) {
this . mEvents . add ( tOre ) ;
} else {
this . mEvents . clear ( ) ;
}
if ( this . mOreDictActivated ) {
registerRecipes ( tOre ) ;
}
} catch ( Throwable e ) {
e . printStackTrace ( GT_Log . err ) ;
}
}
@SubscribeEvent
public void onFluidContainerRegistration ( FluidContainerRegistry . FluidContainerRegisterEvent aFluidEvent ) {
2016-08-18 13:45:25 +00:00
if ( ( aFluidEvent . getData ( ) . filledContainer . getItem ( ) = = Items . POTIONITEM ) & & ( aFluidEvent . getData ( ) . filledContainer . getItemDamage ( ) = = 0 ) ) {
aFluidEvent . getData ( ) . fluid . amount = 0 ;
2015-10-22 02:06:25 +00:00
}
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . addToBlacklist ( aFluidEvent . getData ( ) . emptyContainer ) ;
GT_OreDictUnificator . addToBlacklist ( aFluidEvent . getData ( ) . filledContainer ) ;
GT_Utility . addFluidContainerData ( aFluidEvent . getData ( ) ) ;
2015-10-22 02:06:25 +00:00
}
@SubscribeEvent
public void onServerTickEvent ( TickEvent . ServerTickEvent aEvent ) {
}
@SubscribeEvent
public void onWorldTickEvent ( TickEvent . WorldTickEvent aEvent ) {
2016-12-23 19:41:22 +00:00
if ( aEvent . world . provider . getDimension ( ) = = 0 )
mTicksUntilNextCraftSound - - ;
2015-10-22 02:06:25 +00:00
if ( aEvent . side . isServer ( ) ) {
if ( this . mUniverse = = null ) {
this . mUniverse = aEvent . world ;
}
if ( this . isFirstServerWorldTick ) {
File tSaveDiretory = getSaveDirectory ( ) ;
if ( tSaveDiretory ! = null ) {
this . isFirstServerWorldTick = false ;
2016-09-15 23:17:08 +00:00
try {
for ( IMetaTileEntity tMetaTileEntity : GregTech_API . METATILEENTITIES ) {
2015-10-22 02:06:25 +00:00
if ( tMetaTileEntity ! = null ) {
tMetaTileEntity . onWorldLoad ( tSaveDiretory ) ;
}
}
2016-12-23 19:41:22 +00:00
} catch ( Throwable e ) {
e . printStackTrace ( GT_Log . err ) ;
2015-10-22 02:06:25 +00:00
}
}
}
if ( ( aEvent . world . getTotalWorldTime ( ) % 100L = = 0L ) & & ( ( this . mItemDespawnTime ! = 6000 ) | | ( this . mMaxEqualEntitiesAtOneSpot > 0 ) ) ) {
2015-12-29 10:57:53 +00:00
for ( int i = 0 ; i < aEvent . world . loadedEntityList . size ( ) ; i + + ) {
if ( ( aEvent . world . loadedEntityList . get ( i ) instanceof Entity ) ) {
2016-08-18 13:45:25 +00:00
Entity tEntity = aEvent . world . loadedEntityList . get ( i ) ;
2015-12-29 10:57:53 +00:00
if ( ( ( tEntity instanceof EntityItem ) ) & & ( this . mItemDespawnTime ! = 6000 ) & & ( ( ( EntityItem ) tEntity ) . lifespan = = 6000 ) ) {
2015-10-22 02:06:25 +00:00
( ( EntityItem ) tEntity ) . lifespan = this . mItemDespawnTime ;
2015-12-29 10:57:53 +00:00
} else if ( ( ( tEntity instanceof EntityLivingBase ) ) & & ( this . mMaxEqualEntitiesAtOneSpot > 0 ) & & ( ! ( tEntity instanceof EntityPlayer ) )
2016-08-18 13:45:25 +00:00
& & ( tEntity . canBePushed ( ) ) & & ( ( ( EntityLivingBase ) tEntity ) . getHealth ( ) > 0 . 0F ) ) {
2016-09-06 09:53:19 +00:00
AxisAlignedBB boundingBox = tEntity . getCollisionBoundingBox ( ) ;
if ( boundingBox ! = null ) {
List tList = tEntity . worldObj . getEntitiesWithinAABBExcludingEntity ( tEntity , boundingBox . expand ( 0 . 2D , 0 . 0D , 0 . 2D ) ) ;
Class tClass = tEntity . getClass ( ) ;
int tEntityCount = 1 ;
if ( tList ! = null ) {
for ( Object aTList : tList ) {
if ( ( aTList ! = null ) & & ( aTList . getClass ( ) = = tClass ) ) {
tEntityCount + + ;
}
2015-10-22 02:06:25 +00:00
}
}
2016-09-06 09:53:19 +00:00
if ( tEntityCount > this . mMaxEqualEntitiesAtOneSpot ) {
tEntity . attackEntityFrom ( DamageSource . inWall , tEntityCount - this . mMaxEqualEntitiesAtOneSpot ) ;
}
2015-10-22 02:06:25 +00:00
}
}
}
}
}
2016-12-23 19:41:22 +00:00
if ( aEvent . world . provider . getDimension ( ) = = 0 )
2016-09-28 07:07:07 +00:00
GT_Pollution . onWorldTick ( aEvent . world , ( int ) ( aEvent . world . getTotalWorldTime ( ) % 1200 ) ) ;
2015-10-22 02:06:25 +00:00
}
}
@SubscribeEvent
public void onPlayerTickEventServer ( TickEvent . PlayerTickEvent aEvent ) {
2016-08-14 06:19:03 +00:00
if ( ( aEvent . side . isServer ( ) ) & & ( aEvent . phase = = TickEvent . Phase . END ) & & ( ! aEvent . player . isDead ) ) {
2015-10-22 02:06:25 +00:00
if ( ( aEvent . player . ticksExisted % 200 = = 0 ) & & ( aEvent . player . capabilities . allowEdit ) & & ( ! aEvent . player . capabilities . isCreativeMode )
& & ( this . mSurvivalIntoAdventure ) ) {
aEvent . player . setGameType ( GameType . ADVENTURE ) ;
aEvent . player . capabilities . allowEdit = false ;
if ( this . mAxeWhenAdventure ) {
GT_Utility . sendChatToPlayer ( aEvent . player , " It's dangerous to go alone! Take this. " ) ;
aEvent . player . worldObj . spawnEntityInWorld ( new EntityItem ( aEvent . player . worldObj , aEvent . player . posX , aEvent . player . posY ,
2016-11-13 01:44:03 +00:00
aEvent . player . posZ , GT_MetaGenerated_Tool_01 . INSTANCE . getToolWithStats ( GT_MetaGenerated_Tool_01 . AXE , 1 , Materials . Flint , Materials . Wood , null ) ) ) ;
2015-10-22 02:06:25 +00:00
}
}
boolean tHungerEffect = ( this . mHungerEffect ) & & ( aEvent . player . ticksExisted % 2400 = = 1200 ) ;
if ( aEvent . player . ticksExisted % 120 = = 0 ) {
int tCount = 64 ;
for ( int i = 0 ; i < 36 ; i + + ) {
ItemStack tStack ;
if ( ( tStack = aEvent . player . inventory . getStackInSlot ( i ) ) ! = null ) {
if ( ! aEvent . player . capabilities . isCreativeMode ) {
GT_Utility . applyRadioactivity ( aEvent . player , GT_Utility . getRadioactivityLevel ( tStack ) , tStack . stackSize ) ;
float tHeat = GT_Utility . getHeatDamageFromItem ( tStack ) ;
if ( tHeat ! = 0 . 0F ) {
if ( tHeat > 0 . 0F ) {
GT_Utility . applyHeatDamage ( aEvent . player , tHeat ) ;
} else {
GT_Utility . applyFrostDamage ( aEvent . player , - tHeat ) ;
}
}
}
if ( tHungerEffect ) {
tCount + = tStack . stackSize * 64 / Math . max ( 1 , tStack . getMaxStackSize ( ) ) ;
}
if ( this . mInventoryUnification ) {
GT_OreDictUnificator . setStack ( true , tStack ) ;
}
}
}
for ( int i = 0 ; i < 4 ; i + + ) {
ItemStack tStack ;
if ( ( tStack = aEvent . player . inventory . armorInventory [ i ] ) ! = null ) {
if ( ! aEvent . player . capabilities . isCreativeMode ) {
GT_Utility . applyRadioactivity ( aEvent . player , GT_Utility . getRadioactivityLevel ( tStack ) , tStack . stackSize ) ;
float tHeat = GT_Utility . getHeatDamageFromItem ( tStack ) ;
if ( tHeat ! = 0 . 0F ) {
if ( tHeat > 0 . 0F ) {
GT_Utility . applyHeatDamage ( aEvent . player , tHeat ) ;
} else {
GT_Utility . applyFrostDamage ( aEvent . player , - tHeat ) ;
}
}
}
if ( tHungerEffect ) {
tCount + = 256 ;
}
}
}
if ( tHungerEffect ) {
aEvent . player . addExhaustion ( Math . max ( 1 . 0F , tCount / 666 . 6F ) ) ;
}
}
}
}
public Object getServerGuiElement ( int aID , EntityPlayer aPlayer , World aWorld , int aX , int aY , int aZ ) {
2016-09-15 23:17:08 +00:00
if ( aID > = 1000 ) {
2016-12-23 19:41:22 +00:00
int ID = aID - 1000 ;
2016-09-15 23:17:08 +00:00
switch ( ID ) {
case 0 :
2016-12-23 19:41:22 +00:00
return new ContainerBasicArmor ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getHeldItemMainhand ( ) ) ) ;
2016-09-15 23:17:08 +00:00
case 1 :
2016-12-23 19:41:22 +00:00
return new ContainerElectricArmor1 ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getHeldItemMainhand ( ) ) ) ;
2016-09-15 23:17:08 +00:00
case 2 :
2016-12-23 19:41:22 +00:00
return new ContainerElectricArmor1 ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getHeldItemMainhand ( ) ) ) ;
2016-09-15 23:17:08 +00:00
default :
return getRightItem ( aPlayer , ID ) ;
}
}
2016-10-30 21:39:40 +00:00
if ( aID > = 100 ) {
2016-12-23 19:41:22 +00:00
int tSlot = aID / 100 ;
2016-10-30 21:39:40 +00:00
int ID = aID % 100 ;
switch ( ID ) {
2016-12-23 19:41:22 +00:00
case 0 :
return new ContainerBasicArmor ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getEquipmentInSlot ( tSlot ) ) ) ;
case 1 :
return new ContainerElectricArmor1 ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getEquipmentInSlot ( tSlot ) ) ) ;
case 2 :
return new ContainerElectricArmor1 ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getEquipmentInSlot ( tSlot ) ) ) ;
default :
return getRightItem ( aPlayer , ID ) ;
}
2016-10-30 21:39:40 +00:00
}
2016-08-18 13:45:25 +00:00
TileEntity tTileEntity = aWorld . getTileEntity ( new BlockPos ( aX , aY , aZ ) ) ;
2015-10-22 02:06:25 +00:00
if ( ( tTileEntity instanceof IGregTechTileEntity ) ) {
IMetaTileEntity tMetaTileEntity = ( ( IGregTechTileEntity ) tTileEntity ) . getMetaTileEntity ( ) ;
if ( tMetaTileEntity ! = null ) {
return tMetaTileEntity . getServerGUI ( aID , aPlayer . inventory , ( IGregTechTileEntity ) tTileEntity ) ;
}
}
return null ;
}
2016-05-18 04:41:36 +00:00
2016-09-15 23:17:08 +00:00
public Object getRightItem ( EntityPlayer player , int ID ) {
2016-12-23 19:41:22 +00:00
ItemStack mStack = player . getItemStackFromSlot ( EntityEquipmentSlot . values ( ) [ ID / 100 ] ) ;
if ( mStack = = null | | ! ( mStack . getItem ( ) instanceof ModularArmor_Item ) )
2016-08-18 13:45:25 +00:00
return null ;
2016-05-18 04:41:36 +00:00
2016-09-15 23:17:08 +00:00
switch ( ID % 100 ) {
case 0 :
return new ContainerBasicArmor ( player , new InventoryArmor ( ModularArmor_Item . class , mStack ) ) ;
case 1 :
return new ContainerElectricArmor1 ( player , new InventoryArmor ( ModularArmor_Item . class , mStack ) ) ;
case 2 :
return new ContainerElectricArmor1 ( player , new InventoryArmor ( ModularArmor_Item . class , mStack ) ) ;
}
return null ;
2015-12-28 16:17:35 +00:00
2016-09-15 23:17:08 +00:00
}
2015-10-22 02:06:25 +00:00
public Object getClientGuiElement ( int aID , EntityPlayer aPlayer , World aWorld , int aX , int aY , int aZ ) {
2016-09-15 23:17:08 +00:00
if ( aID > = 1000 ) {
int ID = aID - 1000 ;
switch ( ID ) {
case 0 :
2016-12-23 19:41:22 +00:00
return new GuiModularArmor ( new ContainerBasicArmor ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getHeldItemMainhand ( ) ) ) , aPlayer ) ;
2016-09-15 23:17:08 +00:00
case 1 :
2016-12-23 19:41:22 +00:00
return new GuiElectricArmor1 ( new ContainerElectricArmor1 ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getHeldItemMainhand ( ) ) ) , aPlayer ) ;
2016-09-15 23:17:08 +00:00
case 2 :
2016-12-23 19:41:22 +00:00
return new GuiElectricArmor1 ( new ContainerElectricArmor1 ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getHeldItemMainhand ( ) ) ) , aPlayer ) ;
2016-09-15 23:17:08 +00:00
default :
return getRightItemGui ( aPlayer , ID ) ;
}
}
2016-10-30 21:39:40 +00:00
if ( aID > = 100 ) {
2016-12-23 19:41:22 +00:00
int tSlot = aID / 100 ;
2016-10-30 21:39:40 +00:00
int ID = aID % 100 ;
switch ( ID ) {
2016-12-23 19:41:22 +00:00
case 0 :
return new GuiModularArmor ( new ContainerBasicArmor ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getEquipmentInSlot ( tSlot ) ) ) , aPlayer ) ;
case 1 :
return new GuiElectricArmor1 ( new ContainerElectricArmor1 ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getEquipmentInSlot ( tSlot ) ) ) , aPlayer ) ;
case 2 :
return new GuiElectricArmor1 ( new ContainerElectricArmor1 ( aPlayer , new InventoryArmor ( ModularArmor_Item . class , aPlayer . getEquipmentInSlot ( tSlot ) ) ) , aPlayer ) ;
default :
return getRightItem ( aPlayer , ID ) ;
}
2016-10-30 21:39:40 +00:00
}
2016-08-18 13:45:25 +00:00
TileEntity tTileEntity = aWorld . getTileEntity ( new BlockPos ( aX , aY , aZ ) ) ;
2015-10-22 02:06:25 +00:00
if ( ( tTileEntity instanceof IGregTechTileEntity ) ) {
IMetaTileEntity tMetaTileEntity = ( ( IGregTechTileEntity ) tTileEntity ) . getMetaTileEntity ( ) ;
if ( tMetaTileEntity ! = null ) {
return tMetaTileEntity . getClientGUI ( aID , aPlayer . inventory , ( IGregTechTileEntity ) tTileEntity ) ;
}
}
return null ;
}
2016-05-18 04:41:36 +00:00
2016-09-15 23:17:08 +00:00
public Object getRightItemGui ( EntityPlayer player , int ID ) {
2016-12-23 19:41:22 +00:00
ItemStack mStack = player . getItemStackFromSlot ( EntityEquipmentSlot . values ( ) [ ID / 100 ] ) ;
2016-09-15 23:17:08 +00:00
if ( mStack = = null | | ! ( mStack . getItem ( ) instanceof ModularArmor_Item ) ) return null ;
2016-05-18 04:41:36 +00:00
2016-09-15 23:17:08 +00:00
switch ( ID % 100 ) {
case 0 :
return new GuiModularArmor ( new ContainerBasicArmor ( player , new InventoryArmor ( ModularArmor_Item . class , mStack ) ) , player ) ;
case 1 :
return new GuiElectricArmor1 ( new ContainerElectricArmor1 ( player , new InventoryArmor ( ModularArmor_Item . class , mStack ) ) , player ) ;
case 2 :
return new GuiElectricArmor1 ( new ContainerElectricArmor1 ( player , new InventoryArmor ( ModularArmor_Item . class , mStack ) ) , player ) ;
}
return null ;
2015-12-28 16:17:35 +00:00
2016-09-15 23:17:08 +00:00
}
2015-10-22 02:06:25 +00:00
public int getBurnTime ( ItemStack aFuel ) {
if ( ( aFuel = = null ) | | ( aFuel . getItem ( ) = = null ) ) {
return 0 ;
}
2016-06-23 23:08:26 +00:00
int rFuelValue = 0 ;
2015-10-22 02:06:25 +00:00
if ( ( aFuel . getItem ( ) instanceof GT_MetaGenerated_Item ) ) {
2016-08-18 13:45:25 +00:00
Short tFuelValue = ( ( GT_MetaGenerated_Item ) aFuel . getItem ( ) ) . mBurnValues . get ( ( short ) aFuel . getItemDamage ( ) ) ;
2015-10-22 02:06:25 +00:00
if ( tFuelValue ! = null ) {
2016-08-18 13:45:25 +00:00
rFuelValue = Math . max ( rFuelValue , tFuelValue ) ;
2015-10-22 02:06:25 +00:00
}
}
NBTTagCompound tNBT = aFuel . getTagCompound ( ) ;
if ( tNBT ! = null ) {
short tValue = tNBT . getShort ( " GT.ItemFuelValue " ) ;
2016-10-13 20:26:10 +00:00
rFuelValue = Math . max ( rFuelValue , tValue ) ;
2015-10-22 02:06:25 +00:00
}
if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " gemSodium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 4000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " crushedSodium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 4000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustImpureSodium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 4000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustSodium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 4000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustSmallSodium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustTinySodium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 444 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " gemLithium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 6000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " crushedLithium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 6000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustImpureLithium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 6000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustLithium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 6000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustSmallLithium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 2000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustTinyLithium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 888 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " gemCaesium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 6000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " crushedCaesium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 6000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustImpureCaesium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 6000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustCaesium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 6000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustSmallCaesium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 2000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustTinyCaesium " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 888 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " gemLignite " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1200 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " crushedLignite " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1200 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustImpureLignite " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1200 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustLignite " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1200 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustSmallLignite " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 375 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustTinyLignite " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 166 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " gemCoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1600 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " crushedCoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1600 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustImpureCoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1600 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustCoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1600 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustSmallCoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 400 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustTinyCoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 177 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " gemCharcoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1600 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " crushedCharcoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1600 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustImpureCharcoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1600 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustCharcoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 1600 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustSmallCharcoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 400 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustTinyCharcoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 177 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustWood " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 100 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustSmallWood " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 25 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " dustTinyWood " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 11 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " plateWood " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . min ( rFuelValue , 300 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " blockLignite " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 12000 ) ;
2016-08-14 06:19:03 +00:00
} else if ( GT_OreDictUnificator . isItemStackInstanceOf ( aFuel , " blockCharcoal " ) ) {
2016-12-23 19:41:22 +00:00
rFuelValue = Math . max ( rFuelValue , 16000 ) ;
} else if ( GT_Utility . areStacksEqual ( aFuel , new ItemStack ( Blocks . WOODEN_BUTTON , 1 ) ) ) {
rFuelValue = Math . max ( rFuelValue , 150 ) ;
} else if ( GT_Utility . areStacksEqual ( aFuel , new ItemStack ( Blocks . LADDER , 1 ) ) ) {
rFuelValue = Math . max ( rFuelValue , 100 ) ;
} else if ( GT_Utility . areStacksEqual ( aFuel , new ItemStack ( Items . SIGN , 1 ) ) ) {
rFuelValue = Math . max ( rFuelValue , 600 ) ;
} else if ( GT_Utility . areStacksEqual ( aFuel , new ItemStack ( Items . OAK_DOOR , 1 ) ) ) {
rFuelValue = Math . max ( rFuelValue , 600 ) ;
} else if ( GT_Utility . areStacksEqual ( aFuel , ItemList . Block_MSSFUEL . get ( 1 ) ) ) {
2016-07-26 23:58:32 +00:00
rFuelValue = Math . max ( rFuelValue , 150000 ) ;
2016-12-23 19:41:22 +00:00
} else if ( GT_Utility . areStacksEqual ( aFuel , ItemList . Block_SSFUEL . get ( 1 ) ) ) {
2016-07-26 23:58:32 +00:00
rFuelValue = Math . max ( rFuelValue , 100000 ) ;
2016-07-25 22:04:21 +00:00
}
2015-10-22 02:06:25 +00:00
return rFuelValue ;
}
public Fluid addAutogeneratedMoltenFluid ( Materials aMaterial ) {
2016-09-24 22:05:18 +00:00
return addFluid ( " molten. " + aMaterial . mName . toLowerCase ( Locale . ENGLISH ) , " molten.autogenerated " , " Molten " + aMaterial . mDefaultLocalName , aMaterial ,
2015-10-22 02:06:25 +00:00
aMaterial . mMoltenRGBa , 4 , aMaterial . mMeltingPoint < = 0 ? 1000 : aMaterial . mMeltingPoint , null , null , 0 ) ;
}
public Fluid addAutogeneratedPlasmaFluid ( Materials aMaterial ) {
2016-09-24 22:05:18 +00:00
return addFluid ( " plasma. " + aMaterial . mName . toLowerCase ( Locale . ENGLISH ) , " plasma.autogenerated " , aMaterial . mDefaultLocalName + " Plasma " , aMaterial ,
2016-08-18 13:45:25 +00:00
aMaterial . mMoltenRGBa , 3 , 10000 , GT_OreDictUnificator . get ( OrePrefixes . cellPlasma , aMaterial , 1 ) , ItemList . Cell_Empty . get ( 1 ) ,
2015-10-22 02:06:25 +00:00
1000 ) ;
}
public Fluid addFluid ( String aName , String aLocalized , Materials aMaterial , int aState , int aTemperatureK ) {
return addFluid ( aName , aLocalized , aMaterial , aState , aTemperatureK , null , null , 0 ) ;
}
public Fluid addFluid ( String aName , String aLocalized , Materials aMaterial , int aState , int aTemperatureK , ItemStack aFullContainer ,
ItemStack aEmptyContainer , int aFluidAmount ) {
2016-08-14 07:06:00 +00:00
return addFluid ( aName , aName . toLowerCase ( Locale . ENGLISH ) , aLocalized , aMaterial , null , aState , aTemperatureK , aFullContainer , aEmptyContainer , aFluidAmount ) ;
2015-10-22 02:06:25 +00:00
}
public Fluid addFluid ( String aName , String aTexture , String aLocalized , Materials aMaterial , short [ ] aRGBa , int aState , int aTemperatureK ,
ItemStack aFullContainer , ItemStack aEmptyContainer , int aFluidAmount ) {
2016-09-15 23:17:08 +00:00
aName = aName . toLowerCase ( Locale . ENGLISH ) ;
2015-10-22 02:06:25 +00:00
Fluid rFluid = new GT_Fluid ( aName , aTexture , aRGBa ! = null ? aRGBa : Dyes . _NULL . getRGBA ( ) ) ;
GT_LanguageManager . addStringLocalization ( rFluid . getUnlocalizedName ( ) , aLocalized = = null ? aName : aLocalized ) ;
if ( FluidRegistry . registerFluid ( rFluid ) ) {
switch ( aState ) {
case 0 :
rFluid . setGaseous ( false ) ;
rFluid . setViscosity ( 10000 ) ;
break ;
case 1 :
case 4 :
rFluid . setGaseous ( false ) ;
rFluid . setViscosity ( 1000 ) ;
break ;
case 2 :
rFluid . setGaseous ( true ) ;
rFluid . setDensity ( - 100 ) ;
rFluid . setViscosity ( 200 ) ;
break ;
case 3 :
rFluid . setGaseous ( true ) ;
rFluid . setDensity ( 55536 ) ;
rFluid . setViscosity ( 10 ) ;
rFluid . setLuminosity ( 15 ) ;
}
} else {
rFluid = FluidRegistry . getFluid ( aName ) ;
}
if ( aMaterial ! = null ) {
switch ( aState ) {
case 0 :
aMaterial . mSolid = rFluid ;
break ;
case 1 :
aMaterial . mFluid = rFluid ;
break ;
case 2 :
aMaterial . mGas = rFluid ;
break ;
case 3 :
aMaterial . mPlasma = rFluid ;
break ;
case 4 :
aMaterial . mStandardMoltenFluid = rFluid ;
}
}
2016-12-15 14:58:15 +00:00
registerFluidContainer ( aFullContainer , aEmptyContainer , rFluid , aFluidAmount ) ;
return rFluid ;
}
public void registerFluidContainer ( ItemStack aFullContainer , ItemStack aEmptyContainer , Fluid rFluid , int aFluidAmount ) {
2015-10-22 02:06:25 +00:00
if ( ( aFullContainer ! = null ) & & ( aEmptyContainer ! = null )
& & ( ! FluidContainerRegistry . registerFluidContainer ( new FluidStack ( rFluid , aFluidAmount ) , aFullContainer , aEmptyContainer ) ) ) {
GT_Values . RA . addFluidCannerRecipe ( aFullContainer , GT_Utility . getContainerItem ( aFullContainer , false ) , null , new FluidStack ( rFluid , aFluidAmount ) ) ;
}
}
public File getSaveDirectory ( ) {
return this . mUniverse = = null ? null : this . mUniverse . getSaveHandler ( ) . getWorldDirectory ( ) ;
}
public void registerUnificationEntries ( ) {
GregTech_API . sUnification . mConfig . save ( ) ;
GregTech_API . sUnification . mConfig . load ( ) ;
GT_OreDictUnificator . resetUnificationEntries ( ) ;
for ( OreDictEventContainer tOre : this . mEvents ) {
2016-12-23 19:41:22 +00:00
if ( ( ! ( tOre . mEvent . getOre ( ) . getItem ( ) instanceof GT_MetaGenerated_Item ) ) & & ( tOre . mPrefix ! = null ) & & ( tOre . mPrefix . mIsUnificatable ) & & ( tOre . mMaterial ! = null ) ) {
2016-09-15 23:17:08 +00:00
boolean chkmi = tOre . mModID ! = null ;
if ( chkmi ) {
if ( tOre . mModID . equalsIgnoreCase ( " enderio " ) & & tOre . mPrefix = = OrePrefixes . ingot & & tOre . mMaterial = = Materials . DarkSteel ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , true ) ) , true ) ; continue ;
2016-09-15 23:17:08 +00:00
} else if ( tOre . mModID . equalsIgnoreCase ( " thermalfoundation " ) & & tOre . mPrefix = = OrePrefixes . dust & & tOre . mMaterial = = Materials . Blizz ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , true ) ) , true ) ; continue ;
2016-09-15 23:17:08 +00:00
} else if ( tOre . mModID . equalsIgnoreCase ( " thermalfoundation " ) & & tOre . mPrefix = = OrePrefixes . dust & & tOre . mMaterial = = Materials . Pyrotheum ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , true ) ) , true ) ; continue ;
2016-09-15 23:17:08 +00:00
} else if ( tOre . mModID . equalsIgnoreCase ( aTextArsmagica2 ) & & tOre . mPrefix = = OrePrefixes . dust & & tOre . mMaterial = = Materials . Vinteum ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , true ) ) , true ) ; continue ;
2016-09-15 23:17:08 +00:00
} else if ( tOre . mModID . equalsIgnoreCase ( aTextArsmagica2 ) & & tOre . mPrefix = = OrePrefixes . gem & & tOre . mMaterial = = Materials . BlueTopaz ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , true ) ) , true ) ; continue ;
2016-09-15 23:17:08 +00:00
} else if ( tOre . mModID . equalsIgnoreCase ( aTextArsmagica2 ) & & tOre . mPrefix = = OrePrefixes . gem & & tOre . mMaterial = = Materials . Chimerite ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , true ) ) , true ) ; continue ;
2016-09-15 23:17:08 +00:00
} else if ( tOre . mModID . equalsIgnoreCase ( aTextArsmagica2 ) & & tOre . mPrefix = = OrePrefixes . gem & & tOre . mMaterial = = Materials . Moonstone ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , true ) ) , true ) ; continue ;
2016-09-15 23:17:08 +00:00
} else if ( tOre . mModID . equalsIgnoreCase ( aTextArsmagica2 ) & & tOre . mPrefix = = OrePrefixes . gem & & tOre . mMaterial = = Materials . Sunstone ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , true ) ) , true ) ; continue ;
2016-09-15 23:17:08 +00:00
} else if ( tOre . mModID . equalsIgnoreCase ( " rotarycraft " ) & & tOre . mPrefix = = OrePrefixes . ingot & & tOre . mMaterial = = Materials . HSLA ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , true ) ) , true ) ; continue ;
2016-09-15 23:17:08 +00:00
} else if ( tOre . mModID . equalsIgnoreCase ( " appliedenergistics2 " ) & & tOre . mPrefix = = OrePrefixes . gem & & tOre . mMaterial = = Materials . CertusQuartz ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , true ) ) , true ) ; continue ;
2016-09-15 23:17:08 +00:00
} else if ( tOre . mModID . equalsIgnoreCase ( " appliedenergistics2 " ) & & tOre . mPrefix = = OrePrefixes . dust & & tOre . mMaterial = = Materials . CertusQuartz ) {
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , true ) ) , true ) ; continue ;
2016-09-15 23:17:08 +00:00
}
}
2016-12-23 19:41:22 +00:00
if ( GT_OreDictUnificator . isBlacklisted ( tOre . mEvent . getOre ( ) ) ) {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , true ) ;
2015-10-22 02:06:25 +00:00
} else {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
2016-12-23 19:41:22 +00:00
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( chkmi ) & & ( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) . toString ( ) , tOre . mEvent . getName ( ) , false ) ) , true ) ;
2015-10-22 02:06:25 +00:00
}
}
}
for ( OreDictEventContainer tOre : this . mEvents ) {
2016-08-18 13:45:25 +00:00
if ( ( ( tOre . mEvent . getOre ( ) . getItem ( ) instanceof GT_MetaGenerated_Item ) ) & & ( tOre . mPrefix ! = null ) & & ( tOre . mPrefix . mIsUnificatable )
2015-10-22 02:06:25 +00:00
& & ( tOre . mMaterial ! = null ) ) {
2016-08-18 13:45:25 +00:00
if ( GT_OreDictUnificator . isBlacklisted ( tOre . mEvent . getOre ( ) ) ) {
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , true ) ;
2015-10-22 02:06:25 +00:00
} else {
2016-08-18 13:45:25 +00:00
GT_OreDictUnificator . addAssociation ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , false ) ;
GT_OreDictUnificator . set ( tOre . mPrefix , tOre . mMaterial , tOre . mEvent . getOre ( ) , ( tOre . mModID ! = null ) & &
2016-12-23 19:41:22 +00:00
( GregTech_API . sUnification . get ( new StringBuilder ( ) . append ( ConfigCategories . specialunificationtargets ) . append ( " . " ) . append ( tOre . mModID ) , tOre . mEvent . getName ( ) , false ) ) , true ) ;
2015-10-22 02:06:25 +00:00
}
}
}
GregTech_API . sUnificationEntriesRegistered = true ;
GregTech_API . sUnification . mConfig . save ( ) ;
GT_Recipe . reInit ( ) ;
}
public void activateOreDictHandler ( ) {
this . mOreDictActivated = true ;
2016-12-13 08:41:38 +00:00
ProgressManager . ProgressBar progressBar = ProgressManager . push ( " Register materials " , mEvents . size ( ) ) ;
2015-10-22 02:06:25 +00:00
OreDictEventContainer tEvent ;
for ( Iterator i$ = this . mEvents . iterator ( ) ; i$ . hasNext ( ) ; registerRecipes ( tEvent ) ) {
tEvent = ( OreDictEventContainer ) i$ . next ( ) ;
2016-12-13 08:50:01 +00:00
progressBar . step ( tEvent . mMaterial = = null ? " " : tEvent . mMaterial . toString ( ) ) ;
2015-10-22 02:06:25 +00:00
}
2016-12-13 10:53:37 +00:00
ProgressManager . pop ( progressBar ) ;
2015-10-22 02:06:25 +00:00
}
2016-05-18 04:41:36 +00:00
2016-08-18 13:45:25 +00:00
public static final HashMap < BlockPos , int [ ] > chunkData = new HashMap < > ( 5000 ) ;
2016-05-18 04:41:36 +00:00
2015-12-06 20:15:41 +00:00
@SubscribeEvent
public void handleChunkSaveEvent ( ChunkDataEvent . Save event )
2016-09-15 23:17:08 +00:00
{
2016-12-23 19:41:22 +00:00
BlockPos tPos = new BlockPos ( event . getChunk ( ) . xPosition , 1 , event . getChunk ( ) . zPosition ) ;
2016-09-15 23:17:08 +00:00
if ( chunkData . containsKey ( tPos ) ) {
int [ ] tInts = chunkData . get ( tPos ) ;
if ( tInts . length > 0 ) { event . getData ( ) . setInteger ( " GTOIL " , tInts [ 0 ] ) ; }
if ( tInts . length > 1 ) { event . getData ( ) . setInteger ( " GTPOLLUTION " , tInts [ 1 ] ) ; } }
2015-12-06 20:15:41 +00:00
}
2016-05-18 04:41:36 +00:00
2015-12-06 20:15:41 +00:00
@SubscribeEvent
public void handleChunkLoadEvent ( ChunkDataEvent . Load event )
{
2016-09-15 23:17:08 +00:00
int tOil = 0 ;
int tPollution = 0 ;
2016-12-23 19:41:22 +00:00
BlockPos tPos = new BlockPos ( event . getChunk ( ) . xPosition , 1 , event . getChunk ( ) . zPosition ) ;
2016-09-15 23:17:08 +00:00
int [ ] tData = new int [ 2 ] ;
if ( chunkData . containsKey ( tPos ) ) {
tData = chunkData . get ( tPos ) ;
chunkData . remove ( tPos ) ;
}
if ( event . getData ( ) . hasKey ( " GTOIL " ) ) {
if ( tData . length > 2 ) {
tOil = tData [ 0 ] ;
} else {
tOil + = event . getData ( ) . getInteger ( " GTOIL " ) ;
}
} else {
if ( tData [ 0 ] ! = 0 ) {
tOil = tData [ 0 ] ;
}
}
if ( event . getData ( ) . hasKey ( " GTPOLLUTION " ) ) {
if ( tData . length > 2 ) {
tPollution = tData [ 1 ] ;
} else {
tPollution + = event . getData ( ) . getInteger ( " GTPOLLUTION " ) ;
}
} else {
if ( tData [ 1 ] ! = 0 ) {
tPollution = tData [ 1 ] ;
}
}
chunkData . put ( tPos , new int [ ] { tOil , tPollution , - 1 } ) ;
2016-05-18 04:41:36 +00:00
}
2015-10-22 02:06:25 +00:00
public static class OreDictEventContainer {
public final OreDictionary . OreRegisterEvent mEvent ;
public final OrePrefixes mPrefix ;
public final Materials mMaterial ;
public final String mModID ;
public OreDictEventContainer ( OreDictionary . OreRegisterEvent aEvent , OrePrefixes aPrefix , Materials aMaterial , String aModID ) {
this . mEvent = aEvent ;
this . mPrefix = aPrefix ;
this . mMaterial = aMaterial ;
this . mModID = ( ( aModID = = null ) | | ( aModID . equals ( " UNKNOWN " ) ) ? null : aModID ) ;
}
}
2016-09-15 23:17:08 +00:00
}