mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
playing DOOM on my gucci smart toilet
This commit is contained in:
parent
3e35f0ac47
commit
ef5059a9a6
16
changelog
16
changelog
@ -6,6 +6,18 @@
|
||||
* Pretty
|
||||
* Automatically walls off connected solid blocks in addition to the direction it was placed in
|
||||
* Some other wooden blocks like a roof, ceiling and scaffold
|
||||
* Flow control pump
|
||||
* The fluid equivalent to a diode
|
||||
* Supports up to 10,000mB/t
|
||||
* Unlike the diode, it is configured via GUI
|
||||
* Can be shut off with redstone like a fluid valve
|
||||
* Charge thrower
|
||||
* A new weapon/tool
|
||||
* Can fire two tiers of demolition charges or a grappling hook
|
||||
* The grappling hook's line can be controlled via left and right mouse buttons
|
||||
* Anti-materiel rifle
|
||||
* Fires 12.7mm of fun
|
||||
* x5 magnification scope
|
||||
|
||||
## Changed
|
||||
* Increased bayonet damage from 5 to 7.5 hearts
|
||||
@ -22,6 +34,7 @@
|
||||
* Dismantling different variants yields different drops
|
||||
* Magnetic extraction can no longer be performed
|
||||
* `isItemBlacklisted` on the item hazard checks now employs caching instead of doing a full ore dictionary lookup for every single check, this should make it marginally more performant
|
||||
* The unfinished trains stuff is no longer listed in the creative tabs
|
||||
|
||||
## Fixed
|
||||
* Fixed RoR controller having the wrong recipe
|
||||
@ -29,4 +42,5 @@
|
||||
* Fixed skeletons and pedestals allowing blocks to be placed inside the player
|
||||
* Fixed artillery shells not playing the explosion animation when directly impacting entities
|
||||
* Fixed bauxite and malachite vein toggles being on backwards
|
||||
* Fixed penumatic tube order settings not saving
|
||||
* Fixed pneumatic tube order settings not saving
|
||||
* Fixed crash caused by launching ABMs with blank target designators
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=5320
|
||||
mod_build_number=5334
|
||||
|
||||
credits=HbMinecraft,\
|
||||
\ rodolphito (explosion algorithms),\
|
||||
|
||||
@ -794,6 +794,7 @@ public class ModBlocks {
|
||||
public static Block fluid_duct_exhaust;
|
||||
public static Block fluid_valve;
|
||||
public static Block fluid_switch;
|
||||
public static Block fluid_pump;
|
||||
public static Block machine_drain;
|
||||
public static Block radio_torch_sender;
|
||||
public static Block radio_torch_receiver;
|
||||
@ -1925,6 +1926,7 @@ public class ModBlocks {
|
||||
fluid_duct_gauge = new FluidDuctGauge().setBlockName("fluid_duct_gauge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
fluid_valve = new FluidValve(Material.iron).setBlockName("fluid_valve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
fluid_switch = new FluidSwitch(Material.iron).setBlockName("fluid_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
fluid_pump = new FluidPump(Material.iron).setBlockName("fluid_pump").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_drain = new MachineDrain(Material.iron).setBlockName("machine_drain").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":concrete");
|
||||
radio_torch_sender = new RadioTorchSender().setBlockName("radio_torch_sender").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
radio_torch_receiver = new RadioTorchReceiver().setBlockName("radio_torch_receiver").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
@ -2173,15 +2175,15 @@ public class ModBlocks {
|
||||
rail_booster = new RailBooster().setBlockName("rail_booster").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_booster");
|
||||
rail_narrow_straight = new RailNarrowStraight().setBlockName("rail_narrow_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
||||
rail_narrow_curve = new RailNarrowCurve().setBlockName("rail_narrow_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
||||
rail_large_straight = new RailStandardStraight().setBlockName("rail_large_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_straight_short = new RailStandardStraightShort().setBlockName("rail_large_straight_short").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve = new RailStandardCurveBase().setBlockName("rail_large_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve_7 = new RailStandardCurveWide7().setBlockName("rail_large_curve_7").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve_9 = new RailStandardCurveWide9().setBlockName("rail_large_curve_9").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_ramp = new RailStandardRamp().setBlockName("rail_large_ramp").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_buffer = new RailStandardBuffer().setBlockName("rail_large_buffer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_buffer");
|
||||
rail_large_switch = new RailStandardSwitch().setBlockName("rail_large_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_switch_flipped = new RailStandardSwitchFlipped().setBlockName("rail_large_switch_flipped").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_straight = new RailStandardStraight().setBlockName("rail_large_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_straight_short = new RailStandardStraightShort().setBlockName("rail_large_straight_short").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve = new RailStandardCurveBase().setBlockName("rail_large_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve_7 = new RailStandardCurveWide7().setBlockName("rail_large_curve_7").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve_9 = new RailStandardCurveWide9().setBlockName("rail_large_curve_9").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_ramp = new RailStandardRamp().setBlockName("rail_large_ramp").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_buffer = new RailStandardBuffer().setBlockName("rail_large_buffer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_buffer");
|
||||
rail_large_switch = new RailStandardSwitch().setBlockName("rail_large_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_switch_flipped = new RailStandardSwitchFlipped().setBlockName("rail_large_switch_flipped").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
|
||||
crate = new BlockCrate(Material.wood).setBlockName("crate").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate");
|
||||
crate_weapon = new BlockCrate(Material.wood).setBlockName("crate_weapon").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate_weapon");
|
||||
@ -3192,6 +3194,7 @@ public class ModBlocks {
|
||||
register(fluid_duct_gauge);
|
||||
register(fluid_valve);
|
||||
register(fluid_switch);
|
||||
register(fluid_pump);
|
||||
register(machine_drain);
|
||||
register(radio_torch_sender);
|
||||
register(radio_torch_receiver);
|
||||
|
||||
314
src/main/java/com/hbm/blocks/network/FluidPump.java
Normal file
314
src/main/java/com/hbm/blocks/network/FluidPump.java
Normal file
@ -0,0 +1,314 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toserver.NBTControlPacket;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.world.gen.INBTTransformable;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2.ConnectionPriority;
|
||||
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class FluidPump extends BlockContainer implements INBTTransformable, ILookOverlay, IGUIProvider {
|
||||
|
||||
public FluidPump(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityFluidPump();
|
||||
}
|
||||
|
||||
@Override public int getRenderType() { return -1; }
|
||||
@Override public boolean isOpaqueCube() { return false; }
|
||||
@Override public boolean renderAsNormalBlock() { return false; }
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float fX, float fY, float fZ) {
|
||||
|
||||
if(!player.isSneaking()) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IItemFluidIdentifier) {
|
||||
IItemFluidIdentifier id = (IItemFluidIdentifier) player.getHeldItem().getItem();
|
||||
FluidType type = id.getType(world, x, y, z, player.getHeldItem());
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile instanceof TileEntityFluidPump) {
|
||||
if(!world.isRemote) {
|
||||
TileEntityFluidPump pump = (TileEntityFluidPump) tile;
|
||||
pump.tank[0].setTankType(type);
|
||||
pump.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(world.isRemote) FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override @SideOnly(Side.CLIENT)
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { return new GUIPump((TileEntityFluidPump) world.getTileEntity(x, y, z)); }
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; }
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(!(tile instanceof TileEntityFluidPump)) return;
|
||||
TileEntityFluidPump pump = (TileEntityFluidPump) tile;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + pump.tank[0].getTankType().getLocalizedName() + " (" + pump.tank[0].getPressure() + " PU): " + BobMathUtil.format(pump.bufferSize) + "mB/t" + EnumChatFormatting.RED + " ->");
|
||||
text.add("Priority: " + EnumChatFormatting.YELLOW + pump.priority.name());
|
||||
if(pump.tank[0].getFill() > 0) text.add(BobMathUtil.format(pump.tank[0].getFill()) + "mB buffered");
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int transformMeta(int meta, int coordBaseMode) {
|
||||
return INBTTransformable.transformMetaDeco(meta, coordBaseMode);
|
||||
}
|
||||
|
||||
public static class TileEntityFluidPump extends TileEntityLoadedBase implements IFluidStandardTransceiverMK2, IControlReceiver {
|
||||
|
||||
public int bufferSize = 100;
|
||||
public FluidTank[] tank;
|
||||
public ConnectionPriority priority = ConnectionPriority.NORMAL;
|
||||
public boolean redstone = false;
|
||||
|
||||
public TileEntityFluidPump() {
|
||||
this.tank = new FluidTank[1];
|
||||
this.tank[0] = new FluidTank(Fluids.NONE, bufferSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
// if the capacity were changed directly, any excess buffered fluid would be destroyed
|
||||
// when running a closed loop or handling hard to get fluids, that's quite bad
|
||||
if(this.bufferSize != this.tank[0].getMaxFill()) {
|
||||
int nextBuffer = Math.max(this.tank[0].getFill(), this.bufferSize);
|
||||
this.tank[0].changeTankSize(nextBuffer);
|
||||
}
|
||||
|
||||
this.redstone = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord);
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||
ForgeDirection in = dir.getRotation(ForgeDirection.UP);
|
||||
ForgeDirection out = in.getOpposite();
|
||||
|
||||
this.trySubscribe(tank[0].getTankType(), worldObj, xCoord + in.offsetX, yCoord, zCoord + in.offsetZ, in);
|
||||
if(!redstone) this.tryProvide(tank[0], worldObj, xCoord + out.offsetX, yCoord, zCoord + out.offsetZ, out);
|
||||
|
||||
this.networkPackNT(15);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
tank[0].writeToNBT(nbt, "t");
|
||||
nbt.setByte("p", (byte) priority.ordinal());
|
||||
nbt.setInteger("buffer", bufferSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
tank[0].readFromNBT(nbt, "t");
|
||||
priority = EnumUtil.grabEnumSafely(ConnectionPriority.class, nbt.getByte("p"));
|
||||
bufferSize = nbt.getInteger("buffer");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
tank[0].serialize(buf);
|
||||
buf.writeByte((byte) priority.ordinal());
|
||||
buf.writeInt(bufferSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
tank[0].deserialize(buf);
|
||||
priority = EnumUtil.grabEnumSafely(ConnectionPriority.class, buf.readByte());
|
||||
bufferSize = buf.readInt();
|
||||
}
|
||||
|
||||
@Override public ConnectionPriority getFluidPriority() { return priority; }
|
||||
@Override public FluidTank[] getSendingTanks() { return redstone ? new FluidTank[0] : tank; }
|
||||
@Override public FluidTank[] getReceivingTanks() { return this.bufferSize < this.tank[0].getFill() ? new FluidTank[0] : tank; }
|
||||
@Override public FluidTank[] getAllTanks() { return tank; }
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(EntityPlayer player) {
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 128;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveControl(NBTTagCompound data) {
|
||||
if(data.hasKey("capacity")) {
|
||||
this.bufferSize = MathHelper.clamp_int(data.getInteger("capacity"), 0, 10_000);
|
||||
}
|
||||
if(data.hasKey("pressure")) {
|
||||
this.tank[0].withPressure(MathHelper.clamp_int(data.getByte("pressure"), 0, 5));
|
||||
}
|
||||
if(data.hasKey("priority")) {
|
||||
priority = EnumUtil.grabEnumSafely(ConnectionPriority.class, data.getByte("priority"));
|
||||
}
|
||||
|
||||
this.markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public static class GUIPump extends GuiScreen {
|
||||
|
||||
protected final TileEntityFluidPump pump;
|
||||
|
||||
private GuiTextField textPlacementPriority;
|
||||
private GuiButton buttonPressure;
|
||||
private GuiButton buttonPriority;
|
||||
private int pressure;
|
||||
private int priority;
|
||||
|
||||
public GUIPump(TileEntityFluidPump pump) {
|
||||
this.pump = pump;
|
||||
this.pressure = pump.tank[0].getPressure();
|
||||
this.priority = pump.priority.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
Keyboard.enableRepeatEvents(true);
|
||||
|
||||
textPlacementPriority = new GuiTextField(fontRendererObj, this.width / 2 - 150, 100, 90, 20);
|
||||
textPlacementPriority.setText("" + pump.bufferSize);
|
||||
textPlacementPriority.setMaxStringLength(5);
|
||||
|
||||
buttonPressure = new GuiButton(0, this.width / 2 - 50, 100, 90, 20, pressure + " PU");
|
||||
|
||||
buttonPriority = new GuiButton(1, this.width / 2 + 50, 100, 90, 20, pump.priority.name());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
drawDefaultBackground();
|
||||
|
||||
drawString(fontRendererObj, "Throughput:", this.width / 2 - 150, 80, 0xA0A0A0);
|
||||
drawString(fontRendererObj, "(max. 10,000mB)", this.width / 2 - 150, 90, 0xA0A0A0);
|
||||
textPlacementPriority.drawTextBox();
|
||||
|
||||
drawString(fontRendererObj, "Pressure:", this.width / 2 - 50, 80, 0xA0A0A0);
|
||||
buttonPressure.drawButton(mc, mouseX, mouseY);
|
||||
|
||||
drawString(fontRendererObj, "Priority:", this.width / 2 + 50, 80, 0xA0A0A0);
|
||||
buttonPriority.drawButton(mc, mouseX, mouseY);
|
||||
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGuiClosed() {
|
||||
Keyboard.enableRepeatEvents(false);
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
data.setByte("pressure", (byte) pressure);
|
||||
data.setByte("priority", (byte) priority);
|
||||
|
||||
try { data.setInteger("capacity", Integer.parseInt(textPlacementPriority.getText())); } catch(Exception ex) {}
|
||||
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, pump.xCoord, pump.yCoord, pump.zCoord));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char typedChar, int keyCode) {
|
||||
super.keyTyped(typedChar, keyCode);
|
||||
if(textPlacementPriority.textboxKeyTyped(typedChar, keyCode)) return;
|
||||
|
||||
if(keyCode == 1 || keyCode == this.mc.gameSettings.keyBindInventory.getKeyCode()) {
|
||||
this.mc.thePlayer.closeScreen();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
||||
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
textPlacementPriority.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
|
||||
if(buttonPressure.mousePressed(mc, mouseX, mouseY)) {
|
||||
this.pressure++;
|
||||
if(pressure > 5) pressure = 0;
|
||||
buttonPressure.displayString = pressure + " PU";
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
|
||||
if(buttonPriority.mousePressed(mc, mouseX, mouseY)) {
|
||||
this.priority++;
|
||||
if(priority >= ConnectionPriority.values().length) priority = 0;
|
||||
buttonPriority.displayString = EnumUtil.grabEnumSafely(ConnectionPriority.class, priority).name();
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
}
|
||||
|
||||
@Override public boolean doesGuiPauseGame() { return false; }
|
||||
}
|
||||
}
|
||||
@ -79,6 +79,7 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_g3_zebra, 1), new Object[] { " M ", "MPM", " M ", 'M', BIGMT.mechanism(), 'P', ModItems.gun_g3 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "BBB", "PGM", 'B', WEAPONSTEEL.heavyBarrel(), 'P', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'G', WEAPONSTEEL.grip(), 'M', WEAPONSTEEL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_chemthrower, 1), new Object[] { "MHW", "PSS", 'M', WEAPONSTEEL.mechanism(), 'H', RUBBER.pipe(), 'W', ModItems.wrench, 'P', WEAPONSTEEL.heavyBarrel(), 'S', WEAPONSTEEL.shell() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_amat, 1), new Object[] { " C ", "BRS", " MG", 'G', WOOD.grip(), 'B', FERRO.heavyBarrel(), 'R', FERRO.heavyReceiver(), 'M', WEAPONSTEEL.mechanism(), 'C', DictFrame.fromOne(ModItems.weapon_mod_special, EnumModSpecial.SCOPE), 'S', WOOD.stock() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_m2, 1), new Object[] { " G", "BRM", " G", 'G', WOOD.grip(), 'B', FERRO.heavyBarrel(), 'R', FERRO.heavyReceiver(), 'M', WEAPONSTEEL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_autoshotgun, 1), new Object[] { "BRM", "G G", 'B', FERRO.heavyBarrel(), 'R', FERRO.heavyReceiver(), 'M', WEAPONSTEEL.mechanism(), 'G', ANY_PLASTIC.grip() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_autoshotgun_shredder, 1), new Object[] { " M ", "MAM", " M ", 'M', BIGMT.mechanism(), 'A', ModItems.gun_autoshotgun });
|
||||
|
||||
@ -1468,6 +1468,7 @@ public class ModItems {
|
||||
public static Item gun_g3_zebra;
|
||||
public static Item gun_stinger;
|
||||
public static Item gun_chemthrower;
|
||||
public static Item gun_amat;
|
||||
public static Item gun_m2;
|
||||
public static Item gun_autoshotgun;
|
||||
public static Item gun_autoshotgun_shredder;
|
||||
@ -6418,6 +6419,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_g3_zebra, gun_g3_zebra.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_stinger, gun_stinger.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_chemthrower, gun_chemthrower.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_amat, gun_amat.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_m2, gun_m2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_autoshotgun, gun_autoshotgun.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_autoshotgun_shredder, gun_autoshotgun_shredder.getUnlocalizedName());
|
||||
|
||||
@ -13,7 +13,6 @@ import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -24,7 +23,7 @@ public class ItemTrain extends ItemEnumMulti {
|
||||
|
||||
public ItemTrain() {
|
||||
super(EnumTrainType.class, true, true);
|
||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
||||
this.setCreativeTab(null);//CreativeTabs.tabTransport);
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
|
||||
@ -70,6 +70,7 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_g3_zebra, new ItemRenderG3(ResourceManager.g3_zebra_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_stinger, new ItemRenderStinger());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_chemthrower, new ItemRenderChemthrower());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_amat, new ItemRenderAmat());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_m2, new ItemRenderM2());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_autoshotgun, new ItemRenderShredder(ResourceManager.shredder_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_autoshotgun_shredder, new ItemRenderShredder(ResourceManager.shredder_orig_tex));
|
||||
@ -254,6 +255,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_g3_zebra) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_stinger) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_chemthrower) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_amat) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_m2) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_autoshotgun) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_autoshotgun_shredder) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
@ -836,6 +836,56 @@ public class Orchestras {
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_AMAT = (stack, ctx) -> {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
if(entity.worldObj.isRemote) return;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == AnimType.EQUIP) {
|
||||
if(timer == 10) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 0.5F, 1.25F);
|
||||
if(timer == 15) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 0.5F, 1.25F);
|
||||
}
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 7) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
|
||||
if(timer == 16) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
|
||||
if(timer == 12) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity,
|
||||
0.375, aiming ? 0 : -0.125, -0.25D,
|
||||
-0.05, 0.2, -0.025,
|
||||
0.01, -10F + (float) entity.getRNG().nextGaussian() * 10F, (float) entity.getRNG().nextGaussian() * 12.5F, casing.getName(), true, 60, 0.5D, 10);
|
||||
}
|
||||
}
|
||||
|
||||
if(type == AnimType.CYCLE_DRY) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 0.75F);
|
||||
if(timer == 7) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
|
||||
if(timer == 16) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
|
||||
}
|
||||
|
||||
if(type == AnimType.RELOAD) {
|
||||
if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magRemove", 1F, 1F);
|
||||
if(timer == 20) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magInsert", 1F, 1F);
|
||||
if(timer == 32) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
|
||||
if(timer == 41) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
|
||||
}
|
||||
|
||||
if(type == AnimType.JAMMED) {
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
|
||||
if(timer == 12) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
|
||||
if(timer == 16) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
|
||||
if(timer == 23) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
|
||||
}
|
||||
|
||||
if(type == AnimType.INSPECT) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 0.5F, 1F);
|
||||
if(timer == 45) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 0.5F, 1F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_M2 = (stack, ctx) -> {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
if(entity.worldObj.isRemote) return;
|
||||
|
||||
@ -15,6 +15,7 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineBelt;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
@ -54,6 +55,17 @@ public class XFactory50 {
|
||||
bmg50_he = new BulletConfig().setItem(EnumAmmo.BMG50_HE).setCasing(EnumCasingType.LARGE_STEEL, 12).setWear(3F).setDoesPenetrate(true).setDamageFalloffByPen(false).setDamage(1.75F).setOnImpact(LAMBDA_STANDARD_EXPLODE)
|
||||
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("bmg50he"));
|
||||
|
||||
ModItems.gun_amat = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(350).draw(20).inspect(50).crosshair(Crosshair.CIRCLE).scopeTexture(XFactory44.scope_lilmac).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(30F).delay(25).dry(25).spreadHipfire(0.05F).reload(51).jam(43).sound("hbm:weapon.fire.amat", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 7).addConfigs(bmg50_sp, bmg50_fmj, bmg50_jhp, bmg50_ap, bmg50_du, bmg50_he))
|
||||
.offset(1, -0.0625 * 1.5, -0.25D)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_AMAT))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_AMAT_ANIMS).orchestra(Orchestras.ORCHESTRA_AMAT)
|
||||
).setUnlocalizedName("gun_amat");
|
||||
|
||||
ModItems.gun_m2 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(3_000).draw(10).inspect(31).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
@ -70,10 +82,52 @@ public class XFactory50 {
|
||||
Lego.handleStandardSmoke(ctx.entity, stack, 2000, 0.05D, 1.1D, 0);
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_AMAT = (stack, ctx) -> {
|
||||
ItemGunBaseNT.setupRecoil(12.5F, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1));
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_M2 = (stack, ctx) -> {
|
||||
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5), (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5));
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_AMAT_ANIMS = (stack, type) -> {
|
||||
double turn = -60;
|
||||
double pullAmount = -2.5;
|
||||
double side = 4;
|
||||
double down = -2;
|
||||
double detach = 0.5;
|
||||
double apex = 7;
|
||||
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL))
|
||||
.addBus("BIPOD", new BusAnimationSequence().hold(500).addPos(80, 0, 0, 350).addPos(80, 25, 0, 150));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -0.5, 50, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL))
|
||||
.addBus("BOLT_TURN", new BusAnimationSequence().hold(250).addPos(0, 0, turn, 150).hold(700).addPos(0, 0, 0, 150))
|
||||
.addBus("BOLT_PULL", new BusAnimationSequence().hold(350).addPos(0, 0, pullAmount, 250, IType.SIN_UP).hold(250).addPos(0, 0, 0, 200, IType.LINEAR))
|
||||
.addBus("LIFT", new BusAnimationSequence().hold(600).addPos(-3, 0, 0, 150, IType.SIN_DOWN).hold(300).addPos(0, 0, 0, 250, IType.SIN_FULL));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("BOLT_TURN", new BusAnimationSequence().hold(250).addPos(0, 0, turn, 150).hold(700).addPos(0, 0, 0, 150))
|
||||
.addBus("BOLT_PULL", new BusAnimationSequence().hold(350).addPos(0, 0, pullAmount, 250, IType.SIN_UP).hold(250).addPos(0, 0, 0, 200, IType.LINEAR))
|
||||
.addBus("LIFT", new BusAnimationSequence().hold(600).addPos(-3, 0, 0, 150, IType.SIN_DOWN).hold(300).addPos(0, 0, 0, 250, IType.SIN_FULL));
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, -10, 0, 350, IType.SIN_UP).addPos(0, 0, 0, 650, IType.SIN_UP))
|
||||
.addBus("LIFT", new BusAnimationSequence().hold(1000).addPos(-2, 0, 0, 150, IType.SIN_DOWN).addPos(0, 0, 0, 250, IType.SIN_FULL).hold(450).addPos(-3, 0, 0, 150, IType.SIN_DOWN).hold(300).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("BOLT_TURN", new BusAnimationSequence().hold(1500).addPos(0, 0, turn, 150).hold(700).addPos(0, 0, 0, 150))
|
||||
.addBus("BOLT_PULL", new BusAnimationSequence().hold(1600).addPos(0, 0, pullAmount, 250, IType.SIN_UP).hold(250).addPos(0, 0, 0, 200, IType.LINEAR));
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("LIFT", new BusAnimationSequence().hold(250).addPos(-15, 0, 0, 500, IType.SIN_FULL).holdUntil(1650).addPos(0, 0, 0, 500, IType.SIN_FULL))
|
||||
.addBus("BOLT_TURN", new BusAnimationSequence().hold(250).addPos(0, 0, turn, 150).holdUntil(1250).addPos(0, 0, 0, 150))
|
||||
.addBus("BOLT_PULL", new BusAnimationSequence().hold(350).addPos(0, 0, pullAmount, 250, IType.SIN_UP).addPos(0, 0, 0, 200, IType.LINEAR).addPos(0, 0, pullAmount, 250, IType.SIN_UP).addPos(0, 0, 0, 200, IType.LINEAR));
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("SCOPE_THROW", new BusAnimationSequence().addPos(0, detach, 0, 100, IType.SIN_FULL).addPos(side, down, 0, 500, IType.SIN_FULL).addPos(side, down - 0.5, 0, 100).addPos(side, apex, 0, 350, IType.SIN_FULL).addPos(side, down - 0.5, 0, 350, IType.SIN_DOWN).addPos(side, down, 0, 100).hold(250).addPos(0, detach, 0, 500, IType.SIN_FULL).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("SCOPE_SPIN", new BusAnimationSequence().hold(700).addPos(-360, 0, 0, 700));
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_M2_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
|
||||
@ -92,6 +92,7 @@ public class WeaponModManager {
|
||||
ModItems.gun_stinger,
|
||||
ModItems.gun_chemthrower };
|
||||
Item[] ferroGuns = new Item[] {
|
||||
ModItems.gun_amat,
|
||||
ModItems.gun_m2,
|
||||
ModItems.gun_autoshotgun, ModItems.gun_autoshotgun_shredder,
|
||||
ModItems.gun_quadro };
|
||||
@ -126,7 +127,7 @@ public class WeaponModManager {
|
||||
new WeaponModDefinition(EnumModGeneric.BRONZE_DURA).addMod(bronzeGuns, new WeaponModGenericDurability(117));
|
||||
|
||||
new WeaponModDefinition(EnumModSpecial.SPEEDLOADER).addMod(ModItems.gun_liberator, new WeaponModLiberatorSpeedloader(200));
|
||||
new WeaponModDefinition(EnumModSpecial.SILENCER).addMod(new Item[] {ModItems.gun_am180, ModItems.gun_uzi, ModItems.gun_uzi_akimbo, ModItems.gun_g3}, new WeaponModSilencer(ID_SILENCER));
|
||||
new WeaponModDefinition(EnumModSpecial.SILENCER).addMod(new Item[] {ModItems.gun_am180, ModItems.gun_uzi, ModItems.gun_uzi_akimbo, ModItems.gun_g3, ModItems.gun_amat}, new WeaponModSilencer(ID_SILENCER));
|
||||
new WeaponModDefinition(EnumModSpecial.SCOPE).addMod(new Item[] {ModItems.gun_heavy_revolver, ModItems.gun_g3, ModItems.gun_mas36, ModItems.gun_charge_thrower}, new WeaponModScope(ID_SCOPE));
|
||||
new WeaponModDefinition(EnumModSpecial.SAW)
|
||||
.addMod(new Item[] {ModItems.gun_maresleg, ModItems.gun_double_barrel}, new WeaponModSawedOff(ID_SAWED_OFF))
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -14,6 +15,7 @@ public class WeaponModSilencer extends WeaponModBase {
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(key == Receiver.S_FIRESOUND) {
|
||||
if(gun.getItem() == ModItems.gun_amat) return (T) "hbm:weapon.silencerShoot";
|
||||
return (T) "hbm:weapon.fire.silenced";
|
||||
}
|
||||
|
||||
|
||||
@ -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 (5320)";
|
||||
public static final String VERSION = "1.0.27 BETA (5334)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.blocks.machine.Floodlight.TileEntityFloodlight;
|
||||
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
|
||||
import com.hbm.blocks.machine.PistonInserter.TileEntityPistonInserter;
|
||||
import com.hbm.blocks.machine.WatzPump.TileEntityWatzPump;
|
||||
import com.hbm.blocks.network.FluidPump.TileEntityFluidPump;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.cart.EntityMinecartCrate;
|
||||
import com.hbm.entity.cart.EntityMinecartNTM;
|
||||
@ -347,6 +348,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineSolderingStation.class, new RenderSolderingStation());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineArcFurnaceLarge.class, new RenderArcFurnace());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineWoodBurner.class, new RenderWoodBurner());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFluidPump.class, new RenderFluidPump());
|
||||
//Foundry
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryBasin.class, new RenderFoundry());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryMold.class, new RenderFoundry());
|
||||
|
||||
@ -482,7 +482,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_highspeed, 16), new Object[] { "S S", "SIS", "S S", 'S', STEEL.ingot(), 'I', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_booster, 6), new Object[] { "S S", "CIC", "SRS", 'S', STEEL.ingot(), 'I', IRON.plate(), 'R', MINGRADE.ingot(), 'C', ModItems.coil_copper });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_straight, 4), new Object[] { "B B", "SSS", "W W", 'B', ModItems.bolt_spike, 'S', ModBlocks.steel_beam, 'W', KEY_SLAB });
|
||||
/*addRecipeAuto(new ItemStack(ModBlocks.rail_large_straight, 4), new Object[] { "B B", "SSS", "W W", 'B', ModItems.bolt_spike, 'S', ModBlocks.steel_beam, 'W', KEY_SLAB });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.rail_large_straight, 1), new Object[] { ModBlocks.rail_large_straight_short, ModBlocks.rail_large_straight_short, ModBlocks.rail_large_straight_short, ModBlocks.rail_large_straight_short, ModBlocks.rail_large_straight_short });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.rail_large_straight_short, 5), new Object[] { ModBlocks.rail_large_straight });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_buffer, 1), new Object[] { " S", "RS", 'R', ModBlocks.rail_large_straight, 'S', STEEL.ingot() });
|
||||
@ -492,7 +492,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_ramp, 1), new Object[] { " R ", "SSS", 'R', ModBlocks.rail_large_straight, 'S', KEY_SLAB });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_switch, 1), new Object[] { "R R", " RR", " R", 'R', ModBlocks.rail_large_straight });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.rail_large_switch), new Object[] { ModBlocks.rail_large_switch_flipped });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.rail_large_switch_flipped), new Object[] { ModBlocks.rail_large_switch });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.rail_large_switch_flipped), new Object[] { ModBlocks.rail_large_switch });*/
|
||||
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.bomb_multi), 1), new Object[] { "AAD", "CHF", "AAD", 'A', AL.wireFine(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'H', AL.shell(), 'F', ModItems.fins_quad_titanium, 'D', KEY_WHITE });
|
||||
addShapelessAuto(new ItemStack(ModItems.powder_ice, 4), new Object[] { Items.snowball, KNO.dust(), REDSTONE.dust() });
|
||||
@ -607,6 +607,7 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModBlocks.fluid_duct_gauge), new Object[] { ModBlocks.fluid_duct_paintable, STEEL.ingot(), DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_valve, 1), new Object[] { "S", "W", 'S', Blocks.lever, 'W', ModBlocks.fluid_duct_paintable });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_switch, 1), new Object[] { "S", "W", 'S', REDSTONE.dust(), 'W', ModBlocks.fluid_duct_paintable });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_pump, 1), new Object[] { " S ", "PGP", "IMI", 'S', STEEL.shell(), 'P', STEEL.pipe(), 'G', GRAPHITE.ingot(), 'I', STEEL.ingot(), 'M', ModItems.motor });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.pneumatic_tube, 8), new Object[] { "CRC", 'C', CU.plateCast(), 'R', ANY_RUBBER.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.pneumatic_tube, 24), new Object[] { "CRC", 'C', CU.plateWelded(), 'R', ANY_RUBBER.ingot() });
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ import com.hbm.util.Clock;
|
||||
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.WorldTickEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -54,6 +55,9 @@ public class ModEventHandlerRenderer {
|
||||
|
||||
private static ModelMan manlyModel;
|
||||
private static boolean[] partsHidden = new boolean[7];
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderTickPre(TickEvent.RenderTickEvent event) { }
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST, receiveCanceled = true)
|
||||
public void onRenderPlayerPre(RenderPlayerEvent.Pre event) {
|
||||
|
||||
@ -391,6 +391,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom pylon_medium = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/network/pylon_medium.obj"));
|
||||
public static final IModelCustom pylon_large = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/network/pylon_large.obj"));
|
||||
public static final IModelCustom substation = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/network/substation.obj"));
|
||||
public static final IModelCustom fluid_pump = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/network/fluid_diode.obj"));
|
||||
|
||||
//Radiolysis
|
||||
public static final IModelCustom radiolysis = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/radiolysis.obj"));
|
||||
@ -818,6 +819,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation substation_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/substation.png");
|
||||
public static final ResourceLocation wire_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/wire.png");
|
||||
public static final ResourceLocation wire_greyscale_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/wire_greyscale.png");
|
||||
public static final ResourceLocation fluid_pump_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/fluid_diode.png");
|
||||
|
||||
//Radiolysis
|
||||
public static final ResourceLocation radiolysis_tex = new ResourceLocation(RefStrings.MODID, "textures/models/radiolysis.png");
|
||||
@ -874,6 +876,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom g3 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/g3.obj")).asVBO();
|
||||
public static final IModelCustom stinger = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/stinger.obj")).asVBO();
|
||||
public static final IModelCustom chemthrower = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/chemthrower.obj")).asVBO();
|
||||
public static final IModelCustom amat = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/amat.obj")).asVBO();
|
||||
public static final IModelCustom m2 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/m2_browning.obj")).asVBO();
|
||||
public static final IModelCustom shredder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/shredder.obj")).asVBO();
|
||||
public static final IModelCustom quadro = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/quadro.obj")).asVBO();
|
||||
@ -994,6 +997,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation g3_green_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3_polymer_green.png");
|
||||
public static final ResourceLocation g3_black_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3_polymer_black.png");
|
||||
public static final ResourceLocation g3_attachments = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3_attachments.png");
|
||||
public static final ResourceLocation amat_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/amat.png");
|
||||
public static final ResourceLocation shredder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/shredder.png");
|
||||
public static final ResourceLocation shredder_orig_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/shredder_orig.png");
|
||||
public static final ResourceLocation sexy_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/sexy.png");
|
||||
|
||||
@ -0,0 +1,207 @@
|
||||
package com.hbm.render.item.weapon.sedna;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderAmat extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.5F; }
|
||||
|
||||
@Override
|
||||
public float getViewFOV(ItemStack stack, float fov) {
|
||||
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
|
||||
return fov * (1 - aimingProgress * (isScoped(stack) ? 0.8F : 0.33F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
|
||||
standardAimingTransform(stack,
|
||||
-1F * offset, -1F * offset, 3.25F * offset,
|
||||
0, -4.875 / 8D, 1.875);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
boolean isScoped = isScoped(stack);
|
||||
if(isScoped && ItemGunBaseNT.prevAimingProgress == 1 && ItemGunBaseNT.aimingProgress == 1) return;
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.amat_tex);
|
||||
double scale = 0.375D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
boolean deployed = HbmAnimations.getRelevantAnim(0) == null || HbmAnimations.getRelevantAnim(0).animation.getBus("BIPOD") == null;
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] bipod = HbmAnimations.getRelevantTransformation("BIPOD");
|
||||
double[] lift = HbmAnimations.getRelevantTransformation("LIFT");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] boltTurn = HbmAnimations.getRelevantTransformation("BOLT_TURN");
|
||||
double[] boltPull = HbmAnimations.getRelevantTransformation("BOLT_PULL");
|
||||
double[] mag = HbmAnimations.getRelevantTransformation("MAG");
|
||||
double[] scopeThrow = HbmAnimations.getRelevantTransformation("SCOPE_THROW");
|
||||
double[] scopeSpin = HbmAnimations.getRelevantTransformation("SCOPE_SPIN");
|
||||
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
|
||||
GL11.glTranslated(0, -3, -8);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glRotated(lift[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 3, 8);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.amat.renderPart("Gun");
|
||||
|
||||
if(isScoped(stack)) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(scopeThrow[0], scopeThrow[1], scopeThrow[2]);
|
||||
GL11.glTranslated(0, 1.5, -4.5);
|
||||
GL11.glRotated(scopeSpin[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, -1.5, 4.5);
|
||||
ResourceManager.amat.renderPart("Scope");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.625, 0);
|
||||
GL11.glRotated(boltTurn[2], 0, 0, 1);
|
||||
GL11.glTranslated(0, -0.625, 0);
|
||||
GL11.glTranslated(0, 0, boltPull[2]);
|
||||
ResourceManager.amat.renderPart("Bolt");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(mag[0], mag[1], mag[2]);
|
||||
ResourceManager.amat.renderPart("Magazine");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.3125, -0.625, -1);
|
||||
GL11.glRotated(deployed ? 25 : bipod[1], 0, 0, 1);
|
||||
GL11.glTranslated(-0.3125, 0.625, 1);
|
||||
ResourceManager.amat.renderPart("BipodHingeLeft");
|
||||
GL11.glTranslated(0.3125, -0.625, -1);
|
||||
GL11.glRotated(deployed ? 80 : bipod[0], 1, 0, 0);
|
||||
GL11.glTranslated(-0.3125, 0.625, 1);
|
||||
ResourceManager.amat.renderPart("BipodLeft");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-0.3125, -0.625, -1);
|
||||
GL11.glRotated(deployed ? -25 : -bipod[1], 0, 0, 1);
|
||||
GL11.glTranslated(0.3125, 0.625, 1);
|
||||
ResourceManager.amat.renderPart("BipodHingeRight");
|
||||
GL11.glTranslated(-0.3125, -0.625, -1);
|
||||
GL11.glRotated(deployed ? 80 : bipod[0], 1, 0, 0);
|
||||
GL11.glTranslated(0.3125, 0.625, 1);
|
||||
ResourceManager.amat.renderPart("BipodRight");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if(isSilenced(stack)) {
|
||||
GL11.glTranslated(0, 0.625, -4.3125);
|
||||
GL11.glScaled(1.25, 1.25, 1.25);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.g3_attachments);
|
||||
ResourceManager.g3.renderPart("Silencer");
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
} else {
|
||||
ResourceManager.amat.renderPart("MuzzleBrake");
|
||||
|
||||
double smokeScale = 0.5;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.625, 12);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(smokeScale, smokeScale, smokeScale);
|
||||
this.renderSmokeNodes(gun.getConfig(stack, 0).smokeNodes, 1D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.5, 11);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
this.renderGapFlash(gun.lastShot[0]);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
double scale = 1.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, 0.5, 6.75);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
if(isSilenced(stack)) {
|
||||
double scale = 0.8175D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(-0.5, 0.5, -1);
|
||||
} else {
|
||||
double scale = 0.9375D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(-0.5, 0.5, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupModTable(ItemStack stack) {
|
||||
double scale = -5.75D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glTranslated(0, -0.25, -1.5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.amat_tex);
|
||||
ResourceManager.amat.renderPart("Gun");
|
||||
ResourceManager.amat.renderPart("Bolt");
|
||||
ResourceManager.amat.renderPart("Magazine");
|
||||
ResourceManager.amat.renderPart("BipodLeft");
|
||||
ResourceManager.amat.renderPart("BipodHingeLeft");
|
||||
ResourceManager.amat.renderPart("BipodRight");
|
||||
ResourceManager.amat.renderPart("BipodHingeRight");
|
||||
if(isScoped(stack)) ResourceManager.amat.renderPart("Scope");
|
||||
if(isSilenced(stack)) {
|
||||
GL11.glTranslated(0, 0.625, -4.3125);
|
||||
GL11.glScaled(1.25, 1.25, 1.25);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.g3_attachments);
|
||||
ResourceManager.g3.renderPart("Silencer");
|
||||
} else {
|
||||
ResourceManager.amat.renderPart("MuzzleBrake");
|
||||
}
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
public boolean isScoped(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isSilenced(ItemStack stack) {
|
||||
return WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SILENCER);
|
||||
}
|
||||
}
|
||||
59
src/main/java/com/hbm/render/tileentity/RenderFluidPump.java
Normal file
59
src/main/java/com/hbm/render/tileentity/RenderFluidPump.java
Normal file
@ -0,0 +1,59 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderFluidPump extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tile.getBlockMetadata()) {
|
||||
case 2: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.fluid_pump_tex);
|
||||
ResourceManager.fluid_pump.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.fluid_pump);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glScaled(2, 2, 2);
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.fluid_pump_tex);
|
||||
ResourceManager.fluid_pump.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -35,6 +35,7 @@ import com.hbm.blocks.network.CableDiode.TileEntityDiode;
|
||||
import com.hbm.blocks.network.CranePartitioner.TileEntityCranePartitioner;
|
||||
import com.hbm.blocks.network.FluidDuctGauge.TileEntityPipeGauge;
|
||||
import com.hbm.blocks.network.FluidDuctPaintable.TileEntityPipePaintable;
|
||||
import com.hbm.blocks.network.FluidPump.TileEntityFluidPump;
|
||||
import com.hbm.blocks.rail.RailStandardSwitch.TileEntityRailSwitch;
|
||||
import com.hbm.tileentity.bomb.*;
|
||||
import com.hbm.tileentity.deco.*;
|
||||
@ -198,14 +199,6 @@ public class TileMappings {
|
||||
put(TileEntityLantern.class, "tileentity_lantern_ordinary");
|
||||
put(TileEntityLanternBehemoth.class, "tileentity_lantern_behemoth");
|
||||
put(TileEntityStorageDrum.class, "tileentity_waste_storage_drum");
|
||||
put(TileEntityCableBaseNT.class, "tileentity_ohgod"); // what?
|
||||
put(TileEntityCablePaintable.class, "tileentity_cable_paintable");
|
||||
put(TileEntityCableGauge.class, "tileentity_cable_gauge");
|
||||
put(TileEntityPipeBaseNT.class, "tileentity_pipe_base");
|
||||
put(TileEntityPipePaintable.class, "tileentity_pipe_paintable");
|
||||
put(TileEntityPipeGauge.class, "tileentity_pipe_gauge");
|
||||
put(TileEntityPipeExhaust.class, "tileentity_pipe_exhaust");
|
||||
put(TileEntityFluidValve.class, "tileentity_pipe_valve");
|
||||
put(TileEntityMachineBAT9000.class, "tileentity_bat9000");
|
||||
put(TileEntityMachineOrbus.class, "tileentity_orbus");
|
||||
put(TileEntityGlpyhidSpawner.class, "tileentity_glyphid_spawner");
|
||||
@ -402,6 +395,8 @@ public class TileMappings {
|
||||
|
||||
private static void putNetwork() {
|
||||
put(TileEntityCableBaseNT.class, "tileentity_cable", "tileentity_wirecoated");
|
||||
put(TileEntityCablePaintable.class, "tileentity_cable_paintable");
|
||||
put(TileEntityCableGauge.class, "tileentity_cable_gauge");
|
||||
put(TileEntityCableSwitch.class, "tileentity_cable_switch");
|
||||
put(TileEntityDiode.class, "tileentity_cable_diode");
|
||||
|
||||
@ -411,6 +406,13 @@ public class TileMappings {
|
||||
put(TileEntityPylonLarge.class, "tileentity_pylon_large");
|
||||
put(TileEntitySubstation.class, "tileentity_substation");
|
||||
|
||||
put(TileEntityPipeBaseNT.class, "tileentity_pipe_base");
|
||||
put(TileEntityPipePaintable.class, "tileentity_pipe_paintable");
|
||||
put(TileEntityPipeGauge.class, "tileentity_pipe_gauge");
|
||||
put(TileEntityPipeExhaust.class, "tileentity_pipe_exhaust");
|
||||
put(TileEntityFluidValve.class, "tileentity_pipe_valve");
|
||||
put(TileEntityFluidPump.class, "tileentity_pipe_pump");
|
||||
|
||||
put(TileEntityCraneInserter.class, "tileentity_inserter");
|
||||
put(TileEntityCraneExtractor.class, "tileentity_extractor");
|
||||
put(TileEntityCraneGrabber.class, "tileentity_grabber");
|
||||
|
||||
@ -378,17 +378,19 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
||||
|
||||
boolean needsDesignator = needsDesignator(slots[0].getItem());
|
||||
|
||||
int targetX = 0;
|
||||
int targetZ = 0;
|
||||
int targetX = xCoord;
|
||||
int targetZ = zCoord;
|
||||
|
||||
if(slots[1] != null && slots[1].getItem() instanceof IDesignatorItem) {
|
||||
IDesignatorItem designator = (IDesignatorItem) slots[1].getItem();
|
||||
|
||||
if(!designator.isReady(worldObj, slots[1], xCoord, yCoord, zCoord) && needsDesignator) return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
|
||||
Vec3 coords = designator.getCoords(worldObj, slots[1], xCoord, yCoord, zCoord);
|
||||
targetX = (int) Math.floor(coords.xCoord);
|
||||
targetZ = (int) Math.floor(coords.zCoord);
|
||||
if(needsDesignator) {
|
||||
if(!designator.isReady(worldObj, slots[1], xCoord, yCoord, zCoord)) return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
|
||||
Vec3 coords = designator.getCoords(worldObj, slots[1], xCoord, yCoord, zCoord);
|
||||
targetX = (int) Math.floor(coords.xCoord);
|
||||
targetZ = (int) Math.floor(coords.zCoord);
|
||||
}
|
||||
|
||||
} else {
|
||||
if(needsDesignator) return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
|
||||
@ -180,6 +180,14 @@ public class BobMathUtil {
|
||||
|
||||
return new BigDecimal(num).setScale(digits, RoundingMode.HALF_UP).doubleValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount
|
||||
* @return the number as a string with thousand group commas
|
||||
*/
|
||||
public static String format(int amount) {
|
||||
return String.format(Locale.US, "%,d", amount);
|
||||
}
|
||||
|
||||
public static boolean getBlink() {
|
||||
return System.currentTimeMillis() % 1000 < 500;
|
||||
|
||||
@ -111,18 +111,14 @@ public class WorldUtil {
|
||||
int chunkZ = MathHelper.floor_double(entity.posZ / 16.0D);
|
||||
byte loadRadius = 2;
|
||||
|
||||
for (int k = chunkX - loadRadius; k <= chunkX + loadRadius; ++k)
|
||||
{
|
||||
for (int l = chunkZ - loadRadius; l <= chunkZ + loadRadius; ++l)
|
||||
{
|
||||
for(int k = chunkX - loadRadius; k <= chunkX + loadRadius; ++k) {
|
||||
for(int l = chunkZ - loadRadius; l <= chunkZ + loadRadius; ++l) {
|
||||
world.getChunkFromChunkCoords(k, l);
|
||||
}
|
||||
}
|
||||
|
||||
if (!world.loadedEntityList.contains(entity))
|
||||
{
|
||||
if (!MinecraftForge.EVENT_BUS.post(new EntityJoinWorldEvent(entity, world)))
|
||||
{
|
||||
if(!world.loadedEntityList.contains(entity)) {
|
||||
if(!MinecraftForge.EVENT_BUS.post(new EntityJoinWorldEvent(entity, world))) {
|
||||
world.getChunkFromChunkCoords(chunkX, chunkZ).addEntity(entity);
|
||||
world.loadedEntityList.add(entity);
|
||||
world.onEntityAdded(entity);
|
||||
|
||||
@ -2068,6 +2068,7 @@ item.gun_aberrator.name=Aberrator
|
||||
item.gun_aberrator_eott.name=Eyes Of The Tempest
|
||||
item.gun_am180.name=.22er Maschinenpistole
|
||||
item.gun_am180_silenced.name=Schallgedämpfte .22er Maschinenpistole
|
||||
item.gun_amat.name=Panzerbüchse
|
||||
item.gun_autoshotgun.name=Auto-Flinte
|
||||
item.gun_autoshotgun_sexy.name=Sexy
|
||||
item.gun_autoshotgun_shredder.name=Shredder
|
||||
@ -4163,6 +4164,7 @@ tile.fluid_duct_gauge.desc=Rohr welches anzeight, wie viel Flüssigkeit$sich pro
|
||||
tile.fluid_duct_neo.name=Universelles Flüssigkeitsrohr
|
||||
tile.fluid_duct_paintable.name=Geschirmtes universelles Flüssigkeitsrohr (Färbbar)
|
||||
tile.fluid_duct_solid.name=Geschirmtes universelles Flüssigkeitsrohr (Veraltet)
|
||||
tile.fluid_pump.name=Flussseuerungspumpe
|
||||
tile.fluid_switch.name=Redstone-Ventil
|
||||
tile.fluid_valve.name=Ventil
|
||||
tile.foam_layer.name=Schaumdecke
|
||||
@ -4861,6 +4863,9 @@ tile.vent_chlorine.name=Chlorgas-Auslass
|
||||
tile.vent_chlorine_seal.name=Chlorgassiegel
|
||||
tile.vent_cloud.name=Wolken-Auslass
|
||||
tile.vent_pink_cloud.name=Pinker Wolken-Auslass
|
||||
tile.vine_phosphor.large.name=Phosphorranken
|
||||
tile.vinyl_tile.large.name=Große Vinylfliesen
|
||||
tile.vinyl_tile.small.name=Kleine Vinylfliesen
|
||||
tile.vitrified_barrel.name=Fass voll vitrifiziertem Atommüll
|
||||
tile.volcano_core.name=Vulkankern
|
||||
tile.volcano_rad_core.name=Rad-Vulkankern
|
||||
|
||||
@ -2879,6 +2879,7 @@ item.gun_aberrator.name=Aberrator
|
||||
item.gun_aberrator_eott.name=Eyes Of The Tempest
|
||||
item.gun_am180.name=.22 Submachine Gun
|
||||
item.gun_am180_silenced.name=Silenced .22 Submachine Gun
|
||||
item.gun_amat.name=Anti-Materiel Rifle
|
||||
item.gun_autoshotgun.name=Auto Shotgun
|
||||
item.gun_autoshotgun_sexy.name=Sexy
|
||||
item.gun_autoshotgun_shredder.name=Shredder
|
||||
@ -5288,6 +5289,7 @@ tile.fluid_duct_gauge.desc=Pipe that displays how much fluid$moves within the ne
|
||||
tile.fluid_duct_neo.name=Universal Fluid Duct
|
||||
tile.fluid_duct_paintable.name=Paintable Coated Universal Fluid Duct
|
||||
tile.fluid_duct_solid.name=Coated Universal Fluid Duct (Deprecated)
|
||||
tile.fluid_pump.name=Flow Control Pump
|
||||
tile.fluid_switch.name=Redstone Fluid Valve
|
||||
tile.fluid_valve.name=Fluid Valve
|
||||
tile.foam_layer.name=Foam layer
|
||||
@ -6018,6 +6020,7 @@ tile.vent_chlorine.name=Chlorine Vent
|
||||
tile.vent_chlorine_seal.name=Chlorine Seal
|
||||
tile.vent_cloud.name=Cloud Vent
|
||||
tile.vent_pink_cloud.name=Pink Cloud Vent
|
||||
tile.vine_phosphor.large.name=Phosphor Vines
|
||||
tile.vinyl_tile.large.name=Large Vinyl Tile
|
||||
tile.vinyl_tile.small.name=Small Vinyl Tiles
|
||||
tile.vitrified_barrel.name=Vitrified Nuclear Waste Drum
|
||||
|
||||
2189
src/main/resources/assets/hbm/models/network/fluid_diode.obj
Normal file
2189
src/main/resources/assets/hbm/models/network/fluid_diode.obj
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
10682
src/main/resources/assets/hbm/models/weapons/amat.obj
Normal file
10682
src/main/resources/assets/hbm/models/weapons/amat.obj
Normal file
File diff suppressed because it is too large
Load Diff
@ -254,6 +254,7 @@
|
||||
"weapon.fire.aberrator": {"category": "player", "sounds": ["weapon/fire/aberrator"]},
|
||||
"weapon.fire.stab": {"category": "player", "sounds": ["weapon/fire/stab1", "weapon/fire/stab2"]},
|
||||
"weapon.fire.grenade": {"category": "player", "sounds": ["weapon/fire/grenade"]},
|
||||
"weapon.fire.amat": {"category": "player", "sounds": ["weapon/fire/amat"]},
|
||||
|
||||
"weapon.reload.boltClose": {"category": "player", "sounds": ["weapon/reload/boltClose"]},
|
||||
"weapon.reload.boltOpen": {"category": "player", "sounds": ["weapon/reload/boltOpen"]},
|
||||
|
||||
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/amat.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/amat.ogg
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 820 B |
Binary file not shown.
|
After Width: | Height: | Size: 928 B |
BIN
src/main/resources/assets/hbm/textures/models/weapons/amat.png
Normal file
BIN
src/main/resources/assets/hbm/textures/models/weapons/amat.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
Loading…
x
Reference in New Issue
Block a user