More changes
This commit is contained in:
parent
9aaa65feb4
commit
d5ba110323
|
@ -27,6 +27,7 @@ import WayofTime.alchemicalWizardry.common.AlchemicalWizardryTickHandler;
|
|||
import WayofTime.alchemicalWizardry.common.CommonProxy;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAirElemental;
|
||||
import WayofTime.alchemicalWizardry.common.LifeBucketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssence;
|
||||
import WayofTime.alchemicalWizardry.common.ModLivingDropsEvent;
|
||||
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
|
@ -234,7 +235,14 @@ public class AlchemicalWizardry
|
|||
System.err.println(e);
|
||||
}
|
||||
}
|
||||
AlchemicalWizardry.lifeEssenceFluid = new LifeEssence("Life Essence");
|
||||
FluidRegistry.registerFluid(lifeEssenceFluid);
|
||||
|
||||
ModBlocks.init();
|
||||
|
||||
|
||||
ModBlocks.registerBlocksInPre();
|
||||
|
||||
ModItems.init();
|
||||
|
||||
ModItems.registerItems();
|
||||
|
@ -249,10 +257,8 @@ public class AlchemicalWizardry
|
|||
int craftingConstant = OreDictionary.WILDCARD_VALUE;
|
||||
//TickRegistry.registerTickHandler(new AlchemicalWizardryTickHandler(), Side.SERVER);
|
||||
|
||||
ModBlocks.registerBlocks();
|
||||
|
||||
ModBlocks.registerBlocksInInit();
|
||||
//blocks
|
||||
|
||||
|
||||
proxy.registerRenderers();
|
||||
proxy.registerEntities();
|
||||
|
@ -305,7 +311,7 @@ public class AlchemicalWizardry
|
|||
ItemStack energySwordStack = new ItemStack(ModItems.energySword);
|
||||
ItemStack energyBlasterStack = new ItemStack(ModItems.energyBlaster);
|
||||
ItemStack sacrificialDaggerStack = new ItemStack(ModItems.sacrificialDagger);
|
||||
ItemStack bloodAltarStack = new ItemStack(ModBlocks.blockAltar);
|
||||
ItemStack bloodAltarStack = new ItemStack(ModBlocks.blockAltar,1,0);
|
||||
ItemStack bloodRuneCraftedStack = new ItemStack(ModBlocks.bloodRune, 1);
|
||||
ItemStack bloodRuneStack = new ItemStack(ModBlocks.bloodRune);
|
||||
ItemStack speedRuneStack = new ItemStack(ModBlocks.speedRune);
|
||||
|
@ -430,105 +436,20 @@ public class AlchemicalWizardry
|
|||
customPotionReciprocation = (new PotionReciprocation(customPotionReciprocationID, false, 0xFFFFFF)).setIconIndex(0, 0).setPotionName("Reciprocation");
|
||||
customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID,false,0).setIconIndex(0,0).setPotionName("Flame Cloak"));
|
||||
customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID,false,0).setIconIndex(0,0).setPotionName("Ice Cloak"));
|
||||
//All items registered go here
|
||||
//LanguageRegistry.addName(orbOfTesting, "Orb of Testing");
|
||||
LanguageRegistry.addName(ModItems.weakBloodOrb, "Weak Blood Orb");
|
||||
LanguageRegistry.addName(ModItems.apprenticeBloodOrb, "Apprentice Blood Orb");
|
||||
LanguageRegistry.addName(ModItems.magicianBloodOrb, "Magician's Blood Orb");
|
||||
LanguageRegistry.addName(ModItems.archmageBloodOrb, "Archmage's Blood Orb");
|
||||
LanguageRegistry.addName(ModItems.energyBlaster, "Energy Blaster");
|
||||
LanguageRegistry.addName(ModItems.energySword, "Bound Blade");
|
||||
LanguageRegistry.addName(ModItems.lavaCrystal, "Lava Crystal");
|
||||
LanguageRegistry.addName(ModItems.waterSigil, "Water Sigil");
|
||||
LanguageRegistry.addName(ModItems.lavaSigil, "Lava Sigil");
|
||||
LanguageRegistry.addName(ModItems.voidSigil, "Void Sigil");
|
||||
//LanguageRegistry.addName(glassShard, "Glass Shard");
|
||||
//LanguageRegistry.addName(bloodiedShard, "Bloodied Shard");
|
||||
LanguageRegistry.addName(ModItems.blankSlate, "Blank Slate");
|
||||
LanguageRegistry.addName(ModItems.reinforcedSlate, "Reinforced Slate");
|
||||
LanguageRegistry.addName(ModItems.sacrificialDagger, "Sacrificial Knife");
|
||||
LanguageRegistry.addName(ModItems.daggerOfSacrifice, "Dagger of Sacrifice");
|
||||
LanguageRegistry.addName(ModItems.airSigil, "Air Sigil");
|
||||
LanguageRegistry.addName(ModItems.sigilOfTheFastMiner, "Sigil of the Fast Miner");
|
||||
LanguageRegistry.addName(ModItems.sigilOfElementalAffinity, "Sigil of Elemental Affinity");
|
||||
LanguageRegistry.addName(ModItems.sigilOfHaste, "Sigil of Haste");
|
||||
LanguageRegistry.addName(ModItems.sigilOfHolding, "Sigil of Holding");
|
||||
LanguageRegistry.addName(ModItems.growthSigil, "Sigil of the Green Grove");
|
||||
// LanguageRegistry.addName(elementalInkWater, "Elemental Ink: Water");
|
||||
// LanguageRegistry.addName(elementalInkFire, "Elemental Ink: Fire");
|
||||
// LanguageRegistry.addName(elementalInkEarth, "Elemental Ink: Earth");
|
||||
// LanguageRegistry.addName(elementalInkAir, "Elemental Ink: Air");
|
||||
LanguageRegistry.addName(ModItems.divinationSigil, "Divination Sigil");
|
||||
LanguageRegistry.addName(new ItemStack(ModItems.activationCrystal, 1, 0), "Weak Activation Crystal");
|
||||
LanguageRegistry.addName(new ItemStack(ModItems.activationCrystal, 1, 1), "Awakened Activation Crystal");
|
||||
LanguageRegistry.addName(ModItems.waterScribeTool, "Elemental Inscription Tool: Water");
|
||||
LanguageRegistry.addName(ModItems.fireScribeTool, "Elemental Inscription Tool: Fire");
|
||||
LanguageRegistry.addName(ModItems.earthScribeTool, "Elemental Inscription Tool: Earth");
|
||||
LanguageRegistry.addName(ModItems.airScribeTool, "Elemental Inscription Tool: Air");
|
||||
LanguageRegistry.addName(ModItems.boundPickaxe, "Bound Pickaxe");
|
||||
LanguageRegistry.addName(ModItems.boundAxe, "Bound Axe");
|
||||
LanguageRegistry.addName(ModItems.boundShovel, "Bound Shovel");
|
||||
LanguageRegistry.addName(ModItems.boundHelmet, "Bound Helmet");
|
||||
LanguageRegistry.addName(ModItems.boundPlate, "Bound Chestplate");
|
||||
LanguageRegistry.addName(ModItems.boundLeggings, "Bound Leggings");
|
||||
LanguageRegistry.addName(ModItems.boundBoots, "Bound Boots");
|
||||
LanguageRegistry.addName(ModItems.weakBloodShard, "Weak Blood Shard");
|
||||
LanguageRegistry.addName(ModItems.blankSpell, "Unbound Crystal");
|
||||
LanguageRegistry.addName(ModItems.masterBloodOrb, "Master Blood Orb");
|
||||
LanguageRegistry.addName(ModItems.alchemyFlask, "Potion Flask");
|
||||
LanguageRegistry.addName(ModItems.mundanePowerCatalyst, "Mundane Power Catalyst");
|
||||
LanguageRegistry.addName(ModItems.averagePowerCatalyst, "Average Power Catalyst");
|
||||
LanguageRegistry.addName(ModItems.greaterPowerCatalyst, "Greater Power Catalyst");
|
||||
LanguageRegistry.addName(ModItems.mundaneLengtheningCatalyst, "Mundane Lengthening Catalyst");
|
||||
LanguageRegistry.addName(ModItems.averageLengtheningCatalyst, "Average Lengthening Catalyst");
|
||||
LanguageRegistry.addName(ModItems.greaterLengtheningCatalyst, "Greater Lengthening Catalyst");
|
||||
LanguageRegistry.addName(ModItems.standardBindingAgent, "Standard Binding Agent");
|
||||
LanguageRegistry.addName(ModItems.incendium, "Incendium");
|
||||
LanguageRegistry.addName(ModItems.magicales, "Magicales");
|
||||
LanguageRegistry.addName(ModItems.sanctus, "Sanctus");
|
||||
LanguageRegistry.addName(ModItems.aether, "Aether");
|
||||
LanguageRegistry.addName(ModItems.simpleCatalyst, "Simple Catalyst");
|
||||
LanguageRegistry.addName(ModItems.crepitous, "Crepitous");
|
||||
LanguageRegistry.addName(ModItems.crystallos, "Crystallos");
|
||||
LanguageRegistry.addName(ModItems.terrae, "Terrae");
|
||||
LanguageRegistry.addName(ModItems.aquasalus, "Aquasalus");
|
||||
LanguageRegistry.addName(ModItems.tennebrae, "Tennebrae");
|
||||
LanguageRegistry.addName(ModItems.sigilOfWind, "Sigil of the Whirlwind");
|
||||
LanguageRegistry.addName(ModItems.telepositionFocus, "Teleposition Focus");
|
||||
LanguageRegistry.addName(ModItems.enhancedTelepositionFocus, "Enhanced Teleposition Focus");
|
||||
LanguageRegistry.addName(ModItems.reinforcedTelepositionFocus, "Reinforced Teleposition Focus");
|
||||
LanguageRegistry.addName(ModItems.demonicTelepositionFocus, "Demonic Teleposition Focus");
|
||||
LanguageRegistry.addName(ModItems.imbuedSlate, "Imbued Slate");
|
||||
LanguageRegistry.addName(ModItems.demonicSlate, "Demonic Slate");
|
||||
LanguageRegistry.addName(ModItems.duskScribeTool, "Elemental Inscription Tool: Dusk");
|
||||
LanguageRegistry.addName(ModItems.sigilOfTheBridge, "Sigil of the Phantom Bridge");
|
||||
LanguageRegistry.addName(ModItems.armourInhibitor, "Armour Inhibitor");
|
||||
LanguageRegistry.addName(ModItems.creativeFiller, "Orb of Testing");
|
||||
LanguageRegistry.addName(ModItems.weakFillingAgent, "Weak Filling Agent");
|
||||
LanguageRegistry.addName(ModItems.standardFillingAgent, "Standard Filling Agent");
|
||||
LanguageRegistry.addName(ModItems.enhancedFillingAgent, "Enhanced Filling Agent");
|
||||
LanguageRegistry.addName(ModItems.weakBindingAgent, "Weak Binding Agent");
|
||||
LanguageRegistry.addName(ModItems.itemRitualDiviner, "Ritual Diviner");
|
||||
LanguageRegistry.addName(ModItems.sigilOfMagnetism, "Sigil of Magnetism");
|
||||
LanguageRegistry.addName(ModItems.itemKeyOfDiablo, "Key of Binding");
|
||||
LanguageRegistry.addName(ModItems.energyBazooka, "Energy Bazooka");
|
||||
LanguageRegistry.addName(ModItems.itemBloodLightSigil, "Sigil of the Blood Lamp");
|
||||
LanguageRegistry.addName(ModItems.demonBloodShard, "Demon Blood Shard");
|
||||
|
||||
//FluidStack lifeEssenceFluidStack = new FluidStack(lifeEssenceFluid, 1);
|
||||
//LiquidStack lifeEssence = new LiquidStack(lifeEssenceFlowing, 1);
|
||||
//LiquidDictionary.getOrCreateLiquid("Life Essence", lifeEssence);
|
||||
FluidRegistry.registerFluid(lifeEssenceFluid);
|
||||
ModBlocks.blockLifeEssence = new LifeEssenceBlock();
|
||||
|
||||
|
||||
// ModBlocks.blockLifeEssence.setUnlocalizedName("lifeEssenceBlock");
|
||||
FluidContainerRegistry.registerFluidContainer(lifeEssenceFluid, new ItemStack(ModItems.bucketLife), FluidContainerRegistry.EMPTY_BUCKET);
|
||||
FluidRegistry.registerFluid(lifeEssenceFluid);
|
||||
|
||||
//lifeEssenceFluid.setUnlocalizedName("lifeEssence");
|
||||
//LiquidContainerRegistry.registerLiquid(new LiquidContainerData(LiquidDictionary.getLiquid("Life Essence", LiquidContainerRegistry.BUCKET_VOLUME), new ItemStack(AlchemicalWizardry.bucketLife), new ItemStack(Item.bucketEmpty)));
|
||||
//GameRegistry.registerBlock(testingBlock, "testingBlock");
|
||||
//LanguageRegistry.addName(testingBlock, "Testing Block");
|
||||
//(testingBlock, "pickaxe", 0);
|
||||
LanguageRegistry.addName(ModBlocks.blockAltar, "Blood Altar");
|
||||
LanguageRegistry.addName(ModBlocks.blockLifeEssence, "Life Essence");
|
||||
ModBlocks.blockAltar.setHarvestLevel("pickaxe", 1);
|
||||
//Register Tile Entity
|
||||
GameRegistry.registerTileEntity(TEAltar.class, "containerAltar");
|
||||
|
@ -545,69 +466,7 @@ public class AlchemicalWizardry
|
|||
GameRegistry.registerTileEntity(TESpellEffectBlock.class, "containerSpellEffectBlock");
|
||||
GameRegistry.registerTileEntity(TESpellModifierBlock.class, "containerSpellModifierBlock");
|
||||
GameRegistry.registerTileEntity(TESpellEnhancementBlock.class, "containerSpellEnhancementBlock");
|
||||
//
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.bloodRune, 1, 0), "Blood Rune");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.bloodRune, 1, 1), "Rune of Augmented Capacity");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.bloodRune, 1, 2), "Rune of Dislocation");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.bloodRune, 1, 3), "Rune of the Orb");
|
||||
//TODO
|
||||
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellParadigm, 1, 0), "Particle Generator");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellParadigm, 1, 1), "Self Augmentator");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellParadigm, 1, 2), "Melee Aggregator");
|
||||
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 0), "Unstable Spell Empowerer");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 1), "Standard Spell Empowerer");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 2), "Reinforced Spell Empowerer");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 3), "Imbued Spell Empowerer");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 4), "Demonic Spell Empowerer");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 5), "Unstable Spell Dampener");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 6), "Standard Spell Dampener");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 7), "Reinforced Spell Dampener");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 8), "Imbued Spell Dampener");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 9), "Demonic Spell Dampener");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 10), "Unstable Spell Augmenter");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 11), "Standard Spell Augmenter");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 12), "Reinforced Spell Augmenter");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 13), "Imbued Spell Augmenter");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 14), "Demonic Spell Augmenter");
|
||||
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellModifier, 1, 0), "Default Spell Modifier");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellModifier, 1, 1), "Offensive Spell Modifier");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellModifier, 1, 2), "Defensive Spell Modifier");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellModifier, 1, 3), "Environmental Spell Modifier");
|
||||
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEffect, 1, 0), "Crucible of Fire");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEffect, 1, 1), "Ice Maker");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEffect, 1, 2), "Wind Generator");
|
||||
LanguageRegistry.addName(new ItemStack(ModBlocks.blockSpellEffect, 1, 3), "Earth Former");
|
||||
|
||||
LanguageRegistry.addName(ModBlocks.speedRune, "Speed Rune");
|
||||
LanguageRegistry.addName(ModBlocks.efficiencyRune, "Efficiency Rune");
|
||||
LanguageRegistry.addName(ModBlocks.runeOfSacrifice, "Rune of Sacrifice");
|
||||
LanguageRegistry.addName(ModBlocks.runeOfSelfSacrifice, "Rune of Self-sacrifice");
|
||||
// GameRegistry.registerBlock(lifeEssenceStill, "lifeEssenceStill");
|
||||
// GameRegistry.registerBlock(lifeEssenceFlowing, "lifeEssenceFlowing");
|
||||
//LanguageRegistry.addName(lifeEssenceStill, "Life Essence");
|
||||
LanguageRegistry.addName(ModItems.bucketLife, "Bucket of Life");
|
||||
LanguageRegistry.addName(ModBlocks.blockMasterStone, "Master Ritual Stone");
|
||||
LanguageRegistry.addName(ModBlocks.imperfectRitualStone, "Imperfect Ritual Stone");
|
||||
LanguageRegistry.addName(ModBlocks.ritualStone, "Ritual Stone");
|
||||
LanguageRegistry.addName(ModBlocks.armourForge, "Soul Armour Forge");
|
||||
LanguageRegistry.addName(ModBlocks.emptySocket, "Empty Socket");
|
||||
LanguageRegistry.addName(ModBlocks.bloodSocket, "Filled Socket");
|
||||
LanguageRegistry.addName(ModBlocks.bloodStoneBrick, "Bloodstone Brick");
|
||||
LanguageRegistry.addName(ModBlocks.largeBloodStoneBrick, "Large Bloodstone Brick");
|
||||
LanguageRegistry.addName(ModBlocks.blockHomHeart, "Spell Table");
|
||||
LanguageRegistry.addName(ModBlocks.blockPedestal, "Arcane Pedestal");
|
||||
LanguageRegistry.addName(ModBlocks.blockPlinth, "Arcane Plinth");
|
||||
LanguageRegistry.addName(ModBlocks.blockWritingTable, "Alchemic Chemistry Set");
|
||||
LanguageRegistry.addName(ModBlocks.blockTeleposer, "Teleposer");
|
||||
LanguageRegistry.addName(ModBlocks.spectralBlock, "Spectral Block");
|
||||
LanguageRegistry.addName(ModBlocks.blockBloodLight, "Blood Light");
|
||||
LanguageRegistry.addName(ModBlocks.blockConduit, "Spell Conduit");
|
||||
//TODO
|
||||
|
||||
|
||||
//GameRegistry.registerBlock(ModBlocks.blockSpellEffect,"blockSpellEffect");
|
||||
ModBlocks.bloodRune.setHarvestLevel("pickaxe", 2);
|
||||
ModBlocks.speedRune.setHarvestLevel("pickaxe", 2);
|
||||
|
@ -715,21 +574,6 @@ public class AlchemicalWizardry
|
|||
EntityRegistry.registerModEntity(EntityShadeElemental.class, "ShadeElemental", this.entityShadeElementalID, this, 120, 3, true);
|
||||
EntityRegistry.registerModEntity(EntityHolyElemental.class, "HolyElemental", this.entityHolyElementalID, this, 120, 3, true);
|
||||
//EntityRegistry.addSpawn(EntityFallenAngel.class, 5, 1, 5, EnumCreatureType.creature, BiomeGenBase.biomeList);
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.FallenAngel.name", "en_US", "Fallen Angel");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.LowerGuardian.name", "en_US", "Lower Stone Guardian");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.BileDemon.name", "en_US", "Bile Demon");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.WingedFireDemon.name", "en_US", "Winged Fire Demon");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.SmallEarthGolem.name", "en_US", "Small Earth Golem");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.IceDemon.name", "en_US", "Ice Demon");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.BoulderFist.name", "en_US", "Boulder Fist");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.Shade.name", "en_US", "Shade");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.AirElemental.name", "en_US", "Air Elemental");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.WaterElemental.name", "en_US", "Water Elemental");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.EarthElemental.name", "en_US", "Earth Elemental");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.FireElemental.name", "en_US", "Fire Elemental");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.ShadeElemental.name", "en_US", "Shade Elemental");
|
||||
LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.HolyElemental.name", "en_US", "Holy Elemental");
|
||||
LanguageRegistry.instance().addStringLocalization("itemGroup.tabBloodMagic", "en_US", "Blood Magic");
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.standardBindingAgent), 1, 3, this.standardBindingAgentDungeonChance));
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundanePowerCatalyst), 1, 1, this.mundanePowerCatalystDungeonChance));
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundaneLengtheningCatalyst), 1, 1, this.mundaneLengtheningCatalystDungeonChance));
|
||||
|
|
|
@ -60,7 +60,7 @@ public class ModBlocks
|
|||
efficiencyRune = new EfficiencyRune();
|
||||
runeOfSacrifice = new RuneOfSacrifice();
|
||||
runeOfSelfSacrifice = new RuneOfSelfSacrifice();
|
||||
AlchemicalWizardry.lifeEssenceFluid = new LifeEssence("Life Essence");
|
||||
|
||||
blockTeleposer = new BlockTeleposer();
|
||||
spectralBlock = new SpectralBlock();
|
||||
ritualStone = new RitualStone();
|
||||
|
@ -81,12 +81,14 @@ public class ModBlocks
|
|||
blockSpellParadigm = new BlockSpellParadigm();
|
||||
blockSpellModifier = new BlockSpellModifier();
|
||||
blockSpellEnhancement = new BlockSpellEnhancement();
|
||||
|
||||
blockLifeEssence = new LifeEssenceBlock();
|
||||
}
|
||||
|
||||
public static void registerBlocks()
|
||||
public static void registerBlocksInPre()
|
||||
{
|
||||
GameRegistry.registerBlock(ModBlocks.blockAltar, "Altar");
|
||||
GameRegistry.registerBlock(ModBlocks.bloodRune, ItemBloodRuneBlock.class, "AlchemicalWizardry" + (ModBlocks.bloodRune.getUnlocalizedName().substring(5)));
|
||||
GameRegistry.registerBlock(ModBlocks.blockAltar, "bloodAltar");
|
||||
GameRegistry.registerBlock(ModBlocks.blockLifeEssence, "lifeEssence");
|
||||
GameRegistry.registerBlock(ModBlocks.blockSpellParadigm, ItemSpellParadigmBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellParadigm.getUnlocalizedName()));
|
||||
GameRegistry.registerBlock(ModBlocks.blockSpellEnhancement, ItemSpellEnhancementBlock.class,"AlchemicalWizardry" + (ModBlocks.blockSpellEnhancement.getUnlocalizedName()));
|
||||
|
@ -114,4 +116,9 @@ public class ModBlocks
|
|||
GameRegistry.registerBlock(ModBlocks.blockBloodLight, "bloodLight");
|
||||
GameRegistry.registerBlock(ModBlocks.blockConduit,"blockConduit");
|
||||
}
|
||||
|
||||
public static void registerBlocksInInit()
|
||||
{
|
||||
//GameRegistry.registerBlock(ModBlocks.blockLifeEssence, "lifeEssence");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.client;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
|
@ -25,11 +26,13 @@ import WayofTime.alchemicalWizardry.common.renderer.block.RenderConduit;
|
|||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderPedestal;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderPlinth;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEffectBlock;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEnhancementBlock;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.TEAltarRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAltarItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEConduitItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellEffectBlockItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellEnhancementBlockItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBileDemon;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBoulderFist;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderElemental;
|
||||
|
@ -57,6 +60,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit;
|
|||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
|
@ -103,15 +107,19 @@ public class ClientProxy extends CommonProxy
|
|||
RenderingRegistry.registerEntityRenderingHandler(EntityShadeElemental.class, new RenderElemental(new ModelElemental(), 0.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityHolyElemental.class, "AlchemicalWizardry.HolyElemental", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityHolyElemental.class, new RenderElemental(new ModelElemental(), 0.5F));
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEPlinth.class, new RenderPlinth());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEWritingTable.class, new RenderWritingTable());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEConduit.class, new RenderConduit());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TESpellEffectBlock.class, new RenderSpellEffectBlock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TESpellEnhancementBlock.class, new RenderSpellEnhancementBlock());
|
||||
|
||||
//Item Renderer stuff
|
||||
//MinecraftForgeClient.registerItemRenderer(ModBlocks.blockConduit.blockID, new TEConduitItemRenderer());
|
||||
//MinecraftForgeClient.registerItemRenderer(ModBlocks.blockSpellEffect.blockID, new TESpellEffectBlockItemRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellEffect), new TESpellEffectBlockItemRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellEnhancement), new TESpellEnhancementBlockItemRenderer());
|
||||
|
||||
//RenderingRegistry.registerEntityRenderingHandler(FireProjectile.class, new RenderFireProjectile());
|
||||
//RenderingRegistry.registerBlockHandler(new AltarRenderer());
|
||||
}
|
||||
|
@ -125,8 +133,8 @@ public class ClientProxy extends CommonProxy
|
|||
@Override
|
||||
public void InitRendering()
|
||||
{
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer());
|
||||
//MinecraftForgeClient.registerItemRenderer(ModBlocks.blockAltar.blockID, new TEAltarItemRenderer());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAltar), new TEAltarItemRenderer());
|
||||
//MinecraftForgeClient.registerItemRenderer(AlchemicalWizardry.blockWritingTable.blockID, new TEWritingTableItemRenderer());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,9 @@ import io.netty.channel.SimpleChannelInboundHandler;
|
|||
|
||||
import java.util.EnumMap;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -21,6 +24,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
|||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.FMLEmbeddedChannel;
|
||||
import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec;
|
||||
import cpw.mods.fml.common.network.FMLOutboundHandler;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -47,7 +51,7 @@ public enum NewPacketHandler
|
|||
{
|
||||
// request a channel pair for IronChest from the network registry
|
||||
// Add the IronChestCodec as a member of both channel pipelines
|
||||
this.channels = NetworkRegistry.INSTANCE.newChannel("BloodMagic", new TEAltarCodec(), new TEOrientableCodec(), new TEPedestalCodec(), new TEPlinthCodec(), new TESocketCodec());
|
||||
this.channels = NetworkRegistry.INSTANCE.newChannel("BloodMagic", new TEAltarCodec());
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
|
||||
{
|
||||
addClientHandler();
|
||||
|
@ -64,22 +68,17 @@ public enum NewPacketHandler
|
|||
private void addClientHandler()
|
||||
{
|
||||
FMLEmbeddedChannel clientChannel = this.channels.get(Side.CLIENT);
|
||||
// These two lines find the existing codec (Ironchestcodec) and insert our message handler after it
|
||||
// in the pipeline
|
||||
|
||||
String tileAltarCodec = clientChannel.findChannelHandlerNameForType(TEAltarCodec.class);
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "TEAltarHandler", new TEAltarMessageHandler());
|
||||
|
||||
String tileOrientableCodec = clientChannel.findChannelHandlerNameForType(TEOrientableCodec.class);
|
||||
clientChannel.pipeline().addAfter(tileOrientableCodec, "TEOrientableHandler", new TEOrientableMessageHandler());
|
||||
|
||||
String tilePedestalCodec = clientChannel.findChannelHandlerNameForType(TEPedestalCodec.class);
|
||||
clientChannel.pipeline().addAfter(tilePedestalCodec, "TEPedestalHandler", new TEPedestalMessageHandler());
|
||||
|
||||
String tilePlinthCodec = clientChannel.findChannelHandlerNameForType(TEPlinthCodec.class);
|
||||
clientChannel.pipeline().addAfter(tilePlinthCodec, "TEPlinthHandler", new TEPlinthMessageHandler());
|
||||
|
||||
String tileSocketCodec = clientChannel.findChannelHandlerNameForType(TESocketCodec.class);
|
||||
clientChannel.pipeline().addAfter(tileSocketCodec, "TESocketHandler", new TESocketMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "ClientHandler", new TEAltarMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "TEOrientableHandler", new TEOrientableMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "TEPedestalHandler", new TEPedestalMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "TEPlinthHandler", new TEPlinthMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "TESocketHandler", new TESocketMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "TETeleposerHandler", new TETeleposerMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "TEWritingTableHandler", new TEWritingTableMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "ParticleHandler", new ParticleMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "VelocityHandler", new VelocityMessageHandler());
|
||||
}
|
||||
|
||||
|
||||
|
@ -101,6 +100,12 @@ public enum NewPacketHandler
|
|||
if (te instanceof TEAltar)
|
||||
{
|
||||
TEAltar altar = (TEAltar) te;
|
||||
|
||||
System.out.println("x: " + msg.x + ", y: " + msg.y + ", z: " + msg.z);
|
||||
for(int in : msg.items)
|
||||
{
|
||||
System.out.println("" + in);
|
||||
}
|
||||
|
||||
altar.handlePacketData(msg.items, msg.fluids, msg.capacity);
|
||||
}
|
||||
|
@ -203,8 +208,40 @@ public enum NewPacketHandler
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class ParticleMessageHandler extends SimpleChannelInboundHandler<ParticleMessage>
|
||||
{
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, ParticleMessage msg) throws Exception
|
||||
{
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
|
||||
world.spawnParticle(msg.particle, msg.xCoord, msg.yCoord, msg.zCoord, msg.xVel, msg.yVel, msg.zVel);
|
||||
}
|
||||
}
|
||||
|
||||
private static class VelocityMessageHandler extends SimpleChannelInboundHandler<VelocityMessage>
|
||||
{
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, VelocityMessage msg) throws Exception
|
||||
{
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if(player!=null)
|
||||
{
|
||||
player.motionX = msg.xVel;
|
||||
player.motionY = msg.yVel;
|
||||
player.motionZ = msg.zVel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class TEAltarMessage
|
||||
public static class BMMessage
|
||||
{
|
||||
int index;
|
||||
}
|
||||
|
||||
public static class TEAltarMessage extends BMMessage
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
|
@ -215,7 +252,7 @@ public enum NewPacketHandler
|
|||
int capacity;
|
||||
}
|
||||
|
||||
public static class TEOrientableMessage
|
||||
public static class TEOrientableMessage extends BMMessage
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
|
@ -225,7 +262,7 @@ public enum NewPacketHandler
|
|||
int output;
|
||||
}
|
||||
|
||||
public static class TEPedestalMessage
|
||||
public static class TEPedestalMessage extends BMMessage
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
|
@ -234,7 +271,7 @@ public enum NewPacketHandler
|
|||
int[] items;
|
||||
}
|
||||
|
||||
public static class TEPlinthMessage
|
||||
public static class TEPlinthMessage extends BMMessage
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
|
@ -243,7 +280,7 @@ public enum NewPacketHandler
|
|||
int[] items;
|
||||
}
|
||||
|
||||
public static class TESocketMessage
|
||||
public static class TESocketMessage extends BMMessage
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
|
@ -252,7 +289,7 @@ public enum NewPacketHandler
|
|||
int[] items;
|
||||
}
|
||||
|
||||
public static class TETeleposerMessage
|
||||
public static class TETeleposerMessage extends BMMessage
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
|
@ -261,7 +298,7 @@ public enum NewPacketHandler
|
|||
int[] items;
|
||||
}
|
||||
|
||||
public static class TEWritingTableMessage
|
||||
public static class TEWritingTableMessage extends BMMessage
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
|
@ -269,344 +306,385 @@ public enum NewPacketHandler
|
|||
|
||||
int[] items;
|
||||
}
|
||||
|
||||
public static class ParticleMessage extends BMMessage
|
||||
{
|
||||
String particle;
|
||||
|
||||
double xCoord;
|
||||
double yCoord;
|
||||
double zCoord;
|
||||
|
||||
double xVel;
|
||||
double yVel;
|
||||
double zVel;
|
||||
}
|
||||
|
||||
public static class VelocityMessage extends BMMessage
|
||||
{
|
||||
double xVel;
|
||||
double yVel;
|
||||
double zVel;
|
||||
}
|
||||
|
||||
private class TEAltarCodec extends FMLIndexedMessageToMessageCodec<TEAltarMessage>
|
||||
private class TEAltarCodec extends FMLIndexedMessageToMessageCodec<BMMessage>
|
||||
{
|
||||
public TEAltarCodec()
|
||||
{
|
||||
addDiscriminator(0, TEAltarMessage.class);
|
||||
addDiscriminator(1, TEOrientableMessage.class);
|
||||
addDiscriminator(2, TEPedestalMessage.class);
|
||||
addDiscriminator(3, TEPlinthMessage.class);
|
||||
addDiscriminator(4, TESocketMessage.class);
|
||||
addDiscriminator(5, TETeleposerMessage.class);
|
||||
addDiscriminator(6, TEWritingTableMessage.class);
|
||||
addDiscriminator(7, ParticleMessage.class);
|
||||
addDiscriminator(8, VelocityMessage.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, TEAltarMessage msg, ByteBuf target) throws Exception
|
||||
public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) throws Exception
|
||||
{
|
||||
target.writeInt(msg.x);
|
||||
target.writeInt(msg.y);
|
||||
target.writeInt(msg.z);
|
||||
target.writeInt(msg.index);
|
||||
|
||||
switch(msg.index)
|
||||
{
|
||||
case 0:
|
||||
target.writeInt(((TEAltarMessage)msg).x);
|
||||
target.writeInt(((TEAltarMessage)msg).y);
|
||||
target.writeInt(((TEAltarMessage)msg).z);
|
||||
|
||||
target.writeBoolean(msg.items != null);
|
||||
if (msg.items != null)
|
||||
{
|
||||
int[] items = msg.items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
target.writeBoolean(((TEAltarMessage)msg).items != null);
|
||||
if (((TEAltarMessage)msg).items != null)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
int[] items = ((TEAltarMessage)msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
System.out.println("" + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(msg.fluids != null)
|
||||
{
|
||||
int[] fluids = msg.fluids;
|
||||
for (int j = 0; j < fluids.length; j++)
|
||||
|
||||
target.writeBoolean(((TEAltarMessage)msg).fluids != null);
|
||||
if(((TEAltarMessage)msg).fluids != null)
|
||||
{
|
||||
int i = fluids[j];
|
||||
target.writeInt(i);
|
||||
int[] fluids = ((TEAltarMessage)msg).fluids;
|
||||
for (int j = 0; j < fluids.length; j++)
|
||||
{
|
||||
int i = fluids[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
target.writeInt(msg.capacity);
|
||||
|
||||
target.writeInt(((TEAltarMessage)msg).capacity);
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
target.writeInt(((TEOrientableMessage)msg).x);
|
||||
target.writeInt(((TEOrientableMessage)msg).y);
|
||||
target.writeInt(((TEOrientableMessage)msg).z);
|
||||
|
||||
target.writeInt(((TEOrientableMessage)msg).input);
|
||||
target.writeInt(((TEOrientableMessage)msg).output);
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
target.writeInt(((TEPedestalMessage)msg).x);
|
||||
target.writeInt(((TEPedestalMessage)msg).y);
|
||||
target.writeInt(((TEPedestalMessage)msg).z);
|
||||
|
||||
target.writeBoolean(((TEPedestalMessage)msg).items != null);
|
||||
if (((TEPedestalMessage)msg).items != null)
|
||||
{
|
||||
int[] items = ((TEPedestalMessage)msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
target.writeInt(((TEPlinthMessage)msg).x);
|
||||
target.writeInt(((TEPlinthMessage)msg).y);
|
||||
target.writeInt(((TEPlinthMessage)msg).z);
|
||||
|
||||
target.writeBoolean(((TEPlinthMessage)msg).items != null);
|
||||
if (((TEPlinthMessage)msg).items != null)
|
||||
{
|
||||
int[] items = ((TEPlinthMessage)msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
target.writeInt(((TESocketMessage)msg).x);
|
||||
target.writeInt(((TESocketMessage)msg).y);
|
||||
target.writeInt(((TESocketMessage)msg).z);
|
||||
|
||||
target.writeBoolean(((TESocketMessage)msg).items != null);
|
||||
if (((TESocketMessage)msg).items != null)
|
||||
{
|
||||
int[] items = ((TESocketMessage)msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
target.writeInt(((TETeleposerMessage)msg).x);
|
||||
target.writeInt(((TETeleposerMessage)msg).y);
|
||||
target.writeInt(((TETeleposerMessage)msg).z);
|
||||
|
||||
target.writeBoolean(((TETeleposerMessage)msg).items != null);
|
||||
if (((TETeleposerMessage)msg).items != null)
|
||||
{
|
||||
int[] items = ((TETeleposerMessage)msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
target.writeInt(((TEWritingTableMessage)msg).x);
|
||||
target.writeInt(((TEWritingTableMessage)msg).y);
|
||||
target.writeInt(((TEWritingTableMessage)msg).z);
|
||||
|
||||
target.writeBoolean(((TEWritingTableMessage)msg).items != null);
|
||||
if (((TEWritingTableMessage)msg).items != null)
|
||||
{
|
||||
int[] items = ((TEWritingTableMessage)msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
String str = ((ParticleMessage)msg).particle;
|
||||
target.writeInt(str.length());
|
||||
for(int i=0; i<str.length(); i++)
|
||||
{
|
||||
target.writeChar(str.charAt(i));
|
||||
}
|
||||
|
||||
target.writeDouble(((ParticleMessage)msg).xCoord);
|
||||
target.writeDouble(((ParticleMessage)msg).yCoord);
|
||||
target.writeDouble(((ParticleMessage)msg).zCoord);
|
||||
|
||||
target.writeDouble(((ParticleMessage)msg).xVel);
|
||||
target.writeDouble(((ParticleMessage)msg).yVel);
|
||||
target.writeDouble(((ParticleMessage)msg).zVel);
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
target.writeDouble(((VelocityMessage)msg).xVel);
|
||||
target.writeDouble(((VelocityMessage)msg).yVel);
|
||||
target.writeDouble(((VelocityMessage)msg).zVel);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, TEAltarMessage msg)
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, BMMessage msg)
|
||||
{
|
||||
msg.x = dat.readInt();
|
||||
msg.y = dat.readInt();
|
||||
msg.z = dat.readInt();
|
||||
int typDat = dat.readByte();
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
msg.items = new int[TEAltar.sizeInv*3];
|
||||
if (hasStacks)
|
||||
{
|
||||
msg.items = new int[TEAltar.sizeInv*3];
|
||||
for (int i = 0; i < msg.items.length; i++)
|
||||
int index = dat.readInt();
|
||||
|
||||
switch(index)
|
||||
{
|
||||
case 0:
|
||||
((TEAltarMessage)msg).x = dat.readInt();
|
||||
((TEAltarMessage)msg).y = dat.readInt();
|
||||
((TEAltarMessage)msg).z = dat.readInt();
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
((TEAltarMessage)msg).items = new int[TEAltar.sizeInv*3];
|
||||
if (hasStacks)
|
||||
{
|
||||
msg.items[i] = dat.readInt();
|
||||
((TEAltarMessage)msg).items = new int[TEAltar.sizeInv*3];
|
||||
for (int i = 0; i < ((TEAltarMessage)msg).items.length; i++)
|
||||
{
|
||||
((TEAltarMessage)msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
msg.fluids = new int[6];
|
||||
for (int i = 0; i < msg.fluids.length; i++)
|
||||
{
|
||||
msg.fluids[i] = dat.readInt();
|
||||
}
|
||||
|
||||
msg.capacity = dat.readInt();
|
||||
|
||||
boolean hasFluids = dat.readBoolean();
|
||||
((TEAltarMessage)msg).fluids = new int[6];
|
||||
if(hasFluids)
|
||||
for (int i = 0; i < ((TEAltarMessage)msg).fluids.length; i++)
|
||||
{
|
||||
((TEAltarMessage)msg).fluids[i] = dat.readInt();
|
||||
}
|
||||
|
||||
((TEAltarMessage)msg).capacity = dat.readInt();
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
((TEOrientableMessage)msg).x = dat.readInt();
|
||||
((TEOrientableMessage)msg).y = dat.readInt();
|
||||
((TEOrientableMessage)msg).z = dat.readInt();
|
||||
|
||||
((TEOrientableMessage)msg).input = dat.readInt();
|
||||
((TEOrientableMessage)msg).output = dat.readInt();
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
((TEPedestalMessage)msg).x = dat.readInt();
|
||||
((TEPedestalMessage)msg).y = dat.readInt();
|
||||
((TEPedestalMessage)msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks1 = dat.readBoolean();
|
||||
|
||||
((TEPedestalMessage)msg).items = new int[TEPedestal.sizeInv*3];
|
||||
if (hasStacks1)
|
||||
{
|
||||
((TEPedestalMessage)msg).items = new int[TEPedestal.sizeInv*3];
|
||||
for (int i = 0; i < ((TEPedestalMessage)msg).items.length; i++)
|
||||
{
|
||||
((TEPedestalMessage)msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
((TEPlinthMessage)msg).x = dat.readInt();
|
||||
((TEPlinthMessage)msg).y = dat.readInt();
|
||||
((TEPlinthMessage)msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks2 = dat.readBoolean();
|
||||
|
||||
((TEPlinthMessage)msg).items = new int[TEPlinth.sizeInv*3];
|
||||
if (hasStacks2)
|
||||
{
|
||||
((TEPlinthMessage)msg).items = new int[TEPlinth.sizeInv*3];
|
||||
for (int i = 0; i < ((TEPlinthMessage)msg).items.length; i++)
|
||||
{
|
||||
((TEPlinthMessage)msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
((TESocketMessage)msg).x = dat.readInt();
|
||||
((TESocketMessage)msg).y = dat.readInt();
|
||||
((TESocketMessage)msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks3 = dat.readBoolean();
|
||||
|
||||
((TESocketMessage)msg).items = new int[TESocket.sizeInv*3];
|
||||
if (hasStacks3)
|
||||
{
|
||||
((TESocketMessage)msg).items = new int[TESocket.sizeInv*3];
|
||||
for (int i = 0; i < ((TESocketMessage)msg).items.length; i++)
|
||||
{
|
||||
((TESocketMessage)msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
((TETeleposerMessage)msg).x = dat.readInt();
|
||||
((TETeleposerMessage)msg).y = dat.readInt();
|
||||
((TETeleposerMessage)msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks4 = dat.readBoolean();
|
||||
|
||||
((TETeleposerMessage)msg).items = new int[TETeleposer.sizeInv*3];
|
||||
if (hasStacks4)
|
||||
{
|
||||
((TETeleposerMessage)msg).items = new int[TETeleposer.sizeInv*3];
|
||||
for (int i = 0; i < ((TETeleposerMessage)msg).items.length; i++)
|
||||
{
|
||||
((TETeleposerMessage)msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
((TEWritingTableMessage)msg).x = dat.readInt();
|
||||
((TEWritingTableMessage)msg).y = dat.readInt();
|
||||
((TEWritingTableMessage)msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks5 = dat.readBoolean();
|
||||
|
||||
((TEWritingTableMessage)msg).items = new int[TEWritingTable.sizeInv*3];
|
||||
if (hasStacks5)
|
||||
{
|
||||
((TEWritingTableMessage)msg).items = new int[TEWritingTable.sizeInv*3];
|
||||
for (int i = 0; i < ((TEWritingTableMessage)msg).items.length; i++)
|
||||
{
|
||||
((TEWritingTableMessage)msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
int size = dat.readInt();
|
||||
String str = "";
|
||||
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
str = str + dat.readChar();
|
||||
}
|
||||
|
||||
((ParticleMessage)msg).particle = str;
|
||||
|
||||
((ParticleMessage)msg).xCoord = dat.readDouble();
|
||||
((ParticleMessage)msg).yCoord = dat.readDouble();
|
||||
((ParticleMessage)msg).zCoord = dat.readDouble();
|
||||
|
||||
((ParticleMessage)msg).xVel = dat.readDouble();
|
||||
((ParticleMessage)msg).yVel = dat.readDouble();
|
||||
((ParticleMessage)msg).zVel = dat.readDouble();
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
((VelocityMessage)msg).xVel = dat.readDouble();
|
||||
((VelocityMessage)msg).yVel = dat.readDouble();
|
||||
((VelocityMessage)msg).zVel = dat.readDouble();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class TEOrientableCodec extends FMLIndexedMessageToMessageCodec<TEOrientableMessage>
|
||||
{
|
||||
public TEOrientableCodec()
|
||||
{
|
||||
addDiscriminator(0, TEOrientableMessage.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, TEOrientableMessage msg, ByteBuf target) throws Exception
|
||||
{
|
||||
target.writeInt(msg.x);
|
||||
target.writeInt(msg.y);
|
||||
target.writeInt(msg.z);
|
||||
|
||||
target.writeInt(msg.input);
|
||||
target.writeInt(msg.output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, TEOrientableMessage msg)
|
||||
{
|
||||
msg.x = dat.readInt();
|
||||
msg.y = dat.readInt();
|
||||
msg.z = dat.readInt();
|
||||
|
||||
msg.input = dat.readInt();
|
||||
msg.output = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
private class TEPedestalCodec extends FMLIndexedMessageToMessageCodec<TEPedestalMessage>
|
||||
{
|
||||
public TEPedestalCodec()
|
||||
{
|
||||
addDiscriminator(0, TEPedestalMessage.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, TEPedestalMessage msg, ByteBuf target) throws Exception
|
||||
{
|
||||
target.writeInt(msg.x);
|
||||
target.writeInt(msg.y);
|
||||
target.writeInt(msg.z);
|
||||
|
||||
target.writeBoolean(msg.items != null);
|
||||
if (msg.items != null)
|
||||
{
|
||||
int[] items = msg.items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, TEPedestalMessage msg)
|
||||
{
|
||||
msg.x = dat.readInt();
|
||||
msg.y = dat.readInt();
|
||||
msg.z = dat.readInt();
|
||||
int typDat = dat.readByte();
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
msg.items = new int[TEPedestal.sizeInv*3];
|
||||
if (hasStacks)
|
||||
{
|
||||
msg.items = new int[TEPedestal.sizeInv*3];
|
||||
for (int i = 0; i < msg.items.length; i++)
|
||||
{
|
||||
msg.items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class TEPlinthCodec extends FMLIndexedMessageToMessageCodec<TEPlinthMessage>
|
||||
{
|
||||
public TEPlinthCodec()
|
||||
{
|
||||
addDiscriminator(0, TEPlinthMessage.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, TEPlinthMessage msg, ByteBuf target) throws Exception
|
||||
{
|
||||
target.writeInt(msg.x);
|
||||
target.writeInt(msg.y);
|
||||
target.writeInt(msg.z);
|
||||
|
||||
target.writeBoolean(msg.items != null);
|
||||
if (msg.items != null)
|
||||
{
|
||||
int[] items = msg.items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, TEPlinthMessage msg)
|
||||
{
|
||||
msg.x = dat.readInt();
|
||||
msg.y = dat.readInt();
|
||||
msg.z = dat.readInt();
|
||||
int typDat = dat.readByte();
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
msg.items = new int[TEPlinth.sizeInv*3];
|
||||
if (hasStacks)
|
||||
{
|
||||
msg.items = new int[TEPlinth.sizeInv*3];
|
||||
for (int i = 0; i < msg.items.length; i++)
|
||||
{
|
||||
msg.items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class TESocketCodec extends FMLIndexedMessageToMessageCodec<TESocketMessage>
|
||||
{
|
||||
public TESocketCodec()
|
||||
{
|
||||
addDiscriminator(0, TESocketMessage.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, TESocketMessage msg, ByteBuf target) throws Exception
|
||||
{
|
||||
target.writeInt(msg.x);
|
||||
target.writeInt(msg.y);
|
||||
target.writeInt(msg.z);
|
||||
|
||||
target.writeBoolean(msg.items != null);
|
||||
if (msg.items != null)
|
||||
{
|
||||
int[] items = msg.items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, TESocketMessage msg)
|
||||
{
|
||||
msg.x = dat.readInt();
|
||||
msg.y = dat.readInt();
|
||||
msg.z = dat.readInt();
|
||||
int typDat = dat.readByte();
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
msg.items = new int[TESocket.sizeInv*3];
|
||||
if (hasStacks)
|
||||
{
|
||||
msg.items = new int[TESocket.sizeInv*3];
|
||||
for (int i = 0; i < msg.items.length; i++)
|
||||
{
|
||||
msg.items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class TETeleposerCodec extends FMLIndexedMessageToMessageCodec<TETeleposerMessage>
|
||||
{
|
||||
public TETeleposerCodec()
|
||||
{
|
||||
addDiscriminator(0, TETeleposerMessage.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, TETeleposerMessage msg, ByteBuf target) throws Exception
|
||||
{
|
||||
target.writeInt(msg.x);
|
||||
target.writeInt(msg.y);
|
||||
target.writeInt(msg.z);
|
||||
|
||||
target.writeBoolean(msg.items != null);
|
||||
if (msg.items != null)
|
||||
{
|
||||
int[] items = msg.items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, TETeleposerMessage msg)
|
||||
{
|
||||
msg.x = dat.readInt();
|
||||
msg.y = dat.readInt();
|
||||
msg.z = dat.readInt();
|
||||
int typDat = dat.readByte();
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
msg.items = new int[TETeleposer.sizeInv*3];
|
||||
if (hasStacks)
|
||||
{
|
||||
msg.items = new int[TETeleposer.sizeInv*3];
|
||||
for (int i = 0; i < msg.items.length; i++)
|
||||
{
|
||||
msg.items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class TEWritingTableCodec extends FMLIndexedMessageToMessageCodec<TEWritingTableMessage>
|
||||
{
|
||||
public TEWritingTableCodec()
|
||||
{
|
||||
addDiscriminator(0, TEWritingTableMessage.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, TEWritingTableMessage msg, ByteBuf target) throws Exception
|
||||
{
|
||||
target.writeInt(msg.x);
|
||||
target.writeInt(msg.y);
|
||||
target.writeInt(msg.z);
|
||||
|
||||
target.writeBoolean(msg.items != null);
|
||||
if (msg.items != null)
|
||||
{
|
||||
int[] items = msg.items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, TEWritingTableMessage msg)
|
||||
{
|
||||
msg.x = dat.readInt();
|
||||
msg.y = dat.readInt();
|
||||
msg.z = dat.readInt();
|
||||
int typDat = dat.readByte();
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
msg.items = new int[TEWritingTable.sizeInv*3];
|
||||
if (hasStacks)
|
||||
{
|
||||
msg.items = new int[TEWritingTable.sizeInv*3];
|
||||
for (int i = 0; i < msg.items.length; i++)
|
||||
{
|
||||
msg.items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Packets to be obtained
|
||||
public static Packet getPacket(TEAltar tileAltar)
|
||||
{
|
||||
TEAltarMessage msg = new TEAltarMessage();
|
||||
msg.index = 0;
|
||||
msg.x = tileAltar.xCoord;
|
||||
msg.y = tileAltar.yCoord;
|
||||
msg.z = tileAltar.zCoord;
|
||||
|
@ -620,6 +698,7 @@ public enum NewPacketHandler
|
|||
public static Packet getPacket(TEOrientable tileOrientable)
|
||||
{
|
||||
TEOrientableMessage msg = new TEOrientableMessage();
|
||||
msg.index = 1;
|
||||
msg.x = tileOrientable.xCoord;
|
||||
msg.y = tileOrientable.yCoord;
|
||||
msg.z = tileOrientable.zCoord;
|
||||
|
@ -632,6 +711,7 @@ public enum NewPacketHandler
|
|||
public static Packet getPacket(TEPedestal tilePedestal)
|
||||
{
|
||||
TEPedestalMessage msg = new TEPedestalMessage();
|
||||
msg.index = 2;
|
||||
msg.x = tilePedestal.xCoord;
|
||||
msg.y = tilePedestal.yCoord;
|
||||
msg.z = tilePedestal.zCoord;
|
||||
|
@ -643,6 +723,7 @@ public enum NewPacketHandler
|
|||
public static Packet getPacket(TEPlinth tilePlinth)
|
||||
{
|
||||
TEPlinthMessage msg = new TEPlinthMessage();
|
||||
msg.index = 3;
|
||||
msg.x = tilePlinth.xCoord;
|
||||
msg.y = tilePlinth.yCoord;
|
||||
msg.z = tilePlinth.zCoord;
|
||||
|
@ -654,6 +735,7 @@ public enum NewPacketHandler
|
|||
public static Packet getPacket(TESocket tileSocket)
|
||||
{
|
||||
TESocketMessage msg = new TESocketMessage();
|
||||
msg.index = 4;
|
||||
msg.x = tileSocket.xCoord;
|
||||
msg.y = tileSocket.yCoord;
|
||||
msg.z = tileSocket.zCoord;
|
||||
|
@ -665,6 +747,7 @@ public enum NewPacketHandler
|
|||
public static Packet getPacket(TETeleposer tileTeleposer)
|
||||
{
|
||||
TETeleposerMessage msg = new TETeleposerMessage();
|
||||
msg.index = 5;
|
||||
msg.x = tileTeleposer.xCoord;
|
||||
msg.y = tileTeleposer.yCoord;
|
||||
msg.z = tileTeleposer.zCoord;
|
||||
|
@ -676,6 +759,7 @@ public enum NewPacketHandler
|
|||
public static Packet getPacket(TEWritingTable tileWritingTable)
|
||||
{
|
||||
TEWritingTableMessage msg = new TEWritingTableMessage();
|
||||
msg.index = 6;
|
||||
msg.x = tileWritingTable.xCoord;
|
||||
msg.y = tileWritingTable.yCoord;
|
||||
msg.z = tileWritingTable.zCoord;
|
||||
|
@ -683,4 +767,50 @@ public enum NewPacketHandler
|
|||
|
||||
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
|
||||
}
|
||||
|
||||
public static Packet getParticlePacket(String str, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel)
|
||||
{
|
||||
ParticleMessage msg = new ParticleMessage();
|
||||
msg.index = 7;
|
||||
msg.particle = str;
|
||||
msg.xCoord = xCoord;
|
||||
msg.yCoord = yCoord;
|
||||
msg.zCoord = zCoord;
|
||||
msg.xVel = xVel;
|
||||
msg.yVel = yVel;
|
||||
msg.zVel = zVel;
|
||||
|
||||
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
|
||||
}
|
||||
|
||||
public static Packet getVelSettingPacket(double xVel, double yVel, double zVel)
|
||||
{
|
||||
VelocityMessage msg = new VelocityMessage();
|
||||
msg.index = 8;
|
||||
msg.xVel = xVel;
|
||||
msg.yVel = yVel;
|
||||
msg.zVel = zVel;
|
||||
|
||||
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
|
||||
}
|
||||
|
||||
public void sendTo(Packet message, EntityPlayerMP player)
|
||||
{
|
||||
this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER);
|
||||
this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(player);
|
||||
this.channels.get(Side.SERVER).writeAndFlush(message);
|
||||
}
|
||||
|
||||
public void sendToAll(Packet message)
|
||||
{
|
||||
this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL);
|
||||
this.channels.get(Side.SERVER).writeAndFlush(message);
|
||||
}
|
||||
|
||||
public void sendToAllAround(Packet message, NetworkRegistry.TargetPoint point)
|
||||
{
|
||||
this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
|
||||
this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(point);
|
||||
this.channels.get(Side.SERVER).writeAndFlush(message);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,11 +24,11 @@ public class AlchemyPotionHandlerComponent
|
|||
{
|
||||
if (itemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
return comparedStack.equals(itemStack) && comparedStack.getItemDamage() == itemStack.getItemDamage();
|
||||
return comparedStack.getItem().equals(itemStack.getItem()) && comparedStack.getItemDamage() == itemStack.getItemDamage();
|
||||
}
|
||||
} else if (!(itemStack.getItem() instanceof ItemBlock))
|
||||
{
|
||||
return comparedStack.equals(itemStack) && comparedStack.getItemDamage() == itemStack.getItemDamage();
|
||||
return comparedStack.getItem().equals(itemStack.getItem()) && comparedStack.getItemDamage() == itemStack.getItemDamage();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ public class AlchemyRecipe
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((checkedItemStack.getItemDamage() == recipeItemStack.getItemDamage() || OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage()) && checkedItemStack.equals(recipeItemStack))
|
||||
if ((checkedItemStack.getItemDamage() == recipeItemStack.getItemDamage() || OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage()) && checkedItemStack.getItem()==recipeItemStack.getItem())
|
||||
{
|
||||
test = true;
|
||||
checkList[j] = true;
|
||||
|
@ -119,44 +119,6 @@ public class AlchemyRecipe
|
|||
}
|
||||
|
||||
return true;
|
||||
// if(slottedBloodOrbLevel<bloodOrbLevel)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// if(items.length<5)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// for(int i=0;i<5;i++)
|
||||
// {
|
||||
// ItemStack itemStackR = this.recipe[i];
|
||||
// ItemStack itemStackC = items[i];
|
||||
//
|
||||
// if(itemStackR==null&&itemStackC==null)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// if(itemStackR==null||itemStackC==null)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// Item itemR = itemStackR.getItem();
|
||||
// Item itemC = itemStackC.getItem();
|
||||
//
|
||||
// if(itemR.equals(itemC))
|
||||
// {
|
||||
// continue;
|
||||
// }else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return true;
|
||||
}
|
||||
|
||||
public ItemStack getResult()
|
||||
|
|
|
@ -38,6 +38,7 @@ public class ArmourForge extends Block
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("armourForge");
|
||||
//setUnlocalizedName("armourForge");
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ public class BlockAltar extends BlockContainer
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("bloodAltar");
|
||||
//setUnlocalizedName("blockAltar");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
@ -99,6 +100,9 @@ public class BlockAltar extends BlockContainer
|
|||
if (player.worldObj.isRemote)
|
||||
{
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}else
|
||||
{
|
||||
tileEntity.sendChatInfoToPlayer(player);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -111,8 +115,11 @@ public class BlockAltar extends BlockContainer
|
|||
if (player.worldObj.isRemote)
|
||||
{
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}else
|
||||
{
|
||||
tileEntity.sendChatInfoToPlayer(player);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ public class BlockBloodLightSource extends Block
|
|||
{
|
||||
super(Material.cloth);
|
||||
//setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//this.setUnlocalizedName("blockBloodLightSource");
|
||||
this.setBlockName("blockBloodLightSource");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,7 @@ public class BlockConduit extends BlockOrientable
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("blockConduit");
|
||||
this.setBlockName("blockConduit");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ public class BlockHomHeart extends BlockContainer
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("blockHomHeart");
|
||||
this.setBlockName("blockHomHeart");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,7 +22,7 @@ public class BlockMasterStone extends BlockContainer
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("blockMasterStone");
|
||||
this.setBlockName("blockMasterStone");
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class BlockPedestal extends BlockContainer
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("bloodPedestal");
|
||||
this.setBlockName("bloodPedestal");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class BlockPlinth extends BlockContainer
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("bloodPlinth");
|
||||
this.setBlockName("bloodPlinth");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BlockSocket extends BlockContainer
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("bloodSocket");
|
||||
this.setBlockName("bloodSocket");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ public class BlockSpellEffect extends BlockOrientable
|
|||
public BlockSpellEffect()
|
||||
{
|
||||
super();
|
||||
//setUnlocalizedName("blockSpellEffect");
|
||||
this.setBlockName("blockSpellEffect");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,7 +20,7 @@ public class BlockSpellEnhancement extends BlockOrientable
|
|||
public BlockSpellEnhancement()
|
||||
{
|
||||
super();
|
||||
//setUnlocalizedName("blockSpellEnhancement");
|
||||
this.setBlockName("blockSpellEnhancement");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -29,6 +29,24 @@ public class BlockSpellEnhancement extends BlockOrientable
|
|||
return new TESpellEnhancementBlock();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ public class BlockSpellModifier extends BlockOrientable
|
|||
public BlockSpellModifier()
|
||||
{
|
||||
super();
|
||||
//setUnlocalizedName("blockSpellModifier");
|
||||
this.setBlockName("blockSpellModifier");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,7 @@ public class BlockSpellParadigm extends BlockOrientable
|
|||
public BlockSpellParadigm()
|
||||
{
|
||||
super();
|
||||
//setUnlocalizedName("blockSpellParadigm");
|
||||
this.setBlockName("blockSpellParadigm");
|
||||
//setBlockBounds(minPos, minPos, minPos, maxPos, maxPos, maxPos);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public class BlockTeleposer extends BlockContainer
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("bloodTeleposer");
|
||||
this.setBlockName("bloodTeleposer");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class BlockWritingTable extends BlockContainer
|
|||
super(Material.wood);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
//setUnlocalizedName("blockWritingTable");
|
||||
this.setBlockName("blockWritingTable");
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public class BloodRune extends Block
|
|||
public BloodRune()
|
||||
{
|
||||
super(Material.iron);
|
||||
//setUnlocalizedName("bloodRune");
|
||||
this.setBlockName("bloodRune");
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
|
|
|
@ -15,7 +15,7 @@ public class BloodStoneBrick extends Block
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("bloodStoneBrick");
|
||||
this.setBlockName("bloodStoneBrick");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,7 +10,7 @@ public class EfficiencyRune extends BloodRune
|
|||
public EfficiencyRune()
|
||||
{
|
||||
super();
|
||||
//setUnlocalizedName("efficiencyRune");
|
||||
this.setBlockName("efficiencyRune");
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
|
|
|
@ -15,7 +15,7 @@ public class EmptySocket extends Block
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("emptySocket");
|
||||
this.setBlockName("emptySocket");
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ public class ImperfectRitualStone extends Block
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("imperfectRitualStone");
|
||||
this.setBlockName("imperfectRitualStone");
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ public class LargeBloodStoneBrick extends Block
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("largeBloodStoneBrick");
|
||||
this.setBlockName("largeBloodStoneBrick");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,6 +17,7 @@ public class LifeEssenceBlock extends BlockFluidClassic
|
|||
super(AlchemicalWizardry.lifeEssenceFluid, Material.water);
|
||||
AlchemicalWizardry.lifeEssenceFluid.setBlock(this);
|
||||
//setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("lifeEssenceFluidBlock");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -31,7 +32,7 @@ public class LifeEssenceBlock extends BlockFluidClassic
|
|||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceStill");
|
||||
this.getFluid().setIcons(blockIcon);
|
||||
//this.getFluid().setIcons(blockIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,7 +35,7 @@ public class RitualStone extends Block
|
|||
super(Material.iron);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
//setUnlocalizedName("ritualStone");
|
||||
this.setBlockName("ritualStone");
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ public class RuneOfSacrifice extends BloodRune
|
|||
public RuneOfSacrifice()
|
||||
{
|
||||
super();
|
||||
//setUnlocalizedName("runeOfSacrifice");
|
||||
this.setBlockName("runeOfSacrifice");
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
|
|
|
@ -10,7 +10,7 @@ public class RuneOfSelfSacrifice extends BloodRune
|
|||
public RuneOfSelfSacrifice()
|
||||
{
|
||||
super();
|
||||
//setUnlocalizedName("runeOfSelfSacrifice");
|
||||
this.setBlockName("runeOfSelfSacrifice");
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
|
|
|
@ -17,7 +17,7 @@ public class SpectralBlock extends Block
|
|||
public SpectralBlock()
|
||||
{
|
||||
super(Material.rock);
|
||||
//this.setUnlocalizedName("spectralBlock");
|
||||
this.setBlockName("spectralBlock");
|
||||
}
|
||||
|
||||
// @Override
|
||||
|
|
|
@ -10,7 +10,7 @@ public class SpeedRune extends BloodRune
|
|||
public SpeedRune()
|
||||
{
|
||||
super();
|
||||
//setUnlocalizedName("speedRune");
|
||||
this.setBlockName("speedRune");
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
|
|
|
@ -71,10 +71,10 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable
|
|||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
World world = par3EntityPlayer.worldObj;
|
||||
|
||||
if (par3EntityPlayer instanceof FakePlayer || par3EntityPlayer instanceof EntityPlayerMP)
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
// if (par3EntityPlayer instanceof FakePlayer || par3EntityPlayer instanceof EntityPlayerMP)
|
||||
// {
|
||||
// return par1ItemStack;
|
||||
// }
|
||||
|
||||
if (world != null)
|
||||
{
|
||||
|
@ -85,10 +85,10 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable
|
|||
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ);
|
||||
}
|
||||
|
||||
if (!(par3EntityPlayer.getClass().equals(EntityPlayerMP.class)))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
// if (!(par3EntityPlayer.getClass().equals(EntityPlayerMP.class)))
|
||||
// {
|
||||
// return par1ItemStack;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -382,6 +382,11 @@ public class EnergyItems extends Item implements IBindable
|
|||
world.setItemData(ownerName, data);
|
||||
}
|
||||
|
||||
if(data.currentEssence>=maximum)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
data.currentEssence = Math.min(maximum, data.currentEssence + amount);
|
||||
data.markDirty();
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public class ItemSpellEffectBlock extends ItemBlock
|
|||
break;
|
||||
|
||||
case 3:
|
||||
name = "water";
|
||||
name = "earth";
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -26,18 +26,22 @@ public class ItemSpellModifierBlock extends ItemBlock
|
|||
{
|
||||
case 0:
|
||||
{
|
||||
name = "power";
|
||||
name = "default";
|
||||
break;
|
||||
}
|
||||
|
||||
case 1:
|
||||
{
|
||||
name = "efficiency";
|
||||
name = "offensive";
|
||||
break;
|
||||
}
|
||||
|
||||
case 2:
|
||||
name = "potency";
|
||||
name = "defensive";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
name = "environmental";
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -68,7 +68,7 @@ public class DivinationSigil extends Item implements ArmourUpgrade
|
|||
//PacketDispatcher.sendPacketToServer(PacketHandler.getPacket(ownerName));
|
||||
int currentEssence = EnergyItems.getCurrentEssence(ownerName);
|
||||
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentText("Current Essence: " + 0));
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentText("Current Essence: " + EnergyItems.getCurrentEssence(ownerName)));
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelSpellEnhancementBlock modelSpellEnhancementBlock = new ModelSpellEnhancementBlock();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TESpellEnhancementBlock)
|
||||
{
|
||||
TESpellEnhancementBlock tileSpellBlock = (TESpellEnhancementBlock) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/BlockSpellEnhancementPower1.png");
|
||||
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
|
||||
String resource = tileSpellBlock.getResourceLocationForMeta(meta);
|
||||
test = new ResourceLocation(resource);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelSpellEnhancementBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection());
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class TESpellEnhancementBlockItemRenderer implements IItemRenderer
|
||||
{
|
||||
private ModelSpellEnhancementBlock modelSpellBlock = new ModelSpellEnhancementBlock();
|
||||
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
Block block = ModBlocks.blockSpellEffect;
|
||||
//Icon icon = item.getItem().getIconFromDamage(0);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage()));
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
public String getResourceLocationForMeta(int meta)
|
||||
{
|
||||
switch(meta)
|
||||
{
|
||||
case 0: return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png";
|
||||
case 1: return "alchemicalwizardry:textures/models/SpellEnhancementPower2.png";
|
||||
case 2: return "alchemicalwizardry:textures/models/SpellEnhancementPower3.png";
|
||||
}
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,334 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
|
||||
public class ModelSpellEnhancementBlock extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer core;
|
||||
ModelRenderer frame1;
|
||||
ModelRenderer frame2;
|
||||
ModelRenderer frame3;
|
||||
ModelRenderer frame4;
|
||||
ModelRenderer frame5;
|
||||
ModelRenderer frame6;
|
||||
ModelRenderer frame7;
|
||||
ModelRenderer frame8;
|
||||
ModelRenderer frame9;
|
||||
ModelRenderer frame10;
|
||||
ModelRenderer frame11;
|
||||
ModelRenderer frame12;
|
||||
ModelRenderer outputMain;
|
||||
ModelRenderer inputMain;
|
||||
ModelRenderer output1;
|
||||
ModelRenderer output2;
|
||||
ModelRenderer output3;
|
||||
ModelRenderer output4;
|
||||
ModelRenderer input1;
|
||||
ModelRenderer input2;
|
||||
ModelRenderer input3;
|
||||
ModelRenderer input4;
|
||||
ModelRenderer outputSecond;
|
||||
|
||||
public ModelSpellEnhancementBlock()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 64;
|
||||
|
||||
core = new ModelRenderer(this, 0, 0);
|
||||
core.addBox(-3F, -3F, -3F, 6, 6, 6);
|
||||
core.setRotationPoint(0F, 16F, 0F);
|
||||
core.setTextureSize(128, 64);
|
||||
core.mirror = true;
|
||||
setRotation(core, 0F, 0F, 0F);
|
||||
frame1 = new ModelRenderer(this, 0, 32);
|
||||
frame1.addBox(-7F, 5F, -7F, 14, 2, 2);
|
||||
frame1.setRotationPoint(0F, 16F, 0F);
|
||||
frame1.setTextureSize(128, 64);
|
||||
frame1.mirror = true;
|
||||
setRotation(frame1, 0F, 0F, 0F);
|
||||
frame2 = new ModelRenderer(this, 24, 19);
|
||||
frame2.addBox(5F, -5F, -7F, 2, 10, 2);
|
||||
frame2.setRotationPoint(0F, 16F, 0F);
|
||||
frame2.setTextureSize(128, 64);
|
||||
frame2.mirror = true;
|
||||
setRotation(frame2, 0F, 0F, 0F);
|
||||
frame3 = new ModelRenderer(this, 0, 19);
|
||||
frame3.addBox(-7F, -5F, -7F, 2, 10, 2);
|
||||
frame3.setRotationPoint(0F, 16F, 0F);
|
||||
frame3.setTextureSize(128, 64);
|
||||
frame3.mirror = true;
|
||||
setRotation(frame3, 0F, 0F, 0F);
|
||||
frame4 = new ModelRenderer(this, 0, 14);
|
||||
frame4.addBox(-7F, -7F, -7F, 14, 2, 2);
|
||||
frame4.setRotationPoint(0F, 16F, 0F);
|
||||
frame4.setTextureSize(128, 64);
|
||||
frame4.mirror = true;
|
||||
setRotation(frame4, 0F, 0F, 0F);
|
||||
frame5 = new ModelRenderer(this, 0, 57);
|
||||
frame5.addBox(-7F, 5F, 5F, 14, 2, 2);
|
||||
frame5.setRotationPoint(0F, 16F, 0F);
|
||||
frame5.setTextureSize(128, 64);
|
||||
frame5.mirror = true;
|
||||
setRotation(frame5, 0F, 0F, 0F);
|
||||
frame6 = new ModelRenderer(this, 0, 44);
|
||||
frame6.addBox(5F, -5F, 5F, 2, 10, 2);
|
||||
frame6.setRotationPoint(0F, 16F, 0F);
|
||||
frame6.setTextureSize(128, 64);
|
||||
frame6.mirror = true;
|
||||
setRotation(frame6, 0F, 0F, 0F);
|
||||
frame7 = new ModelRenderer(this, 24, 44);
|
||||
frame7.addBox(-7F, -5F, 5F, 2, 10, 2);
|
||||
frame7.setRotationPoint(0F, 16F, 0F);
|
||||
frame7.setTextureSize(128, 64);
|
||||
frame7.mirror = true;
|
||||
setRotation(frame7, 0F, 0F, 0F);
|
||||
frame8 = new ModelRenderer(this, 0, 39);
|
||||
frame8.addBox(-7F, -7F, 5F, 14, 2, 2);
|
||||
frame8.setRotationPoint(0F, 16F, 0F);
|
||||
frame8.setTextureSize(128, 64);
|
||||
frame8.mirror = true;
|
||||
setRotation(frame8, 0F, 0F, 0F);
|
||||
frame9 = new ModelRenderer(this, 66, 14);
|
||||
frame9.addBox(5F, 5F, -5F, 2, 2, 10);
|
||||
frame9.setRotationPoint(0F, 16F, 0F);
|
||||
frame9.setTextureSize(128, 64);
|
||||
frame9.mirror = true;
|
||||
setRotation(frame9, 0F, 0F, 0F);
|
||||
frame10 = new ModelRenderer(this, 40, 14);
|
||||
frame10.addBox(-7F, 5F, -5F, 2, 2, 10);
|
||||
frame10.setRotationPoint(0F, 16F, 0F);
|
||||
frame10.setTextureSize(128, 64);
|
||||
frame10.mirror = true;
|
||||
setRotation(frame10, 0F, 0F, 0F);
|
||||
frame11 = new ModelRenderer(this, 66, 0);
|
||||
frame11.addBox(5F, -7F, -5F, 2, 2, 10);
|
||||
frame11.setRotationPoint(0F, 16F, 0F);
|
||||
frame11.setTextureSize(128, 64);
|
||||
frame11.mirror = true;
|
||||
setRotation(frame11, 0F, 0F, 0F);
|
||||
frame12 = new ModelRenderer(this, 40, 0);
|
||||
frame12.addBox(-7F, -7F, -5F, 2, 2, 10);
|
||||
frame12.setRotationPoint(0F, 16F, 0F);
|
||||
frame12.setTextureSize(128, 64);
|
||||
frame12.mirror = true;
|
||||
setRotation(frame12, 0F, 0F, 0F);
|
||||
outputMain = new ModelRenderer(this, 78, 36);
|
||||
outputMain.addBox(6F, -2F, -2F, 2, 4, 4);
|
||||
outputMain.setRotationPoint(0F, 16F, 0F);
|
||||
outputMain.setTextureSize(128, 64);
|
||||
outputMain.mirror = true;
|
||||
setRotation(outputMain, 0F, 0F, 0F);
|
||||
inputMain = new ModelRenderer(this, 40, 36);
|
||||
inputMain.addBox(-2F, -2F, -8F, 4, 4, 5);
|
||||
inputMain.setRotationPoint(0F, 16F, 0F);
|
||||
inputMain.setTextureSize(128, 64);
|
||||
inputMain.mirror = true;
|
||||
setRotation(inputMain, 0F, 0F, 0F);
|
||||
output1 = new ModelRenderer(this, 80, 30);
|
||||
output1.addBox(5F, -5F, -5F, 3, 2, 2);
|
||||
output1.setRotationPoint(0F, 16F, 0F);
|
||||
output1.setTextureSize(128, 64);
|
||||
output1.mirror = true;
|
||||
setRotation(output1, 0F, 0F, 0F);
|
||||
output2 = new ModelRenderer(this, 80, 30);
|
||||
output2.addBox(5F, -5F, 3F, 3, 2, 2);
|
||||
output2.setRotationPoint(0F, 16F, 0F);
|
||||
output2.setTextureSize(128, 64);
|
||||
output2.mirror = true;
|
||||
setRotation(output2, 0F, 0F, 0F);
|
||||
output3 = new ModelRenderer(this, 80, 30);
|
||||
output3.addBox(5F, 3F, -5F, 3, 2, 2);
|
||||
output3.setRotationPoint(0F, 16F, 0F);
|
||||
output3.setTextureSize(128, 64);
|
||||
output3.mirror = true;
|
||||
setRotation(output3, 0F, 0F, 0F);
|
||||
output4 = new ModelRenderer(this, 80, 30);
|
||||
output4.addBox(5F, 3F, 3F, 3, 2, 2);
|
||||
output4.setRotationPoint(0F, 16F, 0F);
|
||||
output4.setTextureSize(128, 64);
|
||||
output4.mirror = true;
|
||||
setRotation(output4, 0F, 0F, 0F);
|
||||
input1 = new ModelRenderer(this, 40, 27);
|
||||
input1.addBox(3F, -5F, -8F, 2, 2, 5);
|
||||
input1.setRotationPoint(0F, 16F, 0F);
|
||||
input1.setTextureSize(128, 64);
|
||||
input1.mirror = true;
|
||||
setRotation(input1, 0F, 0F, 0F);
|
||||
input2 = new ModelRenderer(this, 40, 27);
|
||||
input2.addBox(-5F, -5F, -8F, 2, 2, 5);
|
||||
input2.setRotationPoint(0F, 16F, 0F);
|
||||
input2.setTextureSize(128, 64);
|
||||
input2.mirror = true;
|
||||
setRotation(input2, 0F, 0F, 0F);
|
||||
input3 = new ModelRenderer(this, 40, 27);
|
||||
input3.addBox(3F, 3F, -8F, 2, 2, 5);
|
||||
input3.setRotationPoint(0F, 16F, 0F);
|
||||
input3.setTextureSize(128, 64);
|
||||
input3.mirror = true;
|
||||
setRotation(input3, 0F, 0F, 0F);
|
||||
input4 = new ModelRenderer(this, 40, 27);
|
||||
input4.addBox(-5F, 3F, -8F, 2, 2, 5);
|
||||
input4.setRotationPoint(0F, 16F, 0F);
|
||||
input4.setTextureSize(128, 64);
|
||||
input4.mirror = true;
|
||||
setRotation(input4, 0F, 0F, 0F);
|
||||
outputSecond = new ModelRenderer(this, 78, 47);
|
||||
outputSecond.addBox(4F, -3F, -3F, 1, 6, 6);
|
||||
outputSecond.setRotationPoint(0F, 16F, 0F);
|
||||
outputSecond.setTextureSize(128, 64);
|
||||
outputSecond.mirror = true;
|
||||
setRotation(outputSecond, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
float xInputRot = 0.0f;
|
||||
float yInputRot = 0.0f;
|
||||
float zInputRot = 0.0f;
|
||||
float xOutputRot = 0.0f;
|
||||
float yOutputRot = 0.0f;
|
||||
float zOutputRot = 0.0f;
|
||||
|
||||
switch (input)
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case EAST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case SOUTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (1.0f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (-0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xInputRot = (float) (-0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xInputRot = (float) (0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (output)
|
||||
{
|
||||
case NORTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case EAST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (1.0f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case SOUTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (-0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (-0.5f * Math.PI);
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (0.5f * Math.PI);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this.setRotation(inputMain, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(input1, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(input2, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(input3, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(input4, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(outputSecond, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
|
||||
|
||||
core.render(f5);
|
||||
frame1.render(f5);
|
||||
frame2.render(f5);
|
||||
frame3.render(f5);
|
||||
frame4.render(f5);
|
||||
frame5.render(f5);
|
||||
frame6.render(f5);
|
||||
frame7.render(f5);
|
||||
frame8.render(f5);
|
||||
frame9.render(f5);
|
||||
frame10.render(f5);
|
||||
frame11.render(f5);
|
||||
frame12.render(f5);
|
||||
outputMain.render(f5);
|
||||
inputMain.render(f5);
|
||||
output1.render(f5);
|
||||
output2.render(f5);
|
||||
output3.render(f5);
|
||||
output4.render(f5);
|
||||
input1.render(f5);
|
||||
input2.render(f5);
|
||||
input3.render(f5);
|
||||
input4.render(f5);
|
||||
outputSecond.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
}
|
|
@ -80,7 +80,7 @@ public class RitualEffectCrushing extends RitualEffect
|
|||
Block block = world.getBlock(x + i, y + j, z + k);
|
||||
int meta = world.getBlockMetadata(x + i, y + j, z + k);
|
||||
|
||||
if (block != null)
|
||||
if (block != null && !world.isAirBlock(x + i, y + j, z + k))
|
||||
{
|
||||
if ((block.equals(ModBlocks.ritualStone) || block.equals(ModBlocks.blockMasterStone)))
|
||||
{
|
||||
|
|
|
@ -3,9 +3,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -121,7 +123,10 @@ public class SpellHelper
|
|||
|
||||
public static void sendParticleToPlayer(EntityPlayer player, String str, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel)
|
||||
{
|
||||
|
||||
if(player instanceof EntityPlayerMP)
|
||||
{
|
||||
NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getParticlePacket(str, xCoord, yCoord, zCoord, xVel, yVel, zVel),(EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendIndexedParticleToPlayer(EntityPlayer player, int index, double xCoord, double yCoord, double zCoord)
|
||||
|
@ -130,10 +135,13 @@ public class SpellHelper
|
|||
{
|
||||
case 1:
|
||||
SpellHelper.sendParticleToPlayer(player, "mobSpell", xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.5117D, 0.0117D, 0.0117D);
|
||||
break;
|
||||
case 2:
|
||||
SpellHelper.sendParticleToPlayer(player, "reddust", xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.82D, 0.941D, 0.91D);
|
||||
break;
|
||||
case 3:
|
||||
SpellHelper.sendParticleToPlayer(player, "mobSpell", xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 1.0D, 0.371D, 0.371D);
|
||||
break;
|
||||
case 4:
|
||||
float f = (float) 1.0F;
|
||||
float f1 = f * 0.6F + 0.4F;
|
||||
|
@ -144,6 +152,7 @@ public class SpellHelper
|
|||
{
|
||||
SpellHelper.sendParticleToPlayer(player,"reddust", xCoord + Math.random() - Math.random(), yCoord + Math.random() - Math.random(), zCoord + Math.random() - Math.random(), f1, f2, f3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,6 +188,9 @@ public class SpellHelper
|
|||
|
||||
public static void setPlayerSpeedFromServer(EntityPlayer player, double motionX, double motionY, double motionZ)
|
||||
{
|
||||
|
||||
if(player instanceof EntityPlayerMP)
|
||||
{
|
||||
NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getVelSettingPacket(motionX, motionY, motionZ), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
@ -32,6 +34,7 @@ import WayofTime.alchemicalWizardry.common.altarRecipeRegistry.AltarRecipeRegist
|
|||
import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.AltarUpgradeComponent;
|
||||
import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFluidHandler
|
||||
|
@ -682,10 +685,11 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui
|
|||
@Override
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
return NewPacketHandler.getPacket(this);
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
this.writeToNBT(nbttagcompound);
|
||||
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 2, nbttagcompound);
|
||||
}
|
||||
|
||||
|
||||
public void handlePacketData(int[] intData, int[] fluidData, int capacity)
|
||||
{
|
||||
if (intData == null)
|
||||
|
@ -1021,4 +1025,11 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui
|
|||
|
||||
return sortList;
|
||||
}
|
||||
|
||||
public void sendChatInfoToPlayer(EntityPlayer player)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText("Altar's Current Essence: " + this.fluid.amount+ "LP"));
|
||||
player.addChatMessage(new ChatComponentText("Altar's Current Tier: " + UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord)));
|
||||
player.addChatMessage(new ChatComponentText("Capacity: " + this.getCapacity() + "LP"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,12 +24,6 @@ public class TEConduit extends TESpellBlock
|
|||
public void updateEntity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
return super.getDescriptionPacket();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TEHomHeartRenderer extends TileEntitySpecialRenderer
|
||||
{
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity;
|
|||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
|
||||
|
@ -88,8 +89,9 @@ public class TEOrientable extends TileEntity implements IOrientable
|
|||
@Override
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
return NewPacketHandler.getPacket(this);
|
||||
return NewPacketHandler.getPacket(this);
|
||||
}
|
||||
|
||||
|
||||
public boolean isSideRendered(ForgeDirection side)
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
|
||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
|
|
@ -7,6 +7,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
|
||||
|
|
|
@ -99,4 +99,17 @@ public class TESpellEnhancementBlock extends TESpellBlock
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getResourceLocationForMeta(int meta)
|
||||
{
|
||||
switch(meta)
|
||||
{
|
||||
case 0: return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png";
|
||||
case 1: return "alchemicalwizardry:textures/models/SpellEnhancementPower2.png";
|
||||
case 2: return "alchemicalwizardry:textures/models/SpellEnhancementPower3.png";
|
||||
|
||||
}
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -309,8 +310,8 @@ public class TETeleposer extends TileEntity implements IInventory
|
|||
|
||||
@Override
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
return NewPacketHandler.getPacket(this);
|
||||
{
|
||||
return NewPacketHandler.getPacket(this);
|
||||
}
|
||||
|
||||
public void handlePacketData(int[] intData)
|
||||
|
|
132
1.7.2/resources/assets/alchemicalwizardry/lang/en_US.lang
Normal file
132
1.7.2/resources/assets/alchemicalwizardry/lang/en_US.lang
Normal file
|
@ -0,0 +1,132 @@
|
|||
#Block Localization
|
||||
tile.bloodAltar.name=Blood Altar
|
||||
tile.bloodRune.blank.name=Blood Rune
|
||||
tile.bloodRune.fill.name=Rune of Augmented Capacity
|
||||
tile.bloodRune.empty.name=Rune of Dislocation
|
||||
tile.bloodRune.test.name=Rune of the Orb
|
||||
tile.speedRune.name=Speed Rune
|
||||
tile.efficiencyRune.name=Efficiency Rune
|
||||
tile.runeOfSacrifice.name=Rune of Sacrifice
|
||||
tile.runeOfSelfSacrifice.name=Rune of Self-Sacrifice
|
||||
tile.ritualStone.name=Ritual Stone
|
||||
tile.blockMasterStone.name=Master Ritual Stone
|
||||
tile.bloodSocket.name=Filled Socket
|
||||
tile.imperfectRitualStone.name=Imperfect Ritual Stone
|
||||
tile.armourForge.name=Soul Armour Forge
|
||||
tile.emptySocket.name=Empty Socket
|
||||
tile.bloodStoneBrick.name=Bloodstone Brick
|
||||
tile.largeBloodStoneBrick.name=Large Bloodstone Brick
|
||||
tile.blockWritingTable.name=Alchemic Chemistry Set
|
||||
tile.blockHomHeart.name=Spell Table
|
||||
tile.bloodPedestal.name=Arcane Pedestal
|
||||
tile.bloodPlinth.name=Arcane Plinth
|
||||
tile.bloodTeleposer.name=Teleposer
|
||||
tile.blockConduit.name=Spell Conduit
|
||||
tile.blockSpellParadigm.projectile.name=Particle Generator
|
||||
tile.blockSpellParadigm.self.name=Self Augmentator
|
||||
tile.blockSpellParadigm.melee.name=Melee Aggregator
|
||||
tile.blockSpellEnhancement.power1.name=Unstable Spell Empowerer
|
||||
tile.blockSpellEnhancement.power2.name=Standard Spell Empowerer
|
||||
tile.blockSpellEnhancement.power3.name=Reinforced Spell Empowerer
|
||||
tile.blockSpellEnhancement.power4.name=Imbued Spell Empowerer
|
||||
tile.blockSpellEnhancement.power5.name=Demonic Spell Empowerer
|
||||
tile.blockSpellEnhancement.cost1.name=Unstable Spell Dampener
|
||||
tile.blockSpellEnhancement.cost2.name=Standard Spell Dampener
|
||||
tile.blockSpellEnhancement.cost3.name=Reinforced Spell Dampener
|
||||
tile.blockSpellEnhancement.cost4.name=Imbued Spell Dampener
|
||||
tile.blockSpellEnhancement.cost5.name=Demonic Spell Dampener
|
||||
tile.blockSpellEnhancement.potency1.name=Unstable Spell Augmentor
|
||||
tile.blockSpellEnhancement.potency2.name=Standard Spell Augmentor
|
||||
tile.blockSpellEnhancement.potency3.name=Reinforced Spell Augmentor
|
||||
tile.blockSpellEnhancement.potency4.name=Imbued Spell Augmentor
|
||||
tile.blockSpellEnhancement.potency5.name=Demonic Spell Augmentor
|
||||
tile.blockSpellModifier.default.name=Default Spell Modifier
|
||||
tile.blockSpellModifier.offensive.name=Offensive Spell Modifier
|
||||
tile.blockSpellModifier.defensive.name=Defensive Spell Modifier
|
||||
tile.blockSpellModifier.environmental.name=Environmental Spell Modifier
|
||||
tile.blockSpellEffect.fire.name=Crucible of Fire
|
||||
tile.blockSpellEffect.ice.name=Ice Maker
|
||||
tile.blockSpellEffect.wind.name=Wind Generator
|
||||
tile.blockSpellEffect.earth.name=Earth Former
|
||||
|
||||
#Item Localization
|
||||
item.weakBloodOrb.name=Weak Blood Orb
|
||||
item.apprenticeBloodOrb.name=Apprentice Blood Orb
|
||||
item.magicianBloodOrb.name=Magician's Blood Orb
|
||||
item.masterBloodOrb.name=Master Blood Orb
|
||||
item.archmageBloodOrb.name=Archamge's Blood Orb
|
||||
item.energyBlast.name=Energy Blaster
|
||||
item.energySword.name=Bound Blade
|
||||
item.lavaCrystal.name=Lava Crystal
|
||||
item.waterSigil.name=Water Sigil
|
||||
item.lavaSigil.name=Lava Sigil
|
||||
item.voidSigil.name=Void Sigil
|
||||
item.blankSlate.name=Blank Slate
|
||||
item.reinforcedSlate.name=Reinforced Slate
|
||||
item.sacrificialDagger.name=Sacrificial Knife
|
||||
item.daggerOfSacrifice.name=Dagger of Sacrifice
|
||||
item.airSigil.name=Air Sigil
|
||||
item.sigilOfTheFastMiner.name=Sigil of the Fast Miner
|
||||
item.sigilOfElementalAffinity.name=Sigil of Elemental Affinity
|
||||
item.sigilOfHaste.name=Sigil of Haste
|
||||
item.sigilOfHolding.name=Sigil of Holding
|
||||
item.divinationSigil.name=Divination Sigil
|
||||
item.waterScribeTool.name=Elemental Inscription Tool: Water
|
||||
item.fireScribeTool.name=Elemental Inscription Tool: Fire
|
||||
item.earthScribeTool.name=Elemental Inscription Tool: Earth
|
||||
item.airScribeTool.name=Elemental Inscription Tool: Air
|
||||
item.duskScribeTool.name=Elemental Inscription Tool: Dusk
|
||||
item.activationCrystalWeak.name=Weak Activation Crystal
|
||||
item.activationCrystalAwakened.name=Awakened Activation Crystal
|
||||
item.boundPickaxe.name=Bound Pickaxe
|
||||
item.boundAxe.name=Bound Axe
|
||||
item.boundShovel.name=Bound Shovel
|
||||
item.boundHelmet.name=Bound Helmet
|
||||
item.boundPlate.name=Bound Plate
|
||||
item.boundLeggings.name=Bound Leggings
|
||||
item.boundBoots.name=Bound Boots
|
||||
item.weakBloodShard.name=Weak Blood Shard
|
||||
item.growthSigil.name=Sigil of the Green Grove
|
||||
item.blankSpell.name=Unbound Crystal
|
||||
item.alchemyFlask.name=Potion Flask
|
||||
item.standardBindingAgent.name=Standard Binding Agent
|
||||
item.mundanePowerCatalyst.name=Mundane Power Catalyst
|
||||
item.averagePowerCatalyst.name=Average Power Catalyst
|
||||
item.greaterPowerCatalyst.name=Greater Power Catalyst
|
||||
item.mundaneLengtheningCatalyst.name=Mundane Lengthening Catalyst
|
||||
item.averageLengtheningCatalyst.name=Average Lengthening Catalyst
|
||||
item.greaterLengtheningCatalyst.name=Greater Lengthening Catalyst
|
||||
item.incendium.name=Incendium
|
||||
item.magicales.name=Magicales
|
||||
item.sanctus.name=Sanctus
|
||||
item.aether.name=Aether
|
||||
item.simpleCatalyst.name=Simple Catalyst
|
||||
item.crepitous.name=Crepitous
|
||||
item.crystallos.name=Crystallos
|
||||
item.terrae.name=Terrae
|
||||
item.aquasalus.name=Aquasalus
|
||||
item.tennebrae.name=Tennebrae
|
||||
item.demonBloodShard.name=Demon Blood Shard
|
||||
item.sigilOfWind.name=Sigil of the Whirlwind
|
||||
item.telepositionFocus.name=Teleposition Focus
|
||||
item.enhancedTelepositionFocus.name=Enhanced Teleposition Focus
|
||||
item.reinforcedTelepositionFocus.name=Reinforced Teleposition Focus
|
||||
item.demonicTelepositionFocus.name=Demonic Teleposition Focus
|
||||
item.imbuedSlate.name=Imbued Slate
|
||||
item.demonicSlate.name=Demonic Slate
|
||||
item.sigilOfTheBridge.name=Sigil of the Phantom Bridge
|
||||
item.armourInhibitor.name=Armour Inhibitor
|
||||
item.cheatyItem.name=Orb of Testing
|
||||
item.weakFillingAgent.name=Weak Filling Agent
|
||||
item.standardFillingAgent.name=Standard Filling Agent
|
||||
item.enhancedFillingAgent.name=Enhanced Filling Agent
|
||||
item.weakBindingAgent.name=Weak Binding Agent
|
||||
item.ritualDiviner.name=Ritual Diviner
|
||||
item.sigilOfMagnetism.name=Sigil of Magnetism
|
||||
item.itemDiabloKey.name=Key of Binding
|
||||
item.energyBazooka.name=Energy Bazooka
|
||||
item.bloodLightSigil.name=Sigil of the Blood Lamp
|
||||
item.itemComplexSpellCrystal.name=[WIP] Complex Spell Crystal
|
||||
|
||||
#Creative Tab
|
||||
itemGroup.tabBloodMagic=Blood Magic
|
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
Loading…
Reference in a new issue