mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
replaced all global packet broadcasts with localized ones
This commit is contained in:
parent
9a7fe4dd39
commit
a08c59bc09
@ -53,6 +53,7 @@ potion.hbm_bang=! ! !
|
||||
potion.hbm_radx=Rad-X
|
||||
potion.hbm_lead=Bleivergiftung
|
||||
potion.hbm_radaway=Radaway
|
||||
potion.hbm_telekinesis=! ! !
|
||||
|
||||
hbmfluid.none=Nichts
|
||||
hbmfluid.water=Wasser
|
||||
|
||||
@ -53,6 +53,7 @@ potion.hbm_bang=! ! !
|
||||
potion.hbm_radx=Rad-X
|
||||
potion.hbm_lead=Lead Poisoning
|
||||
potion.hbm_radaway=Radaway
|
||||
potion.hbm_telekinesis=! ! !
|
||||
|
||||
hbmfluid.none=None
|
||||
hbmfluid.water=Water
|
||||
@ -169,7 +170,7 @@ death.attack.tauBlast=%1$s charged the XVL1456 for too long and was blown into p
|
||||
death.attack.chopperBullet=%1$s was rekt by %2$s.
|
||||
death.attack.cmb=%1$s was fizzeled by %2$s.
|
||||
death.attack.subAtomic=%1$s's atoms have been destroyed by %2$s.
|
||||
death.attack.subAtomic2=%1$s was QPU-misaligned because %2$s tampered with his de facto speed.
|
||||
death.attack.subAtomic2=%1$s was QPU-misaligned because %2$s tampered with their de facto speed.
|
||||
death.attack.subAtomic3=%1$s's divergence dropped below 1 percent because of %2$s.
|
||||
death.attack.subAtomic4=%1$s was divided by zero by %2$s.
|
||||
death.attack.subAtomic5=%1$s was nullified by %2$s.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.3 KiB |
@ -13,10 +13,13 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@ -163,5 +166,60 @@ public class LaunchTable extends BlockContainer implements IMultiblock, IBomb {
|
||||
if(entity.canLaunch())
|
||||
entity.launch();
|
||||
}
|
||||
|
||||
public static boolean keepInventory = false;
|
||||
private final static Random field_149933_a = new Random();
|
||||
|
||||
@Override
|
||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
|
||||
{
|
||||
if (!keepInventory)
|
||||
{
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
|
||||
if (tileentityfurnace != null)
|
||||
{
|
||||
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
|
||||
{
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
|
||||
if (itemstack != null)
|
||||
{
|
||||
float f = field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while (itemstack.stackSize > 0)
|
||||
{
|
||||
int j1 = field_149933_a.nextInt(21) + 10;
|
||||
|
||||
if (j1 > itemstack.stackSize)
|
||||
{
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if (itemstack.hasTagCompound())
|
||||
{
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float)field_149933_a.nextGaussian() * f3;
|
||||
entityitem.motionY = (float)field_149933_a.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float)field_149933_a.nextGaussian() * f3;
|
||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.LoopedEntitySoundPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -94,7 +95,7 @@ public class EntityBomber extends Entity implements IChunkLoader {
|
||||
this.dataWatcher.updateObject(17, health);
|
||||
|
||||
if(health > 0)
|
||||
PacketDispatcher.wrapper.sendToAll(new LoopedEntitySoundPacket(this.getEntityId()));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new LoopedEntitySoundPacket(this.getEntityId()), new TargetPoint(worldObj.provider.dimensionId, posX, posY, posZ, 250));
|
||||
} else {
|
||||
health = this.dataWatcher.getWatchableObjectInt(17);
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.ParticleBurstPacket;
|
||||
|
||||
import cofh.api.energy.IEnergyProvider;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -119,7 +120,7 @@ public class EntityEMP extends Entity {
|
||||
|
||||
if(flag && rand.nextInt(20) == 0) {
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new ParticleBurstPacket(x, y, z, Block.getIdFromBlock(Blocks.stained_glass), 3));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new ParticleBurstPacket(x, y, z, Block.getIdFromBlock(Blocks.stained_glass), 3), new TargetPoint(worldObj.provider.dimensionId, posX, posY, posZ, 50));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ public class EntityBobmazon extends Entity {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:entity.oldExplosion", 10.0F, 0.5F + this.rand.nextFloat() * 0.1F);
|
||||
|
||||
if(payload != null)
|
||||
worldObj.spawnEntityInWorld(new EntityItem(worldObj, posX, posY, posZ, payload));
|
||||
worldObj.spawnEntityInWorld(new EntityItem(worldObj, posX, posY + 2, posZ, payload));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
|
||||
import net.minecraft.entity.ai.EntityAIPanic;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -27,7 +28,7 @@ public class EntityCyberCrab extends EntityMob implements IRangedAttackMob {
|
||||
|
||||
private static final IEntitySelector selector = new IEntitySelector() {
|
||||
public boolean isEntityApplicable(Entity p_82704_1_) {
|
||||
return !(p_82704_1_ instanceof EntityCyberCrab);
|
||||
return !(p_82704_1_ instanceof EntityCyberCrab || p_82704_1_ instanceof EntityCreeper);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -198,6 +198,9 @@ public class BobmazonOfferFactory {
|
||||
special.add(new Offer(new ItemStack(ModItems.loot_misc, 1), Requirement.HIDDEN, 2));
|
||||
special.add(new Offer(new ItemStack(ModBlocks.crate_can, 1), Requirement.HIDDEN, 1));
|
||||
special.add(new Offer(new ItemStack(ModBlocks.crate_ammo, 1), Requirement.HIDDEN, 15));
|
||||
special.add(new Offer(new ItemStack(ModItems.book_of_, 1), Requirement.HIDDEN, 100));
|
||||
special.add(new Offer(new ItemStack(ModItems.mysteryshovel, 1), Requirement.HIDDEN, 100));
|
||||
special.add(new Offer(new ItemStack(ModBlocks.ntm_dirt, 1), Requirement.HIDDEN, 2240));
|
||||
}
|
||||
|
||||
public static List<Offer> getOffers(ItemStack stack) {
|
||||
|
||||
@ -51,6 +51,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
config.name = "IF-18 Horseshoe";
|
||||
config.manufacturer = "Ironshod Firearms";
|
||||
config.comment.add("Fallout New Vegas wasn't THAT good.");
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.M44_NORMAL);
|
||||
|
||||
@ -3416,7 +3416,7 @@ public class ModItems {
|
||||
glitch = new ItemGlitch().setUnlocalizedName("glitch").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":glitch_" + MainRegistry.polaroidID);
|
||||
letter = new ItemStarterKit().setUnlocalizedName("letter").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":letter");
|
||||
book_secret = new ItemCustomLore().setUnlocalizedName("book_secret").setCreativeTab(MainRegistry.polaroidID == 11 ? MainRegistry.consumableTab : null).setTextureName(RefStrings.MODID + ":book_secret");
|
||||
book_of_ = new ItemCustomLore().setUnlocalizedName("book_of_").setCreativeTab(null).setTextureName(RefStrings.MODID + ":book_of_");
|
||||
book_of_ = new ItemBook().setUnlocalizedName("book_of_").setCreativeTab(null).setTextureName(RefStrings.MODID + ":book_of_");
|
||||
burnt_bark = new ItemCustomLore().setUnlocalizedName("burnt_bark").setCreativeTab(null).setTextureName(RefStrings.MODID + ":burnt_bark");
|
||||
|
||||
smoke1 = new Item().setUnlocalizedName("smoke1").setTextureName(RefStrings.MODID + ":smoke1");
|
||||
|
||||
59
com/hbm/items/special/ItemBook.java
Normal file
59
com/hbm/items/special/ItemBook.java
Normal file
@ -0,0 +1,59 @@
|
||||
package com.hbm.items.special;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemBook extends Item {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if(this == ModItems.book_of_)
|
||||
{
|
||||
list.add("Edition 4, gold lined pages");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if(world.isRemote)
|
||||
return stack;
|
||||
|
||||
if(!player.isSneaking()) {
|
||||
List list = world.getEntitiesWithinAABBExcludingEntity(player, AxisAlignedBB.getBoundingBox(player.posX - 10, player.posY - 2, player.posZ - 10, player.posX + 10, player.posY + 2, player.posZ + 10));
|
||||
|
||||
for(Object o : list) {
|
||||
|
||||
if(o instanceof EntityLivingBase) {
|
||||
EntityLivingBase entity = (EntityLivingBase)o;
|
||||
|
||||
entity.addPotionEffect(new PotionEffect(HbmPotion.telekinesis.id, 20, 0));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(player.inventory.hasItemStack(new ItemStack(ModItems.ingot_u238m2, 1, 1)) &&
|
||||
player.inventory.hasItemStack(new ItemStack(ModItems.ingot_u238m2, 1, 2)) &&
|
||||
player.inventory.hasItemStack(new ItemStack(ModItems.ingot_u238m2, 1, 3))) {
|
||||
player.inventory.clearInventory(ModItems.ingot_u238m2, 1);
|
||||
player.inventory.clearInventory(ModItems.ingot_u238m2, 2);
|
||||
player.inventory.clearInventory(ModItems.ingot_u238m2, 3);
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_u238m2));
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
}
|
||||
@ -681,11 +681,6 @@ public class ItemCustomLore extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.book_of_)
|
||||
{
|
||||
list.add("Edition 4, gold lined pages");
|
||||
}
|
||||
|
||||
if(this == ModItems.missile_skin_camo)
|
||||
{
|
||||
list.add("I can't find my missile anymore!");
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
package com.hbm.items.special;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@ -28,6 +31,12 @@ public class ItemUnstable extends Item {
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add("Decay: " + (getTimer(stack) * 100 / timer) + "%");
|
||||
}
|
||||
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean b) {
|
||||
|
||||
if(stack.getItemDamage() != 0)
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.saveddata.SatelliteSavedData;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -25,14 +26,15 @@ public class ItemSatInterface extends ItemSatChip {
|
||||
return stack;
|
||||
}
|
||||
|
||||
//TODO: fix this shit
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean b) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
if(!world.isRemote && entity instanceof EntityPlayerMP) {
|
||||
SatelliteSavedData data = (SatelliteSavedData)entity.worldObj.perWorldStorage.loadData(SatelliteSavedData.class, "satellites");
|
||||
|
||||
if(data != null) {
|
||||
for(int j = 0; j < data.satellites.size(); j++) {
|
||||
PacketDispatcher.wrapper.sendToAll(new SatPanelPacket(data.satellites.get(j)));
|
||||
PacketDispatcher.wrapper.sendTo(new SatPanelPacket(data.satellites.get(j)), (EntityPlayerMP) entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (3461)";
|
||||
public static final String VERSION = "1.0.27 BETA (3479)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -325,6 +325,7 @@ public class MainRegistry
|
||||
public static int radxID = 66;
|
||||
public static int leadID = 67;
|
||||
public static int radawayID = 68;
|
||||
public static int telekinesisID = 69;
|
||||
|
||||
public static int x;
|
||||
public static int y;
|
||||
@ -1773,6 +1774,7 @@ public class MainRegistry
|
||||
radxID = createConfigInt(config, CATEGORY_POTION, "8.04_radxPotionID", "What potion ID the Rad-X effect will have", 66);
|
||||
leadID = createConfigInt(config, CATEGORY_POTION, "8.05_leadPotionID", "What potion ID the lead poisoning effect will have", 67);
|
||||
radawayID = createConfigInt(config, CATEGORY_POTION, "8.06_radawayPotionID", "What potion ID the radaway effect will have", 68);
|
||||
telekinesisID = createConfigInt(config, CATEGORY_POTION, "8.07_telekinesisPotionID", "What potion ID the telekinesis effect will have", 69);
|
||||
|
||||
final String CATEGORY_MACHINE = "09_machines";
|
||||
templateBlacklist = Arrays.asList(createConfigStringList(config, CATEGORY_MACHINE, "9.00_templateBlacklist", "Which machine templates should be prohibited from being created (args: enum names)"));
|
||||
@ -1808,6 +1810,7 @@ public class MainRegistry
|
||||
vaultfreq = setDef(vaultfreq, 1000);
|
||||
meteorStrikeChance = setDef(meteorStrikeChance, 1000);
|
||||
meteorShowerChance = setDef(meteorShowerChance, 1000);
|
||||
meteorStructure = setDef(meteorStructure, 15000);
|
||||
fogCh = setDef(fogCh, 20);
|
||||
}
|
||||
|
||||
|
||||
@ -223,6 +223,9 @@ public class ModEventHandler
|
||||
Chunk chunk = entity.worldObj.getChunkFromBlockCoords((int)entity.posX, (int)entity.posZ);
|
||||
float rad = data.getRadNumFromCoord(chunk.xPosition, chunk.zPosition);
|
||||
|
||||
if(event.world.provider.isHellWorld && MainRegistry.hellRad > 0 && rad < MainRegistry.hellRad)
|
||||
rad = MainRegistry.hellRad;
|
||||
|
||||
if(rad > 0) {
|
||||
//eData.increaseRad(entity, rad / 2);
|
||||
|
||||
|
||||
@ -28,6 +28,7 @@ public class HbmPotion extends Potion {
|
||||
public static HbmPotion radx;
|
||||
public static HbmPotion lead;
|
||||
public static HbmPotion radaway;
|
||||
public static HbmPotion telekinesis;
|
||||
|
||||
public HbmPotion(int id, boolean isBad, int color) {
|
||||
super(id, isBad, color);
|
||||
@ -41,6 +42,7 @@ public class HbmPotion extends Potion {
|
||||
radx = registerPotion(MainRegistry.radxID, false, 0xBB4B00, "potion.hbm_radx", 5, 0);
|
||||
lead = registerPotion(MainRegistry.leadID, true, 0x767682, "potion.hbm_lead", 6, 0);
|
||||
radaway = registerPotion(MainRegistry.radawayID, false, 0xBB4B00, "potion.hbm_radaway", 7, 0);
|
||||
telekinesis = registerPotion(MainRegistry.telekinesisID, true, 0x00F3FF, "potion.hbm_telekinesis", 0, 1);
|
||||
}
|
||||
|
||||
public static HbmPotion registerPotion(int id, boolean isBad, int color, String name, int x, int y) {
|
||||
@ -129,6 +131,17 @@ public class HbmPotion extends Potion {
|
||||
|
||||
entity.attackEntityFrom(ModDamageSource.lead, (level + 1));
|
||||
}
|
||||
if(this == telekinesis) {
|
||||
|
||||
int remaining = entity.getActivePotionEffect(this).getDuration();
|
||||
|
||||
if(remaining > 1) {
|
||||
entity.motionY = 0.5;
|
||||
} else {
|
||||
entity.motionY = -2;
|
||||
entity.fallDistance = 50;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isReady(int par1, int par2) {
|
||||
@ -137,7 +150,7 @@ public class HbmPotion extends Potion {
|
||||
|
||||
return par1 % 2 == 0;
|
||||
}
|
||||
if(this == radiation || this == radaway) {
|
||||
if(this == radiation || this == radaway || this == telekinesis) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEMissileMultipartPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -177,15 +178,15 @@ public class TileEntityCompactLauncher extends TileEntity implements ISidedInven
|
||||
solid += 250;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, solid, 0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, solid, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
|
||||
MissileStruct multipart = getStruct(slots[0]);
|
||||
|
||||
if(multipart != null)
|
||||
PacketDispatcher.wrapper.sendToAll(new TEMissileMultipartPacket(xCoord, yCoord, zCoord, multipart));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEMissileMultipartPacket(xCoord, yCoord, zCoord, multipart), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
else
|
||||
PacketDispatcher.wrapper.sendToAll(new TEMissileMultipartPacket(xCoord, yCoord, zCoord, new MissileStruct()));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEMissileMultipartPacket(xCoord, yCoord, zCoord, new MissileStruct()), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
|
||||
outer:
|
||||
for(int x = -1; x <= 1; x++) {
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEMissilePacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -191,8 +192,8 @@ public class TileEntityLaunchPad extends TileEntity implements ISidedInventory,
|
||||
power = Library.chargeTEFromItems(slots, 2, power, maxPower);
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
PacketDispatcher.wrapper.sendToAll(new TEMissilePacket(xCoord, yCoord, zCoord, slots[0]));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEMissilePacket(xCoord, yCoord, zCoord, slots[0]), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@ import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEMissileMultipartPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -179,16 +180,16 @@ public class TileEntityLaunchTable extends TileEntity implements ISidedInventory
|
||||
solid += 250;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, solid, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, padSize.ordinal(), 1));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, solid, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, padSize.ordinal(), 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
|
||||
MissileStruct multipart = getStruct(slots[0]);
|
||||
|
||||
if(multipart != null)
|
||||
PacketDispatcher.wrapper.sendToAll(new TEMissileMultipartPacket(xCoord, yCoord, zCoord, multipart));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEMissileMultipartPacket(xCoord, yCoord, zCoord, multipart), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
else
|
||||
PacketDispatcher.wrapper.sendToAll(new TEMissileMultipartPacket(xCoord, yCoord, zCoord, new MissileStruct()));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEMissileMultipartPacket(xCoord, yCoord, zCoord, new MissileStruct()), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
|
||||
outer:
|
||||
for(int x = -4; x <= 4; x++) {
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -194,7 +195,7 @@ public class TileEntityNukeN45 extends TileEntity implements ISidedInventory {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, primed ? 1 : 0, 0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, primed ? 1 : 0, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
|
||||
if(primed) {
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TETurretPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -95,7 +96,7 @@ public abstract class TileEntityTurretBase extends TileEntity {
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAll(new TETurretPacket(xCoord, yCoord, zCoord, rotationYaw, rotationPitch));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TETurretPacket(xCoord, yCoord, zCoord, rotationYaw, rotationPitch), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
}
|
||||
|
||||
private boolean isInSight(Entity e) {
|
||||
|
||||
@ -3,6 +3,8 @@ package com.hbm.tileentity.bomb;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
|
||||
public class TileEntityTurretCIWS extends TileEntityTurretBase {
|
||||
|
||||
public int spin;
|
||||
@ -21,7 +23,7 @@ public class TileEntityTurretCIWS extends TileEntityTurretBase {
|
||||
rotation += spin;
|
||||
rotation = rotation % 360;
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, rotation, 0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, rotation, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,8 @@ package com.hbm.tileentity.bomb;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
|
||||
public class TileEntityTurretCheapo extends TileEntityTurretBase {
|
||||
|
||||
public int spin;
|
||||
@ -21,7 +23,7 @@ public class TileEntityTurretCheapo extends TileEntityTurretBase {
|
||||
rotation += spin;
|
||||
rotation = rotation % 360;
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, rotation, 0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, rotation, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -10,6 +10,8 @@ import com.hbm.interfaces.IFluidDuct;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEFluidPipePacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@ -30,7 +32,7 @@ public class TileEntityFluidDuct extends TileEntity implements IFluidDuct {
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAll(new TEFluidPipePacket(xCoord, yCoord, zCoord, type));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEFluidPipePacket(xCoord, yCoord, zCoord, type), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 25));
|
||||
|
||||
this.updateConnections();
|
||||
}
|
||||
|
||||
@ -7,8 +7,6 @@ import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IFluidDuct;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEFluidPipePacket;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -29,8 +27,8 @@ public class TileEntityGasDuct extends TileEntity implements IFluidDuct {
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAll(new TEFluidPipePacket(xCoord, yCoord, zCoord, type));
|
||||
//if(!worldObj.isRemote)
|
||||
// PacketDispatcher.wrapper.sendToAll(new TEFluidPipePacket(xCoord, yCoord, zCoord, type));
|
||||
|
||||
this.updateConnections();
|
||||
}
|
||||
|
||||
@ -7,8 +7,6 @@ import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IFluidDuct;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEFluidPipePacket;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -29,8 +27,8 @@ public class TileEntityOilDuct extends TileEntity implements IFluidDuct {
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAll(new TEFluidPipePacket(xCoord, yCoord, zCoord, type));
|
||||
//if(!worldObj.isRemote)
|
||||
// PacketDispatcher.wrapper.sendToAll(new TEFluidPipePacket(xCoord, yCoord, zCoord, type));
|
||||
|
||||
this.updateConnections();
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEPylonDestructorPacket;
|
||||
import com.hbm.packet.TEPylonSenderPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@ -43,13 +44,14 @@ public class TileEntityPylonRedWire extends TileEntity implements IConductor {
|
||||
this.connected = TileEntityPylonRedWire.convertArrayToList(this.scheduleBuffer, worldObj);
|
||||
}
|
||||
|
||||
//TODO: use serialized NBT packets for this trash
|
||||
if(!worldObj.isRemote)
|
||||
if(!connected.isEmpty()) {
|
||||
PacketDispatcher.wrapper.sendToAll(new TEPylonDestructorPacket(xCoord, yCoord, zCoord));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEPylonDestructorPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
|
||||
for(TileEntityPylonRedWire wire : connected)
|
||||
PacketDispatcher.wrapper.sendToAll(new TEPylonSenderPacket(xCoord, yCoord, zCoord,
|
||||
wire.xCoord, wire.yCoord, wire.zCoord));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEPylonSenderPacket(xCoord, yCoord, zCoord,
|
||||
wire.xCoord, wire.yCoord, wire.zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.tileentity.deco;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@ -16,9 +17,9 @@ public class TileEntityBomber extends TileEntity {
|
||||
public void updateEntity() {
|
||||
|
||||
if (!worldObj.isRemote) {
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, yaw, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, pitch, 1));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, type, 2));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, yaw, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, pitch, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, type, 2), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.saveddata.SatelliteSaveStructure.SatelliteType;
|
||||
import com.hbm.saveddata.SatelliteSavedData;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -403,11 +404,11 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IS
|
||||
warning = 3;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, color, 1));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, efficiency, 2));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, field, 3));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, color, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, efficiency, 2), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, field, 3), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -333,9 +334,9 @@ public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory,
|
||||
tank.setTankType(FluidType.CRYOGEL);
|
||||
tank.setFill(tank.getMaxFill());
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, efficiency, 1));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, efficiency, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -347,9 +348,9 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
||||
tank.setTankType(FluidType.CRYOGEL);
|
||||
tank.setFill(tank.getMaxFill());
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, efficiency, 1));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, efficiency, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import com.hbm.blocks.machine.DummyBlockBlast;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEVaultPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -97,13 +98,13 @@ public class TileEntityBlastDoor extends TileEntityLockableBase {
|
||||
}
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 0, 0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 0, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
}
|
||||
}
|
||||
|
||||
public void open() {
|
||||
if(state == 0) {
|
||||
PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, 0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
isOpening = true;
|
||||
state = 1;
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.packet.LoopedSoundPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -37,7 +38,7 @@ public class TileEntityBroadcaster extends TileEntity {
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new LoopedSoundPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.world.machine.FWatz;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
@ -356,7 +357,7 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
||||
if(!this.isRunning() && tanks[1].getFill() >= 100 && tanks[2].getFill() >= 100 && hasFuse() && getSingularityType() > 0 && !cooldown && this.isStructureValid(worldObj))
|
||||
this.fillPlasma();
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
public void fillPlasma() {
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEFFPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -285,7 +286,7 @@ public class TileEntityForceField extends TileEntity implements ISidedInventory,
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
PacketDispatcher.wrapper.sendToAll(new TEFFPacket(xCoord, yCoord, zCoord, radius, health, maxHealth, (int) power, isOn, color, cooldown));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEFFPacket(xCoord, yCoord, zCoord, radius, health, maxHealth, (int) power, isOn, color, cooldown), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 500));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
@ -1080,7 +1081,7 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
||||
|
||||
power = Library.chargeItemsFromTE(slots, 1, power, maxPower);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -363,8 +364,8 @@ public class TileEntityMachineArcFurnace extends TileEntity implements ISidedInv
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 5, power, maxPower);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, dualCookTime, 0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, dualCookTime, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -14,6 +14,8 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.LoopedSoundPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEAssemblerPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -370,9 +372,9 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve
|
||||
break;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TEAssemblerPacket(xCoord, yCoord, zCoord, isProgressing));
|
||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEAssemblerPacket(xCoord, yCoord, zCoord, isProgressing), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new LoopedSoundPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -241,7 +242,7 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent
|
||||
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
power = Library.chargeItemsFromTE(slots, 1, power, maxPower);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -302,8 +303,8 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
||||
heat = 2000;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, heat, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, burnTime, 1));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, heat, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, burnTime, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
if(mark) {
|
||||
|
||||
@ -18,6 +18,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -295,8 +296,8 @@ public class TileEntityMachineBoilerElectric extends TileEntity implements ISide
|
||||
heat = 2000;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, heat, 0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, heat, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
if(mark) {
|
||||
|
||||
@ -14,6 +14,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
@ -302,7 +303,7 @@ public class TileEntityMachineCMBFactory extends TileEntity implements ISidedInv
|
||||
process = 0;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.LoopedSoundPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -333,10 +334,10 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
|
||||
flag1 = true;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, dualCookTime, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, isProgressing ? 1 : 0, 1));
|
||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, dualCookTime, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, isProgressing ? 1 : 0, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new LoopedSoundPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
if(hasPower() && canProcess())
|
||||
|
||||
@ -447,9 +447,9 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
||||
}
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TEChemplantPacket(xCoord, yCoord, zCoord, isProgressing));
|
||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEChemplantPacket(xCoord, yCoord, zCoord, isProgressing), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new LoopedSoundPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -27,6 +27,8 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
|
||||
public class TileEntityMachineCoal extends TileEntity implements ISidedInventory, ISource, IFluidContainer, IFluidAcceptor {
|
||||
|
||||
private ItemStack slots[];
|
||||
@ -253,8 +255,8 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
|
||||
MachineCoal.updateBlockState(this.burnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, burnTime, 0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, burnTime, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
|
||||
generate();
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -313,7 +314,7 @@ public class TileEntityMachineCyclotron extends TileEntity implements ISidedInve
|
||||
}
|
||||
|
||||
power = Library.chargeItemsFromTE(slots, 9, power, maxPower);
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -235,8 +236,8 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento
|
||||
|
||||
generate();
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, (int)powerCap, 0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, (int)powerCap, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEPressPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -256,8 +257,8 @@ public class TileEntityMachineEPress extends TileEntity implements ISidedInvento
|
||||
progress = 0;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TEPressPacket(xCoord, yCoord, zCoord, slots[2], progress));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEPressPacket(xCoord, yCoord, zCoord, slots[2], progress), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -306,8 +307,8 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, dualCookTime, 0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, dualCookTime, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.LoopedSoundPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -305,10 +306,10 @@ public class TileEntityMachineGasCent extends TileEntity implements ISidedInvent
|
||||
this.progress = 0;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, progress, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, isProgressing ? 1 : 0, 1));
|
||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, progress, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, isProgressing ? 1 : 0, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new LoopedSoundPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -239,7 +240,7 @@ public class TileEntityMachineGasFlare extends TileEntity implements ISidedInven
|
||||
|
||||
power = Library.chargeItemsFromTE(slots, 0, power, maxPower);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
@ -501,7 +502,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
||||
this.isLoaded = true;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,6 +12,8 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.LoopedSoundPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEIGeneratorPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -303,9 +305,9 @@ public class TileEntityMachineIGenerator extends TileEntity implements ISidedInv
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
PacketDispatcher.wrapper.sendToAll(new TEIGeneratorPacket(xCoord, yCoord, zCoord, rotation, torque));
|
||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEIGeneratorPacket(xCoord, yCoord, zCoord, rotation, torque), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new LoopedSoundPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEDrillPacket;
|
||||
import com.hbm.sound.SoundLoopMachine;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@ -462,9 +463,9 @@ public class TileEntityMachineMiningDrill extends TileEntity implements ISidedIn
|
||||
if(rotation >= 360)
|
||||
rotation -= 360;
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TEDrillPacket(xCoord, yCoord, zCoord, rotation, torque));
|
||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEDrillPacket(xCoord, yCoord, zCoord, rotation, torque), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new LoopedSoundPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,8 @@ import com.hbm.items.weapon.ItemMissile.FuelType;
|
||||
import com.hbm.items.weapon.ItemMissile.PartType;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEMissileMultipartPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -176,7 +178,7 @@ public class TileEntityMachineMissileAssembly extends TileEntity implements ISid
|
||||
|
||||
MissileStruct multipart = new MissileStruct(slots[1], slots[2], slots[3], slots[4]);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TEMissileMultipartPacket(xCoord, yCoord, zCoord, multipart));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEMissileMultipartPacket(xCoord, yCoord, zCoord, multipart), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@ -339,7 +340,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
||||
}
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import com.hbm.items.special.ItemBlades;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEPressPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -277,7 +278,7 @@ public class TileEntityMachinePress extends TileEntity implements ISidedInventor
|
||||
progress = 0;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TEPressPacket(xCoord, yCoord, zCoord, slots[2], progress));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEPressPacket(xCoord, yCoord, zCoord, slots[2], progress), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEPumpjackPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@ -343,8 +344,8 @@ public class TileEntityMachinePumpjack extends TileEntity implements ISidedInven
|
||||
rotation += (warning == 0 ? 5 : 0);
|
||||
rotation = rotation % 360;
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TEPumpjackPacket(xCoord, yCoord, zCoord, rotation, isProgressing));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEPumpjackPacket(xCoord, yCoord, zCoord, rotation, isProgressing), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -234,7 +235,7 @@ public class TileEntityMachineRTG extends TileEntity implements ISidedInventory,
|
||||
if(power > powerMax)
|
||||
power = powerMax;
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -10,6 +10,8 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -268,7 +270,7 @@ public class TileEntityMachineRadGen extends TileEntity implements ISidedInvento
|
||||
mode = 2;
|
||||
|
||||
//PacketDispatcher.wrapper.sendToAll(new TEIGeneratorPacket(xCoord, yCoord, zCoord, rotation, torque));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TERadarDestructorPacket;
|
||||
import com.hbm.packet.TERadarPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -68,7 +69,7 @@ public class TileEntityMachineRadar extends TileEntity implements IConsumer {
|
||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
|
||||
pingTimer++;
|
||||
|
||||
@ -148,10 +149,10 @@ public class TileEntityMachineRadar extends TileEntity implements IConsumer {
|
||||
|
||||
private void sendMissileData() {
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TERadarDestructorPacket(xCoord, yCoord, zCoord));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TERadarDestructorPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
|
||||
for(int[] e : this.nearbyMissiles) {
|
||||
PacketDispatcher.wrapper.sendToAll(new TERadarPacket(xCoord, yCoord, zCoord, e[0], e[1], e[2], e[3]));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TERadarPacket(xCoord, yCoord, zCoord, e[0], e[1], e[2], e[3]), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@ -400,7 +401,7 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
||||
fillFluidInit(tanks[2].getTankType());
|
||||
|
||||
caluclateSize();
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, size, 3));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, size, 3), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
tanks[0].changeTankSize(waterBase * getSize());
|
||||
@ -546,12 +547,12 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
||||
if(worldObj.getBlock(xCoord + 2, yCoord, zCoord) == ModBlocks.reactor_inserter && worldObj.getBlockMetadata(xCoord + 2, yCoord, zCoord) == 5)
|
||||
tryInsertFrom(xCoord + 3, yCoord, zCoord);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, rods, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, coreHeat, 1));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, hullHeat, 2));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, fuel, 4));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, waste, 5));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, type.getID(), 6));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, rods, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, coreHeat, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, hullHeat, 2), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, fuel, 4), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, waste, 5), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, type.getID(), 6), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@ -421,10 +422,10 @@ public class TileEntityMachineReactorSmall extends TileEntity
|
||||
for (int i = 0; i < 3; i++)
|
||||
tanks[i].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, rods, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, retracting ? 1 : 0, 1));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, coreHeat, 2));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, hullHeat, 3));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, rods, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, retracting ? 1 : 0, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, coreHeat, 2), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, hullHeat, 3), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -438,11 +439,11 @@ public class TileEntityMachineReactorSmallOld extends TileEntity
|
||||
data.incrementRad(worldObj, xCoord, zCoord, rad, rad * 4);
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, rods, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, retracting ? 1 : 0, 1));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, coreHeat, 2));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, hullHeat, 3));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, rods, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, retracting ? 1 : 0, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, coreHeat, 2), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, hullHeat, 3), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -307,7 +308,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
||||
sulfur -= maxSulfur;
|
||||
}
|
||||
}
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -280,7 +281,7 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntity impleme
|
||||
process = 0;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -241,9 +242,9 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
||||
if(this.pistonCount > 2)
|
||||
generate();
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, pistonCount, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, (int)powerCap, 1));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, pistonCount, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, (int)powerCap, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -252,7 +253,7 @@ public class TileEntityMachineShredder extends TileEntity implements ISidedInven
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 29, power, maxPower);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
if(flag1)
|
||||
|
||||
@ -6,6 +6,8 @@ import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.items.special.ItemBattery;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -199,7 +201,7 @@ public class TileEntityMachineShredderLarge extends TileEntity implements ISided
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.items.tool.ItemCassette.TrackType;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TESirenPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -184,7 +185,7 @@ public class TileEntityMachineSiren extends TileEntity implements ISidedInventor
|
||||
int id = Arrays.asList(TrackType.values()).indexOf(getCurrentType());
|
||||
|
||||
if(getCurrentType().name().equals(TrackType.NULL.name())) {
|
||||
PacketDispatcher.wrapper.sendToAll(new TESirenPacket(xCoord, yCoord, zCoord, id, false));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TESirenPacket(xCoord, yCoord, zCoord, id, false), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 1500));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -192,13 +193,13 @@ public class TileEntityMachineSiren extends TileEntity implements ISidedInventor
|
||||
|
||||
if(getCurrentType().getType().name().equals(SoundType.LOOP.name())) {
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TESirenPacket(xCoord, yCoord, zCoord, id, active));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TESirenPacket(xCoord, yCoord, zCoord, id, active), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 1500));
|
||||
} else {
|
||||
|
||||
if(!lock && active) {
|
||||
lock = true;
|
||||
PacketDispatcher.wrapper.sendToAll(new TESirenPacket(xCoord, yCoord, zCoord, id, false));
|
||||
PacketDispatcher.wrapper.sendToAll(new TESirenPacket(xCoord, yCoord, zCoord, id, true));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TESirenPacket(xCoord, yCoord, zCoord, id, false), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 1500));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TESirenPacket(xCoord, yCoord, zCoord, id, true), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 1500));
|
||||
}
|
||||
|
||||
if(lock && !active) {
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@ -65,7 +66,7 @@ public class TileEntityMachineTeleporter extends TileEntity implements IConsumer
|
||||
}
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
|
||||
if(b0)
|
||||
|
||||
@ -16,6 +16,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -253,7 +254,7 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
|
||||
for(int i = 0; i < 2; i++)
|
||||
tanks[i].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ import com.hbm.packet.LoopedSoundPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TETurbofanPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -472,9 +473,9 @@ public class TileEntityMachineTurbofan extends TileEntity implements ISidedInven
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
PacketDispatcher.wrapper.sendToAll(new TETurbofanPacket(xCoord, yCoord, zCoord, spin, isRunning));
|
||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TETurbofanPacket(xCoord, yCoord, zCoord, spin, isRunning), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new LoopedSoundPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.tileentity.machine;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@ -15,8 +16,8 @@ public class TileEntityRadioRec extends TileEntity {
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, isOn ? 1 : 0, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, (int)(freq * 10D), 1));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, isOn ? 1 : 0, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, (int)(freq * 10D), 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEControlPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockRedstoneComparator;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -350,7 +351,7 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent
|
||||
worldObj.scheduleBlockUpdate(xCoord - 1, yCoord, zCoord, worldObj.getBlock(xCoord - 1, yCoord, zCoord), 1);
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TEControlPacket(xCoord, yCoord, zCoord, hullHeat, coreHeat, fuel, water, cool, steam, maxWater, maxCool, maxSteam, compression, rods, maxRods, isOn, auto, isLinked));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEControlPacket(xCoord, yCoord, zCoord, hullHeat, coreHeat, fuel, water, cool, steam, maxWater, maxCool, maxSteam, compression, rods, maxRods, isOn, auto, isLinked), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 30));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -498,7 +499,7 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv
|
||||
//Batteries
|
||||
power = Library.chargeItemsFromTE(slots, 34, power, maxPower);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.tileentity.machine;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEStructurePacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@ -24,7 +25,7 @@ public class TileEntityStructureMarker extends TileEntity {
|
||||
type -= 7;
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAll(new TEStructurePacket(xCoord, yCoord, zCoord, type));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEStructurePacket(xCoord, yCoord, zCoord, type), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -5,6 +5,7 @@ import com.hbm.blocks.machine.DummyBlockVault;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEVaultPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -144,13 +145,13 @@ public class TileEntityVaultDoor extends TileEntityLockableBase {
|
||||
}
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 0, type));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 0, type), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
}
|
||||
}
|
||||
|
||||
public void open() {
|
||||
if(state == 0) {
|
||||
PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, type));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, type), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
isOpening = true;
|
||||
state = 1;
|
||||
|
||||
@ -164,7 +165,7 @@ public class TileEntityVaultDoor extends TileEntityLockableBase {
|
||||
|
||||
public void close() {
|
||||
if(state == 2) {
|
||||
PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, type));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, type), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
isOpening = false;
|
||||
state = 1;
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
@ -592,7 +593,7 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I
|
||||
}
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user