fix: fix majority of remaining bugs

This commit is contained in:
LordMZTE 2022-11-13 15:51:36 +01:00
parent cc4595f781
commit 01b6a17546
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
40 changed files with 188 additions and 285 deletions

View File

@ -1,8 +1,5 @@
- glass button doesn't render in inventory
- missing packets (mostly gui stuff)
- EMP tower drops nonsense
- no proper update on multiblock destroy
- can push explosive entities
- flying blocks dont properly render
- rejuvenation explosives creates glitchy ghost blocks
- fuse sounds borked
- see `// TODO: WTF`

View File

@ -92,10 +92,7 @@ public class GenSulfur extends OreGenReplace {
for (int amount = 0; amount < super.amountPerBranch; ++amount) {
final Block block = world.getBlock(x, y, z);
//TODO: WTF
if (block != null /*&&
block.isGenMineableReplaceable(world, x, y, z,
Blocks.stone)*/) {
if (block != Blocks.air) {
world.setBlock(x, y, z, super.oreID, super.oreMeta, 2);
}

View File

@ -45,22 +45,24 @@ public class EntityTileDamagable
&& this.host.canApplyPotion(par1PotionEffect);
}
// public void addPotionEffect(final PotionEffect par1PotionEffect) {
// if (this.isPotionApplicable(par1PotionEffect)) {
// if (this.isPotionActive(par1PotionEffect.getPotionID())) {
// //((PotionEffect)this.activePotionsMap.get(
// // par1PotionEffect.getPotionID()))
// // .combine(par1PotionEffect);
// //this.func_70695_b((PotionEffect)this.activePotionsMap.get(
// // par1PotionEffect.getPotionID()));
// } else {
// ((EntityLivingBase)this)
// .activePotionsMap.put(par1PotionEffect.getPotionID(),
// par1PotionEffect);
// this.onNewPotionEffect(par1PotionEffect);
// }
// }
// }
public void addPotionEffect(final PotionEffect par1PotionEffect) {
if (this.isPotionApplicable(par1PotionEffect)) {
if (this.isPotionActive(par1PotionEffect.getPotionID())) {
((PotionEffect) this.activePotionsMap.get(par1PotionEffect.getPotionID()))
.combine(par1PotionEffect);
this.onChangedPotionEffect(
(PotionEffect
) this.activePotionsMap.get(par1PotionEffect.getPotionID()),
true
);
} else {
this.activePotionsMap.put(
par1PotionEffect.getPotionID(), par1PotionEffect
);
this.onNewPotionEffect(par1PotionEffect);
}
}
}
@Override
public String getCustomNameTag() {
@ -198,11 +200,10 @@ public class EntityTileDamagable
return false;
}
// TODO: WTF
// @Override
// public float getMaxHealth() {
// return (this.host != null && this.host instanceof IHealthTile)
// ? this.host.getMaxHealth()
// : 100;
// }
@Override
public float getMaxHealth() {
return (this.host != null && this.host instanceof IHealthTile)
? this.host.getMaxHealth()
: 100;
}
}

View File

@ -22,8 +22,6 @@ public class GuiButtonArrow extends GuiButton {
@Override
public void
drawButton(final Minecraft par1Minecraft, final int width, final int hight) {
// TODO: WTF
// if (this.drawButton) {
par1Minecraft.renderEngine.bindTexture(
new ResourceLocation("icbm", "textures/gui/gui@.png")
);
@ -45,6 +43,5 @@ public class GuiButtonArrow extends GuiButton {
this.drawTexturedModalRect(
this.xPosition, this.yPosition, varWid, var5, this.width, this.height
);
// }
}
}

View File

@ -22,8 +22,6 @@ public class GuiButtonImage extends GuiButton {
@Override
public void
drawButton(final Minecraft par1Minecraft, final int width, final int hight) {
// TODO: WTF
// if (this.drawButton) {
par1Minecraft.renderEngine.bindTexture(
new ResourceLocation("icbm", "textures/gui/gui@.png")
);
@ -60,7 +58,6 @@ public class GuiButtonImage extends GuiButton {
this.drawTexturedModalRect(
this.xPosition, this.yPosition, var6, var5, this.width, this.height
);
// }
}
public boolean isIntersect(final int x, final int y) {

View File

@ -33,9 +33,8 @@ public class ESeat extends Entity implements IEntityAdditionalSpawnData {
this.shouldSit = sit;
}
// TODO: WTF
// @Override
public String getEntityName() {
@Override
public String getCommandSenderName() {
return "Seat";
}

View File

@ -25,7 +25,7 @@ import icbm.zhapin.jiqi.TLauncherControlPanel;
import icbm.zhapin.jiqi.TLauncherPlatform;
import icbm.zhapin.jiqi.TMissileCoordinator;
import icbm.zhapin.jiqi.TRadarTower;
import icbm.zhapin.render.REZhaDan;
import icbm.zhapin.render.REExplosives;
import icbm.zhapin.render.REmpTower;
import icbm.zhapin.render.RFaSheDi;
import icbm.zhapin.render.RFaSheJia;
@ -40,7 +40,7 @@ import icbm.zhapin.render.RMissile;
import icbm.zhapin.render.RRadarTower;
import icbm.zhapin.render.RSMine;
import icbm.zhapin.render.RShouLiuDan;
import icbm.zhapin.render.RSuiPian;
import icbm.zhapin.render.RShrapnel;
import icbm.zhapin.render.RXiaoFaSheQi;
import icbm.zhapin.render.RYinDaoQi;
import icbm.zhapin.render.RZhaPin;
@ -88,7 +88,7 @@ public class ClientProxy extends CommonProxy {
RenderingRegistry.registerBlockHandler((ISimpleBlockRenderingHandler) new RHJiQi()
);
RenderingRegistry.registerEntityRenderingHandler(
EExplosive.class, (Render) new REZhaDan()
EExplosive.class, (Render) new REExplosives()
);
RenderingRegistry.registerEntityRenderingHandler(
EMissile.class, (Render) new RMissile(0.5f)
@ -103,7 +103,7 @@ public class ClientProxy extends CommonProxy {
ELightBeam.class, (Render) new RGuangBang()
);
RenderingRegistry.registerEntityRenderingHandler(
ESuiPian.class, (Render) new RSuiPian()
ESuiPian.class, (Render) new RShrapnel()
);
RenderingRegistry.registerEntityRenderingHandler(
EGrenade.class, (Render) new RShouLiuDan()

View File

@ -253,7 +253,6 @@ public class ESuiPian extends EntityArrow implements IEntityAdditionalSpawnData
super.posY + super.motionY,
super.posZ + super.motionZ
);
// TODO: false? true?
MovingObjectPosition movingObjPos
= super.worldObj.rayTraceBlocks(var10, var11, false);
var10 = Vec3.createVectorHelper(super.posX, super.posY, super.posZ);

View File

@ -40,6 +40,8 @@ import icbm.zhapin.jiqi.EmpTowerGuiPacketHandler;
import icbm.zhapin.jiqi.IBMachine;
import icbm.zhapin.jiqi.LauncherControlPanelGuiPacket;
import icbm.zhapin.jiqi.LauncherControlPanelGuiPacketHandler;
import icbm.zhapin.jiqi.RadarTowerGuiPacket;
import icbm.zhapin.jiqi.RadarTowerGuiPacketHandler;
import icbm.zhapin.po.PChuanRanDu;
import icbm.zhapin.po.PDaDu;
import icbm.zhapin.po.PDongShang;
@ -98,7 +100,7 @@ public class ICBMExplosion extends MainBase {
public static Item Du;
public static final int ENTITY_ID_PREFIX = 50;
public static Block bExplosives;
public static Block bJiQi;
public static Block bMachine;
public static Item itDaoDan;
public static Item itTeBieDaoDan;
public static ItemElectric itJieJa;
@ -125,7 +127,7 @@ public class ICBMExplosion extends MainBase {
= MainBase.CONFIGURATION.get("general", "Use Fuel", ICBMExplosion.USE_FUEL)
.getBoolean(ICBMExplosion.USE_FUEL);
ICBMExplosion.bExplosives = (Block) new BExplosives();
ICBMExplosion.bJiQi = (Block) new BMachine();
ICBMExplosion.bMachine = (Block) new BMachine();
ICBMExplosion.itDaoDan = new ItMissile("missile");
ICBMExplosion.itTeBieDaoDan = new ItModuleMissile();
ICBMExplosion.itJieJa = new ItDefuser();
@ -230,7 +232,7 @@ public class ICBMExplosion extends MainBase {
GameRegistry.registerBlock(
ICBMExplosion.bExplosives, IBExplosive.class, "bExplosives"
);
GameRegistry.registerBlock(ICBMExplosion.bJiQi, IBMachine.class, "bJiQi");
GameRegistry.registerBlock(ICBMExplosion.bMachine, IBMachine.class, "bMachine");
ForgeChunkManager.setForcedChunkLoadingCallback(
(Object) this,
(ForgeChunkManager.LoadingCallback) new ForgeChunkManager.LoadingCallback() {
@ -279,6 +281,12 @@ public class ICBMExplosion extends MainBase {
pktId++,
Side.SERVER
);
channel.registerMessage(
RadarTowerGuiPacketHandler.class,
RadarTowerGuiPacket.class,
pktId++,
Side.SERVER
);
}
@Mod.EventHandler
@ -306,7 +314,7 @@ public class ICBMExplosion extends MainBase {
ICBMExplosion.itLeiDaQiang,
'C',
new ItemStack(
ICBMExplosion.bJiQi, 1, BMachine.JiQi.XiaoFaSheQi.ordinal() + 6
ICBMExplosion.bMachine, 1, BMachine.JiQi.XiaoFaSheQi.ordinal() + 6
),
'B',
Blocks.stone_button,
@ -366,36 +374,36 @@ public class ICBMExplosion extends MainBase {
"calclavia:WIRE" }
));
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 0),
new ItemStack(ICBMExplosion.bMachine, 1, 0),
new Object[] {
"! !", "!C!", "!!!", '!', "ingotBronze", 'C', "calclavia:CIRCUIT_T1" }
));
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 1),
new ItemStack(ICBMExplosion.bMachine, 1, 1),
new Object[] { "! !",
"!C!",
"!@!",
'@',
new ItemStack(ICBMExplosion.bJiQi, 1, 0),
new ItemStack(ICBMExplosion.bMachine, 1, 0),
'!',
"ingotSteel",
'C',
"calclavia:CIRCUIT_T2" }
));
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 2),
new ItemStack(ICBMExplosion.bMachine, 1, 2),
new Object[] { "! !",
"!C!",
"!@!",
'@',
new ItemStack(ICBMExplosion.bJiQi, 1, 1),
new ItemStack(ICBMExplosion.bMachine, 1, 1),
'!',
"plateSteel",
'C',
"calclavia:CIRCUIT_T3" }
));
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 3),
new ItemStack(ICBMExplosion.bMachine, 1, 3),
new Object[] { "!!!",
"!#!",
"!?!",
@ -407,7 +415,7 @@ public class ICBMExplosion extends MainBase {
"calclavia:WIRE" }
));
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 4),
new ItemStack(ICBMExplosion.bMachine, 1, 4),
new Object[] { "!$!",
"!#!",
"!?!",
@ -418,10 +426,10 @@ public class ICBMExplosion extends MainBase {
'?',
"calclavia:WIRE",
'$',
new ItemStack(ICBMExplosion.bJiQi, 1, 3) }
new ItemStack(ICBMExplosion.bMachine, 1, 3) }
));
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 5),
new ItemStack(ICBMExplosion.bMachine, 1, 5),
new Object[] { "!$!",
"!#!",
"!?!",
@ -432,34 +440,34 @@ public class ICBMExplosion extends MainBase {
'?',
"calclavia:WIRE",
'$',
new ItemStack(ICBMExplosion.bJiQi, 1, 4) }
new ItemStack(ICBMExplosion.bMachine, 1, 4) }
));
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 6),
new ItemStack(ICBMExplosion.bMachine, 1, 6),
new Object[] { "! !", "!!!", "! !", '!', "ingotBronze" }
));
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 7),
new ItemStack(ICBMExplosion.bMachine, 1, 7),
new Object[] { "! !",
"!@!",
"! !",
'!',
"ingotSteel",
'@',
new ItemStack(ICBMExplosion.bJiQi, 1, 6) }
new ItemStack(ICBMExplosion.bMachine, 1, 6) }
));
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 8),
new ItemStack(ICBMExplosion.bMachine, 1, 8),
new Object[] { "! !",
"!@!",
"! !",
'!',
"plateSteel",
'@',
new ItemStack(ICBMExplosion.bJiQi, 1, 7) }
new ItemStack(ICBMExplosion.bMachine, 1, 7) }
));
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 9),
new ItemStack(ICBMExplosion.bMachine, 1, 9),
new Object[] { "?@?",
" ! ",
"!#!",
@ -474,7 +482,7 @@ public class ICBMExplosion extends MainBase {
));
RecipeHelper.addRecipe(
(IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 10),
new ItemStack(ICBMExplosion.bMachine, 1, 10),
new Object[] { "?W?",
"@!@",
"?#?",
@ -494,54 +502,16 @@ public class ICBMExplosion extends MainBase {
true
);
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.bJiQi, 1, 11),
new ItemStack(ICBMExplosion.bMachine, 1, 11),
new Object[] { "?! ",
"@@@",
'@',
"plateSteel",
'!',
new ItemStack(ICBMExplosion.bJiQi, 1, 2),
new ItemStack(ICBMExplosion.bMachine, 1, 2),
'?',
new ItemStack(ICBMExplosion.bJiQi, 1, 8) }
new ItemStack(ICBMExplosion.bMachine, 1, 8) }
));
// TODO: WTF
// try {
// if (FluidRegistry.getFluid("fuel") != null &&
// ICBMExplosion.USE_FUEL) {
// for (final FluidContainerData data :
// FluidContainerRegistry.getRegisteredFluidContainerData()) {
// if (data.fluid != null &&
// data.fluid.isLiquidEqual(
// FluidRegistry.getFluid("Fuel"))) {
// GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
// new ItemStack(ICBMExplosion.itTeBieDaoDan),
// new Object[] { " @ ", "@#@", "@?@", '@',
// "ingotSteel", '?',
// data.filled, '#', "calclavia:CIRCUIT_T1"
// }));
// }
// }
// } else if (LiquidDictionary.getLiquid("Oil", 1) != null &&
// ICBMExplosion.USE_FUEL) {
// for (final LiquidContainerData data :
// LiquidContainerRegistry.getRegisteredLiquidContainerData()) {
// if (data.stillLiquid != null &&
// data.stillLiquid.isLiquidEqual(
// LiquidDictionary.getLiquid("Oil", 1))) {
// GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
// new ItemStack(ICBMExplosion.itTeBieDaoDan),
// new Object[] { " @ ", "@#@", "@?@", '@',
// "ingotSteel", '?',
// data.filled, '#', "calclavia:CIRCUIT_T1"
// }));
// }
// }
// } else {
// }
// } catch (final Exception e) {
// FMLLog.severe("Failed to add missile module recipe!", new Object[0]);
// e.printStackTrace();
// }
GameRegistry.addRecipe((IRecipe) new ShapedOreRecipe(
new ItemStack(ICBMExplosion.itTeBieDaoDan),
new Object[] { " @ ",

View File

@ -258,7 +258,7 @@ public class ItLaserDesignator extends ItElectricICBM implements IItemFrequency
return par1ItemStack;
}
if (block == ICBMExplosion.bJiQi) {
if (block == ICBMExplosion.bMachine) {
return par1ItemStack;
}
@ -294,12 +294,6 @@ public class ItLaserDesignator extends ItElectricICBM implements IItemFrequency
objectMouseOver.blockY,
objectMouseOver.blockZ
));
// TODO: WTF
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket(
// "ICBM", missileLauncher, 2,
// missileLauncher.getTarget().x,
// missileLauncher.getTarget().y,
// missileLauncher.getTarget().z));
} else {
double previousY = 0.0;
@ -312,12 +306,6 @@ public class ItLaserDesignator extends ItElectricICBM implements IItemFrequency
previousY,
objectMouseOver.blockZ
));
// TODO: WTF
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket(
// "ICBM", missileLauncher, 2,
// missileLauncher.getTarget().x,
// missileLauncher.getTarget().y,
// missileLauncher.getTarget().z));
}
if (missileLauncher.canLaunch()) {

View File

@ -102,7 +102,7 @@ public class ItRadarGun extends ItElectricICBM {
) {
final Block blockId = par3World.getBlock(x, y, z);
if (blockId == ICBMExplosion.bJiQi) {
if (blockId == ICBMExplosion.bMachine) {
final TileEntity tileEntity = par3World.getTileEntity(x, y, z);
if (tileEntity != null) {
@ -120,10 +120,6 @@ public class ItRadarGun extends ItElectricICBM {
missileLauncher.getTarget().z = (int) savedCords.z;
if (par3World.isRemote) {
// TODO: WTF
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket(
// "ICBM|E", missileLauncher, 2, savedCords.x,
// missileLauncher.getTarget().y, savedCords.z));
par2EntityPlayer.addChatMessage(new ChatComponentText(
"Coordinate information transfered!"
));
@ -147,10 +143,6 @@ public class ItRadarGun extends ItElectricICBM {
);
if (par3World.isRemote) {
// TODO: WTF
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket(
// "ICBM|E", missileLauncher2, 2, savedCords.x,
// savedCords.y, savedCords.z));
par2EntityPlayer.addChatMessage(new ChatComponentText(
"Coordinate information transfered!"
));

View File

@ -119,7 +119,7 @@ public class ItRemoteDetonator extends ItElectricICBM {
);
if (tile != null && tile instanceof TExplosive) {
if (blockID == ICBMExplosion.bJiQi) {
if (blockID == ICBMExplosion.bMachine) {
return itemStack;
}

View File

@ -1,7 +1,9 @@
package icbm.zhapin.gui;
import icbm.zhapin.ICBMExplosion;
import icbm.zhapin.daodan.EMissile;
import icbm.zhapin.jiqi.BMachine;
import icbm.zhapin.jiqi.RadarTowerGuiPacket;
import icbm.zhapin.jiqi.TRadarTower;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.entity.Entity;
@ -68,9 +70,7 @@ public class GRadarTower extends GuiBase {
500, Math.max(0, Integer.parseInt(this.textFieldSafetyZone.getText()))
);
this.tileEntity.safetyRadius = newSafetyRadius;
// TODO: WTF
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket(
// "ICBM|E", this.tileEntity, 2, this.tileEntity.safetyBanJing));
ICBMExplosion.channel.sendToServer(new RadarTowerGuiPacket(this.tileEntity));
} catch (final NumberFormatException ex) {}
try {
@ -78,9 +78,7 @@ public class GRadarTower extends GuiBase {
500, Math.max(0, Integer.parseInt(this.textFieldAlarmRange.getText()))
);
this.tileEntity.alarmRadius = newAlarmRadius;
// TODO: WTF
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket(
// "ICBM|E", this.tileEntity, 3, this.tileEntity.alarmBanJing));
ICBMExplosion.channel.sendToServer(new RadarTowerGuiPacket(this.tileEntity));
} catch (final NumberFormatException ex2) {}
}

View File

@ -103,8 +103,6 @@ public class BMachine extends BICBM {
}
}
// TODO: WTF
// @Override
public static boolean canBePlacedAt(
final World world,
final int x,
@ -268,20 +266,15 @@ public class BMachine extends BICBM {
final Block par5,
final int par6
) {
final int metadata = par1World.getBlockMetadata(x, y, z);
final TileEntity tileEntity = par1World.getTileEntity(x, y, z);
if (tileEntity != null) {
int itemMetadata = 0;
if (tileEntity instanceof ITier) {
itemMetadata = ((ITier) tileEntity).getTier() + metadata * 3;
} else {
itemMetadata = 9 + metadata - 3;
}
this.dropBlockAsItem(
par1World, x, y, z, new ItemStack(ICBMExplosion.bJiQi, 1, itemMetadata)
par1World,
x,
y,
z,
new ItemStack(ICBMExplosion.bMachine, 1, getMachineId(tileEntity))
);
if (tileEntity instanceof IMultiBlock) {
@ -341,7 +334,7 @@ public class BMachine extends BICBM {
final int z
) {
final TileEntity tileEntity = par1World.getTileEntity(x, y, z);
return new ItemStack(ICBMExplosion.bJiQi, 1, getMachineId(tileEntity));
return new ItemStack(ICBMExplosion.bMachine, 1, getMachineId(tileEntity));
}
@Override

View File

@ -0,0 +1,37 @@
package icbm.zhapin.jiqi;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import io.netty.buffer.ByteBuf;
import universalelectricity.core.vector.Vector3;
public class RadarTowerGuiPacket implements IMessage {
Vector3 pos;
int safetyRadius;
int alarmRadius;
public RadarTowerGuiPacket(TRadarTower te) {
this.pos = new Vector3(te);
this.safetyRadius = te.safetyRadius;
this.alarmRadius = te.alarmRadius;
}
public RadarTowerGuiPacket() {
}
@Override
public void fromBytes(ByteBuf buf) {
this.pos = new Vector3(buf.readInt(), buf.readInt(), buf.readInt());
this.safetyRadius = buf.readInt();
this.alarmRadius = buf.readInt();
}
@Override
public void toBytes(ByteBuf buf) {
buf.writeInt(this.pos.intX());
buf.writeInt(this.pos.intY());
buf.writeInt(this.pos.intZ());
buf.writeInt(this.safetyRadius);
buf.writeInt(this.alarmRadius);
}
}

View File

@ -0,0 +1,26 @@
package icbm.zhapin.jiqi;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class RadarTowerGuiPacketHandler
implements IMessageHandler<RadarTowerGuiPacket, IMessage> {
@Override
public IMessage onMessage(RadarTowerGuiPacket message, MessageContext ctx) {
World world = ctx.getServerHandler().playerEntity.worldObj;
TileEntity te = message.pos.getTileEntity(world);
if (te instanceof TRadarTower) {
TRadarTower rt = (TRadarTower) te;
rt.alarmRadius = message.alarmRadius;
rt.safetyRadius = message.safetyRadius;
}
return null;
}
}

View File

@ -234,11 +234,6 @@ public class TCruiseLauncher extends TLauncherController
super.target = Vector3.readFromNBT(nbt.getCompoundTag("target"));
}
// TODO: WTF
// if (!this.worldObj.isRemote) {
// this.setFrequency(dataStream.readInt());
// }
private float getPitchFromTarget() {
final double distance = Math.sqrt(
(super.target.x - this.xCoord) * (super.target.x - this.xCoord)

View File

@ -80,13 +80,6 @@ public class TEmpTower
this.holzOhJa = nbt.getByte("holzOhJa");
}
// TODO: WTF
// else if (ID == 2) {
// this.radius = dataStream.readInt();
// } else if (ID == 3) {
// this.holzOhJa = dataStream.readByte();
// }
@Override
public Packet getDescriptionPacket() {
NBTTagCompound nbt = new NBTTagCompound();
@ -152,9 +145,9 @@ public class TEmpTower
@Override
public void onDestroy(final TileEntity callingBlock) {
this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, Blocks.air, 0, 2);
this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, Blocks.air, 0, 3);
this.worldObj.setBlock(
this.xCoord, this.yCoord + 1, this.zCoord, Blocks.air, 0, 2
this.xCoord, this.yCoord + 1, this.zCoord, Blocks.air, 0, 3
);
}

View File

@ -94,12 +94,12 @@ public class TLauncher
@Override
public void onDestroy(final TileEntity callingBlock) {
this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, Blocks.air, 0, 2);
this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, Blocks.air, 0, 3);
this.worldObj.setBlock(
this.xCoord, this.yCoord + 1, this.zCoord, Blocks.air, 0, 2
this.xCoord, this.yCoord + 1, this.zCoord, Blocks.air, 0, 3
);
this.worldObj.setBlock(
this.xCoord, this.yCoord + 2, this.zCoord, Blocks.air, 0, 2
this.xCoord, this.yCoord + 2, this.zCoord, Blocks.air, 0, 3
);
}

View File

@ -111,29 +111,6 @@ public class TLauncherControlPanel
super.target = Vector3.readFromNBT(nbt.getCompoundTag("target"));
}
// TODO: WTF
// } else if (!this.worldObj.isRemote) {
// if (ID == 1) {
// this.setFrequency(dataStream.readInt());
// } else if (ID == 2) {
// super.target = new Vector3(dataStream.readDouble(),
// dataStream.readDouble(),
// dataStream.readDouble());
// if (this.getTier() < 2) {
// super.target.y = 0.0;
// }
// } else if (ID == 3) {
// this.height = (short) Math.max(Math.min(dataStream.readShort(), 99),
// 3);
// }
// } else if (ID == 3 && this.worldObj.isRemote) {
// this.setJoules(dataStream.readDouble());
// super.disabledTicks = dataStream.readInt();
// super.target = new Vector3(dataStream.readDouble(),
// dataStream.readDouble(),
// dataStream.readDouble());
// }
@Override
public boolean canLaunch() {
return this.faSheDi != null && !this.isDisabled() && this.faSheDi.daoDan != null

View File

@ -427,12 +427,12 @@ public class TLauncherPlatform extends TileEntityAdvanced
public void onDestroy(final TileEntity callingBlock) {
final Vector3 position = new Vector3(this.xCoord, this.yCoord, this.zCoord);
if (this.orientation == 3 || this.orientation == 2) {
if (this.orientation == 3 || this.orientation == 3) {
this.worldObj.setBlock(
(int) position.x, (int) position.y, (int) position.z, Blocks.air, 0, 2
(int) position.x, (int) position.y, (int) position.z, Blocks.air, 0, 3
);
this.worldObj.setBlock(
(int) position.x + 1, (int) position.y, (int) position.z, Blocks.air, 0, 2
(int) position.x + 1, (int) position.y, (int) position.z, Blocks.air, 0, 3
);
this.worldObj.setBlock(
(int) position.x + 1,
@ -440,7 +440,7 @@ public class TLauncherPlatform extends TileEntityAdvanced
(int) position.z,
Blocks.air,
0,
2
3
);
this.worldObj.setBlock(
(int) position.x + 1,
@ -448,10 +448,10 @@ public class TLauncherPlatform extends TileEntityAdvanced
(int) position.z,
Blocks.air,
0,
2
3
);
this.worldObj.setBlock(
(int) position.x - 1, (int) position.y, (int) position.z, Blocks.air, 0, 2
(int) position.x - 1, (int) position.y, (int) position.z, Blocks.air, 0, 3
);
this.worldObj.setBlock(
(int) position.x - 1,
@ -459,7 +459,7 @@ public class TLauncherPlatform extends TileEntityAdvanced
(int) position.z,
Blocks.air,
0,
2
3
);
this.worldObj.setBlock(
(int) position.x - 1,
@ -467,14 +467,14 @@ public class TLauncherPlatform extends TileEntityAdvanced
(int) position.z,
Blocks.air,
0,
2
3
);
} else {
this.worldObj.setBlock(
(int) position.x, (int) position.y, (int) position.z, Blocks.air, 0, 2
(int) position.x, (int) position.y, (int) position.z, Blocks.air, 0, 3
);
this.worldObj.setBlock(
(int) position.x, (int) position.y, (int) position.z + 1, Blocks.air, 0, 2
(int) position.x, (int) position.y, (int) position.z + 1, Blocks.air, 0, 3
);
this.worldObj.setBlock(
(int) position.x,
@ -482,7 +482,7 @@ public class TLauncherPlatform extends TileEntityAdvanced
(int) position.z + 1,
Blocks.air,
0,
2
3
);
this.worldObj.setBlock(
(int) position.x,
@ -490,10 +490,10 @@ public class TLauncherPlatform extends TileEntityAdvanced
(int) position.z + 1,
Blocks.air,
0,
2
3
);
this.worldObj.setBlock(
(int) position.x, (int) position.y, (int) position.z - 1, Blocks.air, 0, 2
(int) position.x, (int) position.y, (int) position.z - 1, Blocks.air, 0, 3
);
this.worldObj.setBlock(
(int) position.x,
@ -501,7 +501,7 @@ public class TLauncherPlatform extends TileEntityAdvanced
(int) position.z - 1,
Blocks.air,
0,
2
3
);
this.worldObj.setBlock(
(int) position.x,
@ -509,7 +509,7 @@ public class TLauncherPlatform extends TileEntityAdvanced
(int) position.z - 1,
Blocks.air,
0,
2
3
);
}

View File

@ -15,8 +15,6 @@ public class TMissileCoordinator
this.facingDirection = 3;
}
// TODO: WTF: nix data packet?
@Override
public void readFromNBT(final NBTTagCompound par1NBTTagCompound) {
super.readFromNBT(par1NBTTagCompound);

View File

@ -323,33 +323,33 @@ public class TRadarTower extends TileEntityUniversalRunnable
@Override
public void onDestroy(final TileEntity callingBlock) {
this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, Blocks.air, 0, 2);
this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, Blocks.air, 0, 3);
this.worldObj.setBlock(
this.xCoord, this.yCoord + 1, this.zCoord, Blocks.air, 0, 2
this.xCoord, this.yCoord + 1, this.zCoord, Blocks.air, 0, 3
);
this.worldObj.setBlock(
this.xCoord + 1, this.yCoord + 1, this.zCoord, Blocks.air, 0, 2
this.xCoord + 1, this.yCoord + 1, this.zCoord, Blocks.air, 0, 3
);
this.worldObj.setBlock(
this.xCoord - 1, this.yCoord + 1, this.zCoord, Blocks.air, 0, 2
this.xCoord - 1, this.yCoord + 1, this.zCoord, Blocks.air, 0, 3
);
this.worldObj.setBlock(
this.xCoord, this.yCoord + 1, this.zCoord + 1, Blocks.air, 0, 2
this.xCoord, this.yCoord + 1, this.zCoord + 1, Blocks.air, 0, 3
);
this.worldObj.setBlock(
this.xCoord, this.yCoord + 1, this.zCoord - 1, Blocks.air, 0, 2
this.xCoord, this.yCoord + 1, this.zCoord - 1, Blocks.air, 0, 3
);
this.worldObj.setBlock(
this.xCoord + 1, this.yCoord + 1, this.zCoord + 1, Blocks.air, 0, 2
this.xCoord + 1, this.yCoord + 1, this.zCoord + 1, Blocks.air, 0, 3
);
this.worldObj.setBlock(
this.xCoord - 1, this.yCoord + 1, this.zCoord - 1, Blocks.air, 0, 2
this.xCoord - 1, this.yCoord + 1, this.zCoord - 1, Blocks.air, 0, 3
);
this.worldObj.setBlock(
this.xCoord + 1, this.yCoord + 1, this.zCoord - 1, Blocks.air, 0, 2
this.xCoord + 1, this.yCoord + 1, this.zCoord - 1, Blocks.air, 0, 3
);
this.worldObj.setBlock(
this.xCoord - 1, this.yCoord + 1, this.zCoord + 1, Blocks.air, 0, 2
this.xCoord - 1, this.yCoord + 1, this.zCoord + 1, Blocks.air, 0, 3
);
}

View File

@ -8,16 +8,17 @@ import icbm.zhapin.zhapin.EExplosive;
import icbm.zhapin.zhapin.ZhaPin;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class REZhaDan extends Render {
public class REExplosives extends Render {
private RenderBlocks blockRenderer;
public REZhaDan() {
public REExplosives() {
this.blockRenderer = new RenderBlocks();
super.shadowSize = 0.5f;
}
@ -72,8 +73,7 @@ public class REZhaDan extends Render {
}
float f2 = (1.0f - (entityExplosive.fuse - par9 + 1.0f) / 100.0f) * 0.8f;
// TODO: this is the wrong ResourceLocation name
this.bindTexture(new ResourceLocation("textures/terrain.png"));
this.bindTexture(TextureMap.locationBlocksTexture);
this.blockRenderer.renderBlockAsItem(
ICBMExplosion.bExplosives,
entityExplosive.haoMa,
@ -99,7 +99,6 @@ public class REZhaDan extends Render {
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
// TODO: WTF
return null;
}
}

View File

@ -7,6 +7,7 @@ import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.util.MathHelper;
@ -31,8 +32,7 @@ public class RFeiBlock extends Render {
) {
GL11.glPushMatrix();
GL11.glTranslatef((float) x, (float) y, (float) z);
// TODO: wrong resourceloc
this.bindTexture(new ResourceLocation("minecraft", "textures/terrain.png"));
this.bindTexture(TextureMap.locationBlocksTexture);
final Block block = entity.block;
final World world = entity.worldObj;
GL11.glDisable(2896);
@ -146,7 +146,6 @@ public class RFeiBlock extends Render {
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
// TODO: WTF
return null;
}
}

View File

@ -115,7 +115,6 @@ public class RGuangBang extends Render {
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
// TODO: WTF
return null;
}
}

View File

@ -80,7 +80,6 @@ public class RMissile extends Render {
}
if (entityMissile.missileId >= 100) {
// TODO: WTF loadTexture -> bindTexture
this.bindTexture(new ResourceLocation(
"icbm",
"textures/models/missile_"
@ -106,7 +105,6 @@ public class RMissile extends Render {
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
// TODO: WTF
return null;
}

View File

@ -6,6 +6,7 @@ import icbm.zhapin.ICBMExplosion;
import icbm.zhapin.zhapin.EGrenade;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
@ -28,8 +29,7 @@ public class RShouLiuDan extends Render {
GL11.glTranslatef((float) x, (float) y + 0.4f, (float) z);
GL11.glEnable(32826);
GL11.glScalef(0.6f, 0.6f, 0.6f);
// TODO: wrong resourceloc
this.bindTexture(new ResourceLocation("gui/items.png"));
this.bindTexture(TextureMap.locationItemsTexture);
final Tessellator tessellator = Tessellator.instance;
this.renderIcon(tessellator, icon);
GL11.glDisable(32826);
@ -65,7 +65,6 @@ public class RShouLiuDan extends Render {
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
// TODO: WTF
return null;
}
}

View File

@ -6,6 +6,7 @@ import icbm.zhapin.ESuiPian;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.util.MathHelper;
@ -15,7 +16,7 @@ import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class RSuiPian extends Render {
public class RShrapnel extends Render {
public void renderArrow(
final ESuiPian suiPian,
final double par2,
@ -27,8 +28,7 @@ public class RSuiPian extends Render {
if (suiPian.isAnvil) {
GL11.glPushMatrix();
GL11.glTranslatef((float) par2, (float) par4, (float) par6);
// TODO: wrong resourceloc
this.bindTexture(new ResourceLocation("minecraft", "textures/terrain.png"));
this.bindTexture(TextureMap.locationBlocksTexture);
// yay anvilcraft
final Block block = Blocks.anvil;
final World world = suiPian.worldObj;
@ -136,7 +136,6 @@ public class RSuiPian extends Render {
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
// TODO: WTF
return null;
}
}

View File

@ -188,7 +188,6 @@ public class RZhaPin extends Render {
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
// TODO: WTF
return null;
}
}

View File

@ -228,29 +228,6 @@ public class BExplosives extends BICBM implements ICamouflageMaterial {
}
}
// TODO: WTF
// public IIcon getIcon(final IIconRegister iconRegister, final int i,
// final String suffix) {
// final ITexturePack itexturepack =
// Minecraft.getMinecraft().texturePackList.getSelectedTexturePack(); final
// String iconName = "explosive_" + ZhaPin.list[i].getUnlocalizedName() +
// suffix; final String path = "/mods/"
// + "icbm:".replace(":", "") + "/textures/blocks/" +
// iconName + ".png";
// try {
// final BufferedImage bufferedimage =
// ImageIO.read(itexturepack.getResourceAsStream(path)); return
// iconRegister.registerIcon("icbm:" + iconName);
// } catch (final Exception e) {
// if (suffix.equals("_bottom")) {
// return iconRegister.registerIcon("icbm:explosive_bottom_" +
// ZhaPin.list[i].getTier());
// }
// return iconRegister.registerIcon("icbm:explosive_base_" +
// ZhaPin.list[i].getTier());
// }
// }
@Override
public void
onBlockAdded(final World par1World, final int x, final int y, final int z) {

View File

@ -225,7 +225,6 @@ public class EGrenade
super.motionY *= 0.5;
} else {
super.motionY -= gravity;
// TODO: is this pushOutOfBlocks?
this.func_145771_j(
super.posX,
(super.boundingBox.minY + super.boundingBox.maxY) / 2.0,

View File

@ -38,16 +38,6 @@ public class TExplosive extends TileEntity implements IExplosiveContainer, IRota
par1NBTTagCompound.setInteger("explosiveID", this.explosiveId);
}
// TODO: WTF
// else if (ID == 2 && !this.worldObj.isRemote &&
// player.inventory.getCurrentItem().getItem() instanceof ItRemoteDetonator) {
// final ItemStack itemStack = player.inventory.getCurrentItem();
// BExplosives.yinZha(this.worldObj, this.xCoord, this.yCoord,
// this.zCoord, this.haoMa, 0);
// ICBMExplosion.itYaoKong.onProvide(ElectricityPack.getFromWatts(1500.0,
// ICBMExplosion.itYaoKong.getVoltage(itemStack)), itemStack);
// }
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
NBTTagCompound nbt = pkt.func_148857_g();

View File

@ -205,8 +205,6 @@ public abstract class ZhaPin implements ITier, IExplosive {
));
}
// TODO: WTF
// dynamic typing 2.0
@SideOnly(Side.CLIENT)
public Object[] getRenderData() {
return null;

View File

@ -61,8 +61,6 @@ public class ExCondensed extends ZhaPin {
final Block block
= worldObj.getBlock(var19, var20, var21);
System.out.println("AAAAAAAAAAAALEC: " + var19 + " " + var20 + " " + var21);
if (block != Blocks.air) {
var14 -= (block.getExplosionResistance(
explosionSource,

View File

@ -106,7 +106,7 @@ public class ExNuclear extends ExThr {
targetPosition.intZ()
);
if (block == Blocks.air) {
if (block != Blocks.air) {
targetPosition.setBlock(worldObj, Blocks.air);
block.onBlockDestroyedByExplosion(
thread.world,

View File

@ -1,6 +1,5 @@
package icbm.zhapin.zhapin.ex;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import icbm.core.MainBase;
import icbm.zhapin.zhapin.ZhaPin;
import net.minecraft.block.Block;
@ -40,13 +39,8 @@ public class ExRejuvenation extends ZhaPin {
final WorldServer worldServer = (WorldServer) worldObj;
final ChunkProviderServer chunkProviderServer
= worldServer.theChunkProviderServer;
// TODO: WTF!!
final IChunkProvider chunkProviderGenerate
= (IChunkProvider) ObfuscationReflectionHelper.getPrivateValue(
(Class) ChunkProviderServer.class,
(Object) chunkProviderServer,
new String[] { "currentChunkProvider", "d", "field_73246_d" }
);
= chunkProviderServer.currentChunkProvider;
final Chunk newChunk = chunkProviderGenerate.provideChunk(
oldChunk.xPosition, oldChunk.zPosition
);
@ -62,7 +56,7 @@ public class ExRejuvenation extends ZhaPin {
z + oldChunk.zPosition * 16,
block,
metadata,
2
3
);
final TileEntity tileEntity
= newChunk.getTileEntityUnsafe(x, y, z);

View File

@ -98,7 +98,7 @@ public class ExThermobaric extends ExThr {
targetPosition.intX(), targetPosition.intY(), targetPosition.intZ()
);
if (block == Blocks.air) {
if (block != Blocks.air) {
try {
worldObj.setBlock(
targetPosition.intX(),

View File

@ -65,7 +65,7 @@ public class ThrSheXian extends Thread {
targetPosition.intZ()
);
if (block == Blocks.air) {
if (block != Blocks.air) {
float resistance = 0.0f;
if (block == Blocks.bedrock) {

View File

@ -1,2 +1,3 @@
public net.minecraft.entity.EntityLivingBase field_70713_bf # activePotionsMap
public net.minecraft.client.particle.EntityPortalFX field_70571_a # portalParticleScale
public-f net.minecraft.entity.EntityLivingBase func_110138_aP()F # getMaxHealth