Merge remote-tracking branch 'HbmMods/master'
@ -1,7 +1,15 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
|
||||
@ -9,4 +17,40 @@ public interface ILookOverlay {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void printHook(RenderGameOverlayEvent.Pre event, World world, int x, int y, int z);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void printGeneric(RenderGameOverlayEvent.Pre event, String title, int titleCol, int bgCol, List<String> text) {
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ScaledResolution resolution = event.resolution;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
int pX = resolution.getScaledWidth() / 2 + 8;
|
||||
int pZ = resolution.getScaledHeight() / 2;
|
||||
|
||||
List<String> exceptions = new ArrayList();
|
||||
exceptions.add("x");
|
||||
exceptions.add("y");
|
||||
exceptions.add("z");
|
||||
exceptions.add("items");
|
||||
exceptions.add("id");
|
||||
|
||||
mc.fontRenderer.drawString(title, pX + 1, pZ - 9, bgCol);
|
||||
mc.fontRenderer.drawString(title, pX, pZ - 10, titleCol);
|
||||
|
||||
for(String line : text) {
|
||||
|
||||
if(exceptions.contains(line))
|
||||
continue;
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow(line, pX, pZ, 0xFFFFFF);
|
||||
pZ += 10;
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
||||
}
|
||||
}
|
||||
|
||||
@ -942,6 +942,7 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_chemplant;
|
||||
public static final int guiID_machine_chemplant = 49;
|
||||
public static Block machine_chemfac;
|
||||
|
||||
public static Block machine_fluidtank;
|
||||
public static final int guiID_machine_fluidtank = 50;
|
||||
@ -2064,9 +2065,10 @@ public class ModBlocks {
|
||||
drill_pipe = new BlockNoDrop(Material.iron).setBlockName("drill_pipe").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":drill_pipe");
|
||||
machine_mining_laser = new MachineMiningLaser(Material.iron).setBlockName("machine_mining_laser").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_mining_laser");
|
||||
barricade = new BlockNoDrop(Material.sand).setBlockName("barricade").setHardness(1.0F).setResistance(2.5F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barricade");
|
||||
machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_assembler");
|
||||
machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chemplant");
|
||||
machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fluidtank");
|
||||
machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_assembler");
|
||||
machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chemplant");
|
||||
machine_chemfac = new MachineChemfac(Material.iron).setBlockName("machine_chemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fluidtank");
|
||||
machine_bat9000 = new MachineBigAssTank9000(Material.iron).setBlockName("machine_bat9000").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_orbus = new MachineOrbus(Material.iron).setBlockName("machine_orbus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_turbofan = new MachineTurbofan(Material.iron).setBlockName("machine_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_turbofan");
|
||||
@ -2973,6 +2975,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_microwave, machine_microwave.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_assembler, machine_assembler.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_chemplant, machine_chemplant.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_chemfac, machine_chemfac.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_fluidtank, machine_fluidtank.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_bat9000, machine_bat9000.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_orbus, machine_orbus.getUnlocalizedName());
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockChargeC4 extends BlockChargeBase {
|
||||
@ -15,9 +21,11 @@ public class BlockChargeC4 extends BlockChargeBase {
|
||||
safe = true;
|
||||
world.setBlockToAir(x, y, z);
|
||||
safe = false;
|
||||
ExplosionNT exp = new ExplosionNT(world, null, x + 0.5, y + 0.5, z + 0.5, 4F);
|
||||
exp.explode();
|
||||
ExplosionLarge.spawnParticles(world, x + 0.5, y + 0.5, z + 0.5, 20);
|
||||
|
||||
ExplosionVNT xnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 15F).makeStandard();
|
||||
xnt.setBlockAllocator(new BlockAllocatorStandard(32));
|
||||
xnt.setBlockProcessor(new BlockProcessorStandard().setNoDrop());
|
||||
xnt.explode();
|
||||
|
||||
return BombReturnCode.DETONATED;
|
||||
}
|
||||
@ -31,4 +39,10 @@ public class BlockChargeC4 extends BlockChargeBase {
|
||||
public int getRenderType() {
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
super.addInformation(stack, player, list, ext);
|
||||
list.add(EnumChatFormatting.BLUE + "Does not drop blocks.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,15 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockChargeSemtex extends BlockChargeBase {
|
||||
@ -14,9 +21,14 @@ public class BlockChargeSemtex extends BlockChargeBase {
|
||||
safe = true;
|
||||
world.setBlockToAir(x, y, z);
|
||||
safe = false;
|
||||
ExplosionNT exp = new ExplosionNT(world, null, x + 0.5, y + 0.5, z + 0.5, 4F);
|
||||
exp.explode();
|
||||
ExplosionLarge.spawnParticles(world, x + 0.5, y + 0.5, z + 0.5, 20);
|
||||
|
||||
ExplosionVNT xnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 10F);
|
||||
xnt.setBlockAllocator(new BlockAllocatorStandard(32));
|
||||
xnt.setBlockProcessor(new BlockProcessorStandard()
|
||||
.setAllDrop()
|
||||
.setFortune(3));
|
||||
xnt.setSFX(new ExplosionEffectStandard());
|
||||
xnt.explode();
|
||||
|
||||
return BombReturnCode.DETONATED;
|
||||
}
|
||||
@ -26,6 +38,15 @@ public class BlockChargeSemtex extends BlockChargeBase {
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return BlockChargeDynamite.renderID;
|
||||
return BlockChargeC4.renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
super.addInformation(stack, player, list, ext);
|
||||
list.add(EnumChatFormatting.BLUE + "Will drop all blocks.");
|
||||
list.add(EnumChatFormatting.BLUE + "Does not do damage.");
|
||||
list.add(EnumChatFormatting.BLUE + "");
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + "Fortune III");
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,4 +55,16 @@ public class BlockDepthOre extends BlockDepth {
|
||||
|
||||
return super.quantityDropped(rand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDroppedWithBonus(int fortune, Random rand) {
|
||||
|
||||
int mult = rand.nextInt(fortune + 2) - 1;
|
||||
|
||||
if(mult < 0) {
|
||||
mult = 0;
|
||||
}
|
||||
|
||||
return this.quantityDropped(rand) * (mult + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -240,6 +240,22 @@ public class BlockOre extends Block {
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDroppedWithBonus(int fortune, Random rand) {
|
||||
|
||||
if(fortune > 0 && Item.getItemFromBlock(this) != this.getItemDropped(0, rand, fortune)) {
|
||||
int mult = rand.nextInt(fortune + 2) - 1;
|
||||
|
||||
if(mult < 0) {
|
||||
mult = 0;
|
||||
}
|
||||
|
||||
return this.quantityDropped(rand) * (mult + 1);
|
||||
} else {
|
||||
return this.quantityDropped(rand);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int p_149692_1_) {
|
||||
|
||||
@ -1,23 +1,30 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineCatalyticCracker;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
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.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineCatalyticCracker extends BlockDummyable {
|
||||
public class MachineCatalyticCracker extends BlockDummyable implements ILookOverlay {
|
||||
|
||||
public MachineCatalyticCracker(Material mat) {
|
||||
super(mat);
|
||||
@ -49,7 +56,7 @@ public class MachineCatalyticCracker extends BlockDummyable {
|
||||
|
||||
if(!world.isRemote && !player.isSneaking()) {
|
||||
|
||||
if(player.getHeldItem() == null || player.getHeldItem().getItem() == ModItems.fluid_identifier) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.fluid_identifier) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
@ -61,20 +68,10 @@ public class MachineCatalyticCracker extends BlockDummyable {
|
||||
return false;
|
||||
|
||||
TileEntityMachineCatalyticCracker cracker = (TileEntityMachineCatalyticCracker) te;
|
||||
|
||||
if(player.getHeldItem() == null) {
|
||||
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "=== CATALYTIC CRACKING TOWER ==="));
|
||||
|
||||
for(int i = 0; i < cracker.tanks.length; i++)
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("hbmfluid." + cracker.tanks[i].getTankType().getName().toLowerCase()).appendSibling(new ChatComponentText(": " + cracker.tanks[i].getFill() + "/" + cracker.tanks[i].getMaxFill() + "mB")));
|
||||
} else {
|
||||
|
||||
FluidType type = Fluids.fromID(player.getHeldItem().getItemDamage());
|
||||
cracker.tanks[0].setTankType(type);
|
||||
cracker.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Changed type to " + type + "!"));
|
||||
}
|
||||
FluidType type = Fluids.fromID(player.getHeldItem().getItemDamage());
|
||||
cracker.tanks[0].setTankType(type);
|
||||
cracker.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase())).appendSibling(new ChatComponentText("!")));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -115,4 +112,26 @@ public class MachineCatalyticCracker extends BlockDummyable {
|
||||
this.makeExtra(world, x + dir.offsetX * o - dir.offsetX * 2 + rot.offsetX * 2, y + dir.offsetY * o, z + dir.offsetZ * o - dir.offsetZ * 2 + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x + dir.offsetX * o - dir.offsetX * 2 - rot.offsetX * 3, y + dir.offsetY * o, z + dir.offsetZ * o - dir.offsetZ * 2 - rot.offsetZ * 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(!(te instanceof TileEntityMachineCatalyticCracker))
|
||||
return;
|
||||
|
||||
TileEntityMachineCatalyticCracker cracker = (TileEntityMachineCatalyticCracker) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < cracker.tanks.length; i++)
|
||||
text.add((i < 2 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + cracker.tanks[i].getTankType().getName().toLowerCase()) + ": " + cracker.tanks[i].getFill() + "/" + cracker.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x808000, text);
|
||||
}
|
||||
}
|
||||
|
||||
65
src/main/java/com/hbm/blocks/machine/MachineChemfac.java
Normal file
@ -0,0 +1,65 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemfac;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineChemfac extends BlockDummyable {
|
||||
|
||||
public MachineChemfac(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineChemfac();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {3, 0, 4, 3, 4, 3};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
this.safeRem = true;
|
||||
|
||||
for(int i = -3; i < 3; i++) {
|
||||
this.makeExtra(world, x + rot.offsetX * 2 + dir.offsetX * i, y + 3, z + rot.offsetZ * 2 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x - rot.offsetX * 3 + dir.offsetX * i, y + 3, z - rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * i, y + 1, z + rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * i, y + 2, z + rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * i, y + 1, z - rot.offsetZ * 4 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * i, y + 2, z - rot.offsetZ * 4 + dir.offsetZ * i);
|
||||
}
|
||||
|
||||
this.safeRem = false;
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,16 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineFractionTower;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -15,9 +20,10 @@ import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineFractionTower extends BlockDummyable {
|
||||
public class MachineFractionTower extends BlockDummyable implements ILookOverlay {
|
||||
|
||||
public MachineFractionTower(Material mat) {
|
||||
super(mat);
|
||||
@ -49,7 +55,7 @@ public class MachineFractionTower extends BlockDummyable {
|
||||
|
||||
if(!world.isRemote && !player.isSneaking()) {
|
||||
|
||||
if(player.getHeldItem() == null || player.getHeldItem().getItem() == ModItems.fluid_identifier) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.fluid_identifier) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
@ -62,22 +68,13 @@ public class MachineFractionTower extends BlockDummyable {
|
||||
|
||||
TileEntityMachineFractionTower frac = (TileEntityMachineFractionTower) te;
|
||||
|
||||
if(player.getHeldItem() == null) {
|
||||
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "=== FRACTIONING TOWER Y:" + pos[1] + " ==="));
|
||||
|
||||
for(int i = 0; i < frac.tanks.length; i++)
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("hbmfluid." + frac.tanks[i].getTankType().getName().toLowerCase()).appendSibling(new ChatComponentText(": " + frac.tanks[i].getFill() + "/" + frac.tanks[i].getMaxFill() + "mB")));
|
||||
if(world.getTileEntity(pos[0], pos[1] - 3, pos[2]) instanceof TileEntityMachineFractionTower) {
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "You can only change the type in the bottom segment!"));
|
||||
} else {
|
||||
|
||||
if(world.getTileEntity(pos[0], pos[1] - 3, pos[2]) instanceof TileEntityMachineFractionTower) {
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "You can only change the type in the bottom segment!"));
|
||||
} else {
|
||||
FluidType type = Fluids.fromID(player.getHeldItem().getItemDamage());
|
||||
frac.tanks[0].setTankType(type);
|
||||
frac.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase())).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
FluidType type = Fluids.fromID(player.getHeldItem().getItemDamage());
|
||||
frac.tanks[0].setTankType(type);
|
||||
frac.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase())).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -101,4 +98,26 @@ public class MachineFractionTower extends BlockDummyable {
|
||||
this.makeExtra(world, x, y, z + 1);
|
||||
this.makeExtra(world, x, y, z - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(!(te instanceof TileEntityMachineFractionTower))
|
||||
return;
|
||||
|
||||
TileEntityMachineFractionTower cracker = (TileEntityMachineFractionTower) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < cracker.tanks.length; i++)
|
||||
text.add((i == 0 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + cracker.tanks[i].getTankType().getName().toLowerCase()) + ": " + cracker.tanks[i].getFill() + "/" + cracker.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x808000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,6 +23,10 @@ public class ToolboxCraftingHandler implements IRecipe {
|
||||
ItemStack stack = inventory.getStackInRowAndColumn(i % 3, i / 3);
|
||||
|
||||
if(stack != null) {
|
||||
|
||||
if(stack.getItem().hasContainerItem(stack) || !stack.getItem().doesContainerItemLeaveCraftingGrid(stack))
|
||||
return false;
|
||||
|
||||
itemCount++;
|
||||
|
||||
if(stack.getItem() == ModItems.kit_toolbox_empty) {
|
||||
|
||||
@ -56,7 +56,7 @@ public class EntityMinerRocket extends Entity {
|
||||
|
||||
if(dataWatcher.getWatchableObjectInt(16) == 1) {
|
||||
|
||||
if(ticksExisted % 2 == 0)
|
||||
if(!worldObj.isRemote && ticksExisted % 4 == 0)
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY, posZ, 1 + rand.nextInt(3), 1 + rand.nextGaussian());
|
||||
|
||||
timer++;
|
||||
|
||||
@ -10,6 +10,7 @@ import net.minecraft.entity.EntityLeashKnot;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.boss.IBossDisplayData;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -148,6 +149,12 @@ public class EntityQuackos extends EntityDuck implements IBossDisplayData {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* BOW
|
||||
*/
|
||||
@Override
|
||||
public void onDeath(DamageSource sourceOrRatherLackThereof) { }
|
||||
|
||||
@Override
|
||||
protected void updateLeashedState() {
|
||||
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockProcessorStandard implements IBlockProcessor {
|
||||
|
||||
protected IDropChanceMutator chance;
|
||||
|
||||
public BlockProcessorStandard() { }
|
||||
|
||||
public BlockProcessorStandard(IDropChanceMutator chance) {
|
||||
this.chance = chance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(ExplosionVNT explosion, World world, double x, double y, double z, HashSet<ChunkPosition> affectedBlocks) {
|
||||
|
||||
Iterator iterator = affectedBlocks.iterator();
|
||||
float dropChance = 1.0F / explosion.size;
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
ChunkPosition chunkposition = (ChunkPosition) iterator.next();
|
||||
int blockX = chunkposition.chunkPosX;
|
||||
int blockY = chunkposition.chunkPosY;
|
||||
int blockZ = chunkposition.chunkPosZ;
|
||||
Block block = world.getBlock(blockX, blockY, blockZ);
|
||||
|
||||
if(block.getMaterial() != Material.air) {
|
||||
if(block.canDropFromExplosion(null)) {
|
||||
|
||||
if(chance != null) {
|
||||
dropChance = chance.mutateDropChance(explosion, block, blockX, blockY, blockZ, dropChance);
|
||||
}
|
||||
|
||||
block.dropBlockAsItemWithChance(world, blockX, blockY, blockZ, world.getBlockMetadata(blockX, blockY, blockZ), dropChance, 0);
|
||||
}
|
||||
|
||||
block.onBlockExploded(world, blockX, blockY, blockZ, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BlockProcessorStandard setNoDrop() {
|
||||
this.chance = new DropChanceNever();
|
||||
return this;
|
||||
}
|
||||
public BlockProcessorStandard setAllDrop() {
|
||||
this.chance = new DropChanceAlways();
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
/**
|
||||
* Now it's getting ridiculously over-engineered
|
||||
* @author hbm
|
||||
*
|
||||
*/
|
||||
public class DropChanceAlways implements IDropChanceMutator {
|
||||
|
||||
@Override
|
||||
public float mutateDropChance(ExplosionVNT explosion, Block block, int x, int y, int z, float chance) {
|
||||
return 1F;
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class DropChanceNever implements IDropChanceMutator {
|
||||
|
||||
@Override
|
||||
public float mutateDropChance(ExplosionVNT explosion, Block block, int x, int y, int z, float chance) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,18 @@ package com.hbm.explosion.vanillant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
|
||||
import com.hbm.explosion.vanillant.interfaces.IBlockAllocator;
|
||||
import com.hbm.explosion.vanillant.interfaces.IBlockProcessor;
|
||||
import com.hbm.explosion.vanillant.interfaces.IEntityProcessor;
|
||||
import com.hbm.explosion.vanillant.interfaces.IExplosionSFX;
|
||||
import com.hbm.explosion.vanillant.interfaces.IPlayerProcessor;
|
||||
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.EntityProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
|
||||
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -29,9 +41,10 @@ public class ExplosionVNT {
|
||||
protected double posX;
|
||||
protected double posY;
|
||||
protected double posZ;
|
||||
protected float size;
|
||||
public float size;
|
||||
public Entity exploder;
|
||||
|
||||
|
||||
private Map compatPlayers = new HashMap();
|
||||
public Explosion compat;
|
||||
|
||||
public ExplosionVNT(World world, double x, double y, double z, float size) {
|
||||
@ -46,22 +59,37 @@ public class ExplosionVNT {
|
||||
this.size = size;
|
||||
this.exploder = exploder;
|
||||
|
||||
this.compat = new Explosion(world, exploder, x, y, z, size);
|
||||
this.compat = new Explosion(world, exploder, x, y, z, size) {
|
||||
|
||||
@Override
|
||||
public Map func_77277_b() {
|
||||
return ExplosionVNT.this.compatPlayers;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void explode() {
|
||||
|
||||
this.compat.exploder = this.exploder;
|
||||
this.compat.explosionSize = this.size;
|
||||
|
||||
boolean processBlocks = blockAllocator != null && blockProcessor != null;
|
||||
boolean processEntities = entityProcessor != null && playerProcessor != null;
|
||||
|
||||
HashSet<ChunkPosition> affectedBlocks = null;
|
||||
HashMap<EntityPlayer, Vec3> affectedEntities = null;
|
||||
HashMap<EntityPlayer, Vec3> affectedPlayers = null;
|
||||
|
||||
//allocation
|
||||
if(processBlocks) affectedBlocks = blockAllocator.allocate(this, world, posX, posY, posZ, size);
|
||||
if(processEntities) affectedEntities = entityProcessor.process(this, world, posX, posY, posZ, size);
|
||||
if(processEntities) affectedPlayers = entityProcessor.process(this, world, posX, posY, posZ, size);
|
||||
|
||||
//serverside processing
|
||||
if(processBlocks) blockProcessor.process(this, world, posX, posY, posZ, affectedBlocks);
|
||||
if(processEntities) playerProcessor.process(this, world, posX, posY, posZ, affectedEntities);
|
||||
if(processEntities) playerProcessor.process(this, world, posX, posY, posZ, affectedPlayers);
|
||||
|
||||
//compat
|
||||
if(processBlocks) this.compat.affectedBlockPositions.addAll(affectedBlocks);
|
||||
if(processEntities) this.compatPlayers.putAll(affectedPlayers);
|
||||
|
||||
if(sfx != null) {
|
||||
for(IExplosionSFX fx : sfx) {
|
||||
@ -90,4 +118,13 @@ public class ExplosionVNT {
|
||||
this.sfx = sfx;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ExplosionVNT makeStandard() {
|
||||
this.setBlockAllocator(new BlockAllocatorStandard());
|
||||
this.setBlockProcessor(new BlockProcessorStandard());
|
||||
this.setEntityProcessor(new EntityProcessorStandard());
|
||||
this.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
this.setSFX(new ExplosionEffectStandard());
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
package com.hbm.explosion.vanillant.interfaces;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
package com.hbm.explosion.vanillant.interfaces;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
|
||||
public interface IBlockMutator {
|
||||
|
||||
public int mutateAtPosition(ExplosionVNT explosion, int x, int y, int z);
|
||||
}
|
||||
@ -1,7 +1,9 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
package com.hbm.explosion.vanillant.interfaces;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
package com.hbm.explosion.vanillant.interfaces;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
package com.hbm.explosion.vanillant.interfaces;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
@ -1,4 +1,6 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
package com.hbm.explosion.vanillant.interfaces;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
package com.hbm.explosion.vanillant.interfaces;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public interface IFortuneMutator {
|
||||
|
||||
public int mutateFortune(ExplosionVNT explosion, Block block, int x, int y, int z);
|
||||
}
|
||||
@ -1,7 +1,9 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
package com.hbm.explosion.vanillant.interfaces;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
@ -1,7 +1,10 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
package com.hbm.explosion.vanillant.standard;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.interfaces.IBlockAllocator;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@ -0,0 +1,104 @@
|
||||
package com.hbm.explosion.vanillant.standard;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.interfaces.IBlockMutator;
|
||||
import com.hbm.explosion.vanillant.interfaces.IBlockProcessor;
|
||||
import com.hbm.explosion.vanillant.interfaces.IDropChanceMutator;
|
||||
import com.hbm.explosion.vanillant.interfaces.IFortuneMutator;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockProcessorStandard implements IBlockProcessor {
|
||||
|
||||
protected IDropChanceMutator chance;
|
||||
protected IFortuneMutator fortune;
|
||||
protected IBlockMutator convert;
|
||||
|
||||
public BlockProcessorStandard() { }
|
||||
|
||||
public BlockProcessorStandard withChance(IDropChanceMutator chance) {
|
||||
this.chance = chance;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BlockProcessorStandard withFortune(IFortuneMutator fortune) {
|
||||
this.fortune = fortune;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BlockProcessorStandard withBlockEffect(IBlockMutator convert) {
|
||||
this.convert = convert;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(ExplosionVNT explosion, World world, double x, double y, double z, HashSet<ChunkPosition> affectedBlocks) {
|
||||
|
||||
Iterator iterator = affectedBlocks.iterator();
|
||||
float dropChance = 1.0F / explosion.size;
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
ChunkPosition chunkposition = (ChunkPosition) iterator.next();
|
||||
int blockX = chunkposition.chunkPosX;
|
||||
int blockY = chunkposition.chunkPosY;
|
||||
int blockZ = chunkposition.chunkPosZ;
|
||||
Block block = world.getBlock(blockX, blockY, blockZ);
|
||||
|
||||
if(block.getMaterial() != Material.air) {
|
||||
if(block.canDropFromExplosion(null)) {
|
||||
|
||||
if(chance != null) {
|
||||
dropChance = chance.mutateDropChance(explosion, block, blockX, blockY, blockZ, dropChance);
|
||||
}
|
||||
|
||||
int dropFortune = fortune == null ? 0 : fortune.mutateFortune(explosion, block, blockX, blockY, blockZ);
|
||||
|
||||
block.dropBlockAsItemWithChance(world, blockX, blockY, blockZ, world.getBlockMetadata(blockX, blockY, blockZ), dropChance, dropFortune);
|
||||
}
|
||||
|
||||
block.onBlockExploded(world, blockX, blockY, blockZ, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(this.convert != null) {
|
||||
iterator = affectedBlocks.iterator();
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
ChunkPosition chunkposition = (ChunkPosition) iterator.next();
|
||||
int blockX = chunkposition.chunkPosX;
|
||||
int blockY = chunkposition.chunkPosY;
|
||||
int blockZ = chunkposition.chunkPosZ;
|
||||
Block block = world.getBlock(blockX, blockY, blockZ);
|
||||
|
||||
if(block.getMaterial() == Material.air) {
|
||||
this.convert.mutateAtPosition(explosion, blockX, blockY, blockZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BlockProcessorStandard setNoDrop() {
|
||||
this.chance = new DropChanceMutatorStandard(0F);
|
||||
return this;
|
||||
}
|
||||
public BlockProcessorStandard setAllDrop() {
|
||||
this.chance = new DropChanceMutatorStandard(1F);
|
||||
return this;
|
||||
}
|
||||
public BlockProcessorStandard setFortune(int fortune) {
|
||||
this.fortune = new IFortuneMutator() { //no standard class because we only have one case thus far
|
||||
@Override
|
||||
public int mutateFortune(ExplosionVNT explosion, Block block, int x, int y, int z) {
|
||||
return fortune;
|
||||
}
|
||||
};
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.hbm.explosion.vanillant.standard;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.interfaces.IDropChanceMutator;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class DropChanceMutatorStandard implements IDropChanceMutator {
|
||||
|
||||
private float chance;
|
||||
|
||||
public DropChanceMutatorStandard(float chance) {
|
||||
this.chance = chance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float mutateDropChance(ExplosionVNT explosion, Block block, int x, int y, int z, float chance) {
|
||||
return this.chance;
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,11 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
package com.hbm.explosion.vanillant.standard;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.interfaces.IEntityProcessor;
|
||||
|
||||
import net.minecraft.enchantment.EnchantmentProtection;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -0,0 +1,64 @@
|
||||
package com.hbm.explosion.vanillant.standard;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.interfaces.IExplosionSFX;
|
||||
import com.hbm.packet.ExplosionVanillaNewTechnologyCompressedAffectedBlockPositionDataForClientEffectsAndParticleHandlingPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ExplosionEffectStandard implements IExplosionSFX {
|
||||
|
||||
@Override
|
||||
public void doEffect(ExplosionVNT explosion, World world, double x, double y, double z, float size) {
|
||||
|
||||
if(world.isRemote)
|
||||
return;
|
||||
|
||||
world.playSoundEffect(x, y, z, "random.explode", 4.0F, (1.0F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAllAround(new ExplosionVanillaNewTechnologyCompressedAffectedBlockPositionDataForClientEffectsAndParticleHandlingPacket(x, y, z, explosion.size, explosion.compat.affectedBlockPositions), new TargetPoint(world.provider.dimensionId, x, y, z, 250));
|
||||
}
|
||||
|
||||
public static void performClient(World world, double x, double y, double z, float size, List affectedBlocks) {
|
||||
|
||||
if(size >= 2.0F) {
|
||||
world.spawnParticle("hugeexplosion", x, y, z, 1.0D, 0.0D, 0.0D);
|
||||
} else {
|
||||
world.spawnParticle("largeexplode", x, z, z, 1.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
int count = affectedBlocks.size();
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
ChunkPosition pos = (ChunkPosition) affectedBlocks.get(i);
|
||||
int pX = pos.chunkPosX;
|
||||
int pY = pos.chunkPosY;
|
||||
int pZ = pos.chunkPosZ;
|
||||
|
||||
double oX = (double) ((float) pX + world.rand.nextFloat());
|
||||
double oY = (double) ((float) pY + world.rand.nextFloat());
|
||||
double oZ = (double) ((float) pZ + world.rand.nextFloat());
|
||||
double dX = oX - x;
|
||||
double dY = oY - y;
|
||||
double dZ = oZ - z;
|
||||
double delta = (double) MathHelper.sqrt_double(dX * dX + dY * dY + dZ * dZ) / 1D /* hehehe */;
|
||||
dX /= delta;
|
||||
dY /= delta;
|
||||
dZ /= delta;
|
||||
double mod = 0.5D / (delta / (double) size + 0.1D);
|
||||
mod *= (double) (world.rand.nextFloat() * world.rand.nextFloat() + 0.3F);
|
||||
dX *= mod;
|
||||
dY *= mod;
|
||||
dZ *= mod;
|
||||
world.spawnParticle("explode", (oX + x * 1.0D) / 2.0D, (oY + y * 1.0D) / 2.0D, (oZ + z * 1.0D) / 2.0D, dX, dY, dZ);
|
||||
world.spawnParticle("smoke", oX, oY, oZ, dX, dY, dZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,10 @@
|
||||
package com.hbm.explosion.vanillant;
|
||||
package com.hbm.explosion.vanillant.standard;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.interfaces.IPlayerProcessor;
|
||||
import com.hbm.packet.ExplosionKnockbackPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
@ -30,6 +30,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
if(entity instanceof TileEntityMachineLiquefactor) { return new ContainerLiquefactor(player.inventory, (TileEntityMachineLiquefactor) entity); }
|
||||
if(entity instanceof TileEntityMachineSolidifier) { return new ContainerSolidifier(player.inventory, (TileEntityMachineSolidifier) entity); }
|
||||
if(entity instanceof TileEntityMachineRadiolysis) { return new ContainerRadiolysis(player.inventory, (TileEntityMachineRadiolysis) entity); }
|
||||
if(entity instanceof TileEntityMachineChemfac) { return new ContainerChemfac(player.inventory, (TileEntityMachineChemfac) entity); }
|
||||
|
||||
switch(ID) {
|
||||
case ModBlocks.guiID_test_difurnace: {
|
||||
@ -870,6 +871,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
if(entity instanceof TileEntityMachineLiquefactor) { return new GUILiquefactor(player.inventory, (TileEntityMachineLiquefactor) entity); }
|
||||
if(entity instanceof TileEntityMachineSolidifier) { return new GUISolidifier(player.inventory, (TileEntityMachineSolidifier) entity); }
|
||||
if(entity instanceof TileEntityMachineRadiolysis) { return new GUIRadiolysis(player.inventory, (TileEntityMachineRadiolysis) entity); }
|
||||
if(entity instanceof TileEntityMachineChemfac) { return new GUIChemfac(player.inventory, (TileEntityMachineChemfac) entity); }
|
||||
|
||||
switch(ID) {
|
||||
case ModBlocks.guiID_test_difurnace: {
|
||||
|
||||
@ -5,4 +5,16 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
public interface IFluidAcceptor extends IFluidContainer {
|
||||
|
||||
int getMaxFluidFill(FluidType type);
|
||||
|
||||
public default void setFluidFillForReceive(int fill, FluidType type) {
|
||||
this.setFluidFill(fill, type);
|
||||
}
|
||||
|
||||
public default int getFluidFillForReceive(FluidType type) {
|
||||
return this.getFluidFill(type);
|
||||
}
|
||||
|
||||
public default int getMaxFluidFillForReceive(FluidType type) {
|
||||
return this.getMaxFluidFill(type);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,66 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemfac;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerChemfac extends Container {
|
||||
|
||||
private TileEntityMachineChemfac chemfac;
|
||||
|
||||
public ContainerChemfac(InventoryPlayer playerInv, TileEntityMachineChemfac tile) {
|
||||
chemfac = tile;
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, 0, 234, 79));
|
||||
|
||||
for(int i = 0; i < 2; i++) {
|
||||
for(int j = 0; j < 2; j++) {
|
||||
this.addSlotToContainer(new SlotUpgrade(tile, 1 + i * 2 + j, 217 + j * 18, 172 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
for(int j = 0; j < 2; j++) {
|
||||
|
||||
for(int k = 0; k < 2; k++) {
|
||||
for(int l = 0; l < 2; l++) {
|
||||
this.addSlotToContainer(new Slot(tile, this.inventorySlots.size(), 7 + j * 110 + l * 16, 14 + i * 38 + k * 16));
|
||||
}
|
||||
}
|
||||
|
||||
for(int k = 0; k < 2; k++) {
|
||||
for(int l = 0; l < 2; l++) {
|
||||
this.addSlotToContainer(new Slot(tile, this.inventorySlots.size(), 69 + j * 110 + l * 16, 14 + i * 38 + k * 16));
|
||||
}
|
||||
}
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, this.inventorySlots.size(), 51 + j * 110, 30 + i * 38));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 34 + j * 18, 174 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, i, 34 + i * 18, 232));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return chemfac.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
49
src/main/java/com/hbm/inventory/gui/GUIChemfac.java
Normal file
@ -0,0 +1,49 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerChemfac;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemfac;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIChemfac extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_chemfac.png");
|
||||
private TileEntityMachineChemfac chemfac;
|
||||
|
||||
public GUIChemfac(InventoryPlayer invPlayer, TileEntityMachineChemfac tedf) {
|
||||
super(new ContainerChemfac(invPlayer, tedf));
|
||||
chemfac = tedf;
|
||||
|
||||
this.xSize = 256;
|
||||
this.ySize = 256;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) { }
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, 211);
|
||||
drawTexturedModalRect(guiLeft + 26, guiTop + 211, 26, 211, 176, 45);
|
||||
|
||||
for(int i = 0; i < this.inventorySlots.inventorySlots.size(); i++) {
|
||||
Slot s = this.inventorySlots.getSlot(i);
|
||||
|
||||
this.fontRendererObj.drawStringWithShadow(i + "", guiLeft + s.xDisplayPosition + 2, guiTop + s.yDisplayPosition, 0xffffff);
|
||||
this.fontRendererObj.drawStringWithShadow(s.getSlotIndex() + "", guiLeft + s.xDisplayPosition + 2, guiTop + s.yDisplayPosition + 8, 0xff8080);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -75,29 +75,26 @@ public class GUIMachineBoilerElectric extends GuiInfoContainer {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
//<insert witty line here>
|
||||
TileEntityMachineBoilerElectric dud = diFurnace;
|
||||
|
||||
if(diFurnace.isInvalid() && diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord) instanceof TileEntityMachineBoilerElectric)
|
||||
dud = (TileEntityMachineBoilerElectric) diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord);
|
||||
diFurnace = (TileEntityMachineBoilerElectric) diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord);
|
||||
|
||||
if(dud.power > 0)
|
||||
if(diFurnace.power > 0)
|
||||
drawTexturedModalRect(guiLeft + 97, guiTop + 34, 176, 0, 18, 18);
|
||||
|
||||
int j = (int)dud.getHeatScaled(17);
|
||||
int j = (int)diFurnace.getHeatScaled(17);
|
||||
drawTexturedModalRect(guiLeft + 103, guiTop + 33 - j, 194, 16 - j, 6, j);
|
||||
|
||||
int i = (int)dud.getPowerScaled(34);
|
||||
int i = (int)diFurnace.getPowerScaled(34);
|
||||
drawTexturedModalRect(guiLeft + 123, guiTop + 69 - i, 200, 34 - i, 7, i);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
|
||||
|
||||
if(dud.tanks[1].getTankType().name().equals(Fluids.NONE.name())) {
|
||||
if(diFurnace.tanks[1].getTankType().name().equals(Fluids.NONE.name())) {
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32, 16, 16, 6);
|
||||
}
|
||||
|
||||
dud.tanks[0].renderTank(guiLeft + 62, guiTop + 69, this.zLevel, 16, 52);
|
||||
dud.tanks[1].renderTank(guiLeft + 134, guiTop + 69, this.zLevel, 16, 52);
|
||||
diFurnace.tanks[0].renderTank(guiLeft + 62, guiTop + 69, this.zLevel, 16, 52);
|
||||
diFurnace.tanks[1].renderTank(guiLeft + 134, guiTop + 69, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.container.ContainerSolidifier;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineSolidifier;
|
||||
|
||||
@ -166,7 +166,7 @@ public class RefineryRecipes {
|
||||
ItemFluidIcon.make(Fluids.SPENTSTEAM, 2)
|
||||
};
|
||||
|
||||
recipes.put(in, recipe.getValue().getValue().type == Fluids.NONE ? ItemFluidIcon.make(recipe.getValue().getKey()) : out);
|
||||
recipes.put(in, recipe.getValue().getValue().type == Fluids.NONE ? new ItemStack[] {ItemFluidIcon.make(recipe.getValue().getKey()), ItemFluidIcon.make(Fluids.SPENTSTEAM, 2)} : out);
|
||||
}
|
||||
|
||||
return recipes;
|
||||
|
||||
@ -10,10 +10,13 @@ import com.hbm.interfaces.IBomb.BombReturnCode;
|
||||
import com.hbm.interfaces.IHoldableWeapon;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.PlayerInformPacket;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
import com.hbm.util.ChatBuilder;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -44,19 +47,11 @@ public class ItemLaserDetonator extends Item implements IHoldableWeapon {
|
||||
MainRegistry.logger.log(Level.INFO, "[DET] Tried to detonate block at " + x + " / " + y + " / " + z + " by " + player.getDisplayName() + "!");
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
|
||||
player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA)
|
||||
.nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA)
|
||||
.next("] ").color(EnumChatFormatting.DARK_AQUA)
|
||||
.nextTranslation(ret.getUnlocalizedMessage()).color(ret.wasSuccessful() ? EnumChatFormatting.YELLOW : EnumChatFormatting.RED).flush());
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("").nextTranslation(ret.getUnlocalizedMessage()).color(ret.wasSuccessful() ? EnumChatFormatting.YELLOW : EnumChatFormatting.RED).flush()), (EntityPlayerMP) player);
|
||||
|
||||
} else {
|
||||
world.playSoundAtEntity(player, "hbm:item.techBoop", 1.0F, 1.0F);
|
||||
|
||||
player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA)
|
||||
.nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA)
|
||||
.next("] ").color(EnumChatFormatting.DARK_AQUA)
|
||||
.nextTranslation(BombReturnCode.ERROR_NO_BOMB.getUnlocalizedMessage()).color(EnumChatFormatting.RED).flush());
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("").nextTranslation(BombReturnCode.ERROR_NO_BOMB.getUnlocalizedMessage()).color(EnumChatFormatting.RED).flush()), (EntityPlayerMP) player);
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
@ -611,28 +611,28 @@ public class Library {
|
||||
}
|
||||
}
|
||||
|
||||
if(tileentity instanceof IFluidAcceptor && newTact && ((IFluidAcceptor)tileentity).getMaxFluidFill(type) > 0 &&
|
||||
((IFluidAcceptor)tileentity).getMaxFluidFill(type) - ((IFluidAcceptor)tileentity).getFluidFill(type) > 0) {
|
||||
if(tileentity instanceof IFluidAcceptor && newTact && ((IFluidAcceptor)tileentity).getMaxFluidFillForReceive(type) > 0 &&
|
||||
((IFluidAcceptor)tileentity).getMaxFluidFillForReceive(type) - ((IFluidAcceptor)tileentity).getFluidFillForReceive(type) > 0) {
|
||||
that.getFluidList(type).add((IFluidAcceptor)tileentity);
|
||||
}
|
||||
|
||||
if(!newTact)
|
||||
{
|
||||
if(!newTact) {
|
||||
int size = that.getFluidList(type).size();
|
||||
if(size > 0)
|
||||
{
|
||||
|
||||
if(size > 0) {
|
||||
int part = that.getFluidFill(type) / size;
|
||||
for(IFluidAcceptor consume : that.getFluidList(type))
|
||||
{
|
||||
if(consume.getFluidFill(type) < consume.getMaxFluidFill(type))
|
||||
{
|
||||
if(consume.getMaxFluidFill(type) - consume.getFluidFill(type) >= part)
|
||||
{
|
||||
|
||||
for(IFluidAcceptor consume : that.getFluidList(type)) {
|
||||
|
||||
if(consume.getFluidFillForReceive(type) < consume.getMaxFluidFillForReceive(type)) {
|
||||
|
||||
if(consume.getMaxFluidFillForReceive(type) - consume.getFluidFillForReceive(type) >= part) {
|
||||
that.setFluidFill(that.getFluidFill(type) - part, type);
|
||||
consume.setFluidFill(consume.getFluidFill(type) + part, type);
|
||||
consume.setFluidFillForReceive(consume.getFluidFillForReceive(type) + part, type);
|
||||
|
||||
} else {
|
||||
that.setFluidFill(that.getFluidFill(type) - (consume.getMaxFluidFill(type) - consume.getFluidFill(type)), type);
|
||||
consume.setFluidFill(consume.getMaxFluidFill(type), type);
|
||||
that.setFluidFill(that.getFluidFill(type) - (consume.getMaxFluidFillForReceive(type) - consume.getFluidFillForReceive(type)), type);
|
||||
consume.setFluidFillForReceive(consume.getMaxFluidFillForReceive(type), type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,6 +50,7 @@ import com.hbm.entity.mob.botprime.*;
|
||||
import com.hbm.entity.mob.siege.*;
|
||||
import com.hbm.entity.particle.*;
|
||||
import com.hbm.entity.projectile.*;
|
||||
import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
|
||||
import com.hbm.handler.HbmKeybinds;
|
||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -71,6 +72,9 @@ import com.hbm.render.tileentity.*;
|
||||
import com.hbm.render.util.MissilePart;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.sound.AudioWrapperClient;
|
||||
import com.hbm.sound.nt.ISoundSourceTE;
|
||||
import com.hbm.sound.nt.SoundWrapper;
|
||||
import com.hbm.sound.nt.SoundWrapperClient;
|
||||
import com.hbm.tileentity.TileEntityDoorGeneric;
|
||||
import com.hbm.tileentity.bomb.*;
|
||||
import com.hbm.tileentity.conductor.*;
|
||||
@ -172,6 +176,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMiningLaser.class, new RenderLaserMiner());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssembler.class, new RenderAssembler());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineChemplant.class, new RenderChemplant());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineChemfac.class, new RenderChemfac());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineFluidTank.class, new RenderFluidTank());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineBAT9000.class, new RenderBAT9000());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineOrbus.class, new RenderOrbus());
|
||||
@ -1552,11 +1557,15 @@ public class ClientProxy extends ServerProxy {
|
||||
audio.updatePosition(x, y, z);
|
||||
return audio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundWrapper getTileSound(String sound, ISoundSourceTE tile) {
|
||||
SoundWrapperClient wrapper = new SoundWrapperClient(sound, tile);
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playSound(String sound, Object data) {
|
||||
|
||||
}
|
||||
public void playSound(String sound, Object data) { }
|
||||
|
||||
@Override
|
||||
public void displayTooltip(String msg) {
|
||||
|
||||
@ -118,6 +118,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom chemplant_piston = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_piston.obj"));
|
||||
public static final IModelCustom chemplant_fluid = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_fluid.hmf"));
|
||||
public static final IModelCustom chemplant_fluidcap = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_fluidcap.hmf"));
|
||||
public static final IModelCustom chemfac = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/chemfac.obj"));
|
||||
|
||||
//F6 TANKS
|
||||
public static final IModelCustom tank = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/tank.obj"));
|
||||
@ -409,8 +410,9 @@ public class ResourceManager {
|
||||
//Chemplant
|
||||
public static final ResourceLocation chemplant_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_base_new.png");
|
||||
public static final ResourceLocation chemplant_spinner_tex = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_spinner_new.png");
|
||||
public static final ResourceLocation chemplant_piston_tex = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_piston_new.png");
|
||||
public static final ResourceLocation chemplant_fluid_tex = new ResourceLocation(RefStrings.MODID, "textures/models/lavabase_small.png");
|
||||
public static final ResourceLocation chemplant_piston_tex = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_piston_new.png");
|
||||
public static final ResourceLocation chemplant_fluid_tex = new ResourceLocation(RefStrings.MODID, "textures/models/lavabase_small.png");
|
||||
public static final ResourceLocation chemfac_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/chemfac.png");
|
||||
|
||||
//F6 TANKS
|
||||
public static final ResourceLocation uf6_tex = new ResourceLocation(RefStrings.MODID, "textures/models/UF6Tank.png");
|
||||
|
||||
@ -2,6 +2,8 @@ package com.hbm.main;
|
||||
|
||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.sound.nt.ISoundSourceTE;
|
||||
import com.hbm.sound.nt.SoundWrapper;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -41,4 +43,8 @@ public class ServerProxy {
|
||||
}
|
||||
|
||||
public void openLink(String url) { }
|
||||
|
||||
public SoundWrapper getTileSound(String sound, ISoundSourceTE source) {
|
||||
return new SoundWrapper();
|
||||
}
|
||||
}
|
||||
@ -60,9 +60,10 @@ public class AuxParticlePacketNT implements IMessage {
|
||||
|
||||
if(Minecraft.getMinecraft().theWorld == null)
|
||||
return null;
|
||||
|
||||
|
||||
try {
|
||||
|
||||
|
||||
NBTTagCompound nbt = m.buffer.readNBTTagCompoundFromBuffer();
|
||||
|
||||
if(nbt != null)
|
||||
|
||||
@ -20,8 +20,8 @@ public class ExplosionKnockbackPacket implements IMessage {
|
||||
|
||||
public ExplosionKnockbackPacket(Vec3 vec) {
|
||||
this.motionX = (float) vec.xCoord;
|
||||
this.motionY = (float) vec.xCoord;
|
||||
this.motionZ = (float) vec.xCoord;
|
||||
this.motionY = (float) vec.yCoord;
|
||||
this.motionZ = (float) vec.zCoord;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -0,0 +1,94 @@
|
||||
package com.hbm.packet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
|
||||
|
||||
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 cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
|
||||
/**
|
||||
* Can you tell I'm fucking done with packets? Well, can you?
|
||||
* @author hbm
|
||||
*
|
||||
*/
|
||||
public class ExplosionVanillaNewTechnologyCompressedAffectedBlockPositionDataForClientEffectsAndParticleHandlingPacket implements IMessage {
|
||||
|
||||
private double posX;
|
||||
private double posY;
|
||||
private double posZ;
|
||||
private float size;
|
||||
private List affectedBlocks;
|
||||
|
||||
public ExplosionVanillaNewTechnologyCompressedAffectedBlockPositionDataForClientEffectsAndParticleHandlingPacket() { }
|
||||
|
||||
public ExplosionVanillaNewTechnologyCompressedAffectedBlockPositionDataForClientEffectsAndParticleHandlingPacket(double x, double y, double z, float size, List blocks) {
|
||||
this.posX = x;
|
||||
this.posY = y;
|
||||
this.posZ = z;
|
||||
this.size = size;
|
||||
this.affectedBlocks = new ArrayList(blocks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
this.posX = (double) buf.readFloat();
|
||||
this.posY = (double) buf.readFloat();
|
||||
this.posZ = (double) buf.readFloat();
|
||||
this.size = buf.readFloat();
|
||||
int i = buf.readInt();
|
||||
this.affectedBlocks = new ArrayList(i);
|
||||
int j = (int) this.posX;
|
||||
int k = (int) this.posY;
|
||||
int l = (int) this.posZ;
|
||||
|
||||
for(int i1 = 0; i1 < i; ++i1) {
|
||||
int j1 = buf.readByte() + j;
|
||||
int k1 = buf.readByte() + k;
|
||||
int l1 = buf.readByte() + l;
|
||||
this.affectedBlocks.add(new ChunkPosition(j1, k1, l1));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeFloat((float) this.posX);
|
||||
buf.writeFloat((float) this.posY);
|
||||
buf.writeFloat((float) this.posZ);
|
||||
buf.writeFloat(this.size);
|
||||
buf.writeInt(this.affectedBlocks.size());
|
||||
int i = (int) this.posX;
|
||||
int j = (int) this.posY;
|
||||
int k = (int) this.posZ;
|
||||
Iterator iterator = this.affectedBlocks.iterator();
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
ChunkPosition chunkposition = (ChunkPosition) iterator.next();
|
||||
int l = chunkposition.chunkPosX - i;
|
||||
int i1 = chunkposition.chunkPosY - j;
|
||||
int j1 = chunkposition.chunkPosZ - k;
|
||||
buf.writeByte(l);
|
||||
buf.writeByte(i1);
|
||||
buf.writeByte(j1);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Handler implements IMessageHandler<ExplosionVanillaNewTechnologyCompressedAffectedBlockPositionDataForClientEffectsAndParticleHandlingPacket, IMessage> {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IMessage onMessage(ExplosionVanillaNewTechnologyCompressedAffectedBlockPositionDataForClientEffectsAndParticleHandlingPacket m, MessageContext ctx) {
|
||||
|
||||
ExplosionEffectStandard.performClient(Minecraft.getMinecraft().theWorld, m.posX, m.posY, m.posZ, m.size, m.affectedBlocks);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,8 +3,6 @@ package com.hbm.packet;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.tileentity.TileEntityTickingBase;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
|
||||
@ -95,8 +95,10 @@ public class PacketDispatcher {
|
||||
wrapper.registerMessage(AnvilCraftPacket.Handler.class, AnvilCraftPacket.class, i++, Side.SERVER);
|
||||
//Sends a funi text to display like a music disc announcement
|
||||
wrapper.registerMessage(TEDoorAnimationPacket.Handler.class, TEDoorAnimationPacket.class, i++, Side.CLIENT);
|
||||
//Sends a funi text to display like a music disc announcement
|
||||
//Does ExVNT standard player knockback
|
||||
wrapper.registerMessage(ExplosionKnockbackPacket.Handler.class, ExplosionKnockbackPacket.class, i++, Side.CLIENT);
|
||||
//just go fuck yourself already
|
||||
wrapper.registerMessage(ExplosionVanillaNewTechnologyCompressedAffectedBlockPositionDataForClientEffectsAndParticleHandlingPacket.Handler.class, ExplosionVanillaNewTechnologyCompressedAffectedBlockPositionDataForClientEffectsAndParticleHandlingPacket.class, i++, Side.CLIENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -9,25 +9,45 @@ import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
|
||||
public class PlayerInformPacket implements IMessage {
|
||||
|
||||
String dmesg = "";
|
||||
boolean fancy;
|
||||
private String dmesg = "";
|
||||
private IChatComponent component;
|
||||
|
||||
public PlayerInformPacket() { }
|
||||
|
||||
public PlayerInformPacket(String dmesg) {
|
||||
this.fancy = false;
|
||||
this.dmesg = dmesg;
|
||||
}
|
||||
|
||||
public PlayerInformPacket(IChatComponent component) {
|
||||
this.fancy = true;
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
dmesg = ByteBufUtils.readUTF8String(buf);
|
||||
fancy = buf.readBoolean();
|
||||
|
||||
if(!fancy) {
|
||||
dmesg = ByteBufUtils.readUTF8String(buf);
|
||||
} else {
|
||||
component = IChatComponent.Serializer.func_150699_a(ByteBufUtils.readUTF8String(buf));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
ByteBufUtils.writeUTF8String(buf, dmesg);
|
||||
buf.writeBoolean(fancy);
|
||||
if(!fancy) {
|
||||
ByteBufUtils.writeUTF8String(buf, dmesg);
|
||||
} else {
|
||||
ByteBufUtils.writeUTF8String(buf, IChatComponent.Serializer.func_150696_a(component));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Handler implements IMessageHandler<PlayerInformPacket, IMessage> {
|
||||
@ -36,7 +56,8 @@ public class PlayerInformPacket implements IMessage {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IMessage onMessage(PlayerInformPacket m, MessageContext ctx) {
|
||||
try {
|
||||
MainRegistry.proxy.displayTooltip(m.dmesg);
|
||||
|
||||
MainRegistry.proxy.displayTooltip(m.fancy ? m.component.getFormattedText() : m.dmesg);
|
||||
|
||||
} catch (Exception x) { }
|
||||
return null;
|
||||
|
||||
54
src/main/java/com/hbm/render/tileentity/RenderChemfac.java
Normal file
@ -0,0 +1,54 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderChemfac extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tileEntity.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 5: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 2: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glTranslated(0.5D, 0.0D, -0.5D);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.chemfac_tex);
|
||||
ResourceManager.chemfac.renderPart("Main");
|
||||
|
||||
float slowdown = 2.5F;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(1, 0, 0);
|
||||
GL11.glRotated(System.currentTimeMillis() % (int)(360 * slowdown) / slowdown + f, 0, -1, 0);
|
||||
GL11.glTranslated(-1, 0, 0);
|
||||
ResourceManager.chemfac.renderPart("Fan1");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-1, 0, 0);
|
||||
GL11.glRotated(System.currentTimeMillis() % (int)(360 * slowdown) / slowdown + f, 0, -1, 0);
|
||||
GL11.glTranslated(1, 0, 0);
|
||||
ResourceManager.chemfac.renderPart("Fan2");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@ -59,5 +59,4 @@ public class AudioDynamic extends MovingSound {
|
||||
public float func(float f, float v) {
|
||||
return (f / v) * -2 + 2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,11 +1,16 @@
|
||||
package com.hbm.sound.nt;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public interface ISoundSourceTE {
|
||||
|
||||
public Vec3 getSoundLocation();
|
||||
|
||||
public boolean isPlaying();
|
||||
|
||||
public default Vec3 getSoundLocation() {
|
||||
TileEntity te = (TileEntity) this;
|
||||
return Vec3.createVectorHelper(te.xCoord + 0.5, te.yCoord + 0.5, te.zCoord + 0.5);
|
||||
}
|
||||
|
||||
public default float getVolume() {
|
||||
return 1F;
|
||||
|
||||
@ -1,25 +1,51 @@
|
||||
package com.hbm.sound.nt;
|
||||
|
||||
import net.minecraft.client.audio.ITickableSound;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.audio.SoundHandler;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class SoundTE implements ITickableSound {
|
||||
/**
|
||||
* I have a dream. That one day every tile entity in this codebase will control their
|
||||
* own sounds. A codebase of the truly free, dammit. A codebase of functionality, not
|
||||
* patterns, ruled by necessity, not chance! Where the code changes to suit the use
|
||||
* case, not the other way around. Where methods and fields are back where they belong:
|
||||
* in the hands of the tile entities! Where every object is free to think - to calcilate
|
||||
* - for itself! Fuck all these limp-dick programmers and chickenshit coders. Fuck this
|
||||
* 24-hour Internet spew of design classes and Stack Overflow bullshit! Fuck duct tape
|
||||
* pride! Fuck the patterns! FUCK ALL OF IT! NTM is diseased. Rotten to the core.
|
||||
* There's no saving it - we need to pull it out by the classroot. Wipe the slate clean.
|
||||
* BURN IT DOWN! And from the ashes, the mother of all omelettes will be born. Evolved,
|
||||
* but unconventional! The broken will be purged and the cleanest will thrive - free to
|
||||
* function as they see fit, they'll make NTM great again! ...in my new NTM, tile
|
||||
* entities will expire and invalidate for what they BELIEVE! Not for memory space, not
|
||||
* for compatibility! Not for what they're told is professional. Every tile will be free
|
||||
* to load its own chunks!
|
||||
* @author hbm
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class SoundTE implements ISound {
|
||||
|
||||
ISoundSourceTE source;
|
||||
|
||||
private ResourceLocation sound;
|
||||
private boolean canRepeat = true;
|
||||
private int repeatDelay = 0;
|
||||
private boolean donePlaying = true;
|
||||
private float soundX;
|
||||
private float soundY;
|
||||
private float soundZ;
|
||||
private float volume;
|
||||
private float pitch;
|
||||
|
||||
public SoundTE(String sound) {
|
||||
private boolean isSoundOn = false;
|
||||
|
||||
public SoundTE(String sound, ISoundSourceTE source) {
|
||||
this.sound = new ResourceLocation(sound);
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -67,11 +93,28 @@ public class SoundTE implements ITickableSound {
|
||||
return AttenuationType.LINEAR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
/**
|
||||
* Called by proxy of the SoundWrapper from the holding tile entity, once per tick.
|
||||
*/
|
||||
public void updateExternally() {
|
||||
|
||||
if(this.source == null)
|
||||
SoundHandler handler = Minecraft.getMinecraft().getSoundHandler();
|
||||
|
||||
if(isSoundOn && !this.source.isPlaying()) {
|
||||
handler.stopSound(this);
|
||||
isSoundOn = false;
|
||||
return;
|
||||
}
|
||||
|
||||
//TODO: drown this class, the minecraft sound handler and the entire fucking game in holy water
|
||||
//no, it won't fix anything but at least the pain will be over
|
||||
|
||||
if(!isSoundOn && this.source.isPlaying()) {
|
||||
try {
|
||||
handler.playSound(this);
|
||||
} catch(IllegalArgumentException ex) { }
|
||||
isSoundOn = true;
|
||||
}
|
||||
|
||||
this.volume = this.source.getVolume();
|
||||
this.pitch = this.source.getPitch();
|
||||
@ -82,9 +125,4 @@ public class SoundTE implements ITickableSound {
|
||||
this.soundZ = (float) pos.zCoord;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDonePlaying() {
|
||||
return this.donePlaying;
|
||||
}
|
||||
}
|
||||
|
||||
6
src/main/java/com/hbm/sound/nt/SoundWrapper.java
Normal file
@ -0,0 +1,6 @@
|
||||
package com.hbm.sound.nt;
|
||||
|
||||
public class SoundWrapper {
|
||||
|
||||
public void updateSound() { }
|
||||
}
|
||||
19
src/main/java/com/hbm/sound/nt/SoundWrapperClient.java
Normal file
@ -0,0 +1,19 @@
|
||||
package com.hbm.sound.nt;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class SoundWrapperClient extends SoundWrapper {
|
||||
|
||||
private SoundTE sound;
|
||||
|
||||
public SoundWrapperClient(String sound, ISoundSourceTE source) {
|
||||
this.sound = new SoundTE(sound, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSound() {
|
||||
this.sound.updateExternally();
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,17 @@
|
||||
package com.hbm.tileentity;
|
||||
|
||||
import com.hbm.packet.NBTPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public interface INBTPacketReceiver {
|
||||
|
||||
public void networkUnpack(NBTTagCompound nbt);
|
||||
|
||||
public static void networkPack(TileEntity that, NBTTagCompound data, int range) {
|
||||
PacketDispatcher.wrapper.sendToAllAround(new NBTPacket(data, that.xCoord, that.yCoord, that.zCoord), new TargetPoint(that.getWorldObj().provider.dimensionId, that.xCoord, that.yCoord, that.zCoord, range));
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,6 +247,8 @@ public class TileMappings {
|
||||
put(TileEntityMachineSolidifier.class, "tileentity_solidifier");
|
||||
|
||||
put(TileEntityMachineChemplant.class, "tileentity_chemical_plant");
|
||||
put(TileEntityMachineChemfac.class, "tileentity_chemfac");
|
||||
|
||||
put(TileEntityMachineOilWell.class, "tileentity_derrick");
|
||||
put(TileEntityMachinePumpjack.class, "tileentity_machine_pumpjack");
|
||||
put(TileEntityMachineFrackingTower.class, "tileentity_fracking_tower");
|
||||
|
||||
@ -0,0 +1,101 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
|
||||
public class TileEntityMachineChemfac extends TileEntityMachineChemplantBase {
|
||||
|
||||
public TileEntityMachineChemfac() {
|
||||
super(77);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return new ArrayList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRecipeCount() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTankCapacity() {
|
||||
return 32_000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTemplateIndex(int index) {
|
||||
return 13 + index * 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getSlotIndicesFromIndex(int index) {
|
||||
return new int[] {5 + index * 9, 8 + index * 9, 9 + index * 9, 12 + index * 9};
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChunkCoordinates[] getInputPositions() {
|
||||
return new ChunkCoordinates[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChunkCoordinates[] getOutputPositions() {
|
||||
return new ChunkCoordinates[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.machineChemFac";
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 5,
|
||||
yCoord,
|
||||
zCoord - 5,
|
||||
xCoord + 5,
|
||||
yCoord + 4,
|
||||
zCoord + 5
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
}
|
||||
@ -16,6 +16,9 @@ import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.sound.nt.ISoundSourceTE;
|
||||
import com.hbm.sound.nt.SoundWrapper;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
|
||||
@ -27,7 +30,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineChemplant extends TileEntityMachineBase implements IEnergyUser, IFluidSource, IFluidAcceptor {
|
||||
public class TileEntityMachineChemplant extends TileEntityMachineBase implements IEnergyUser, IFluidSource, IFluidAcceptor, ISoundSourceTE {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000;
|
||||
@ -35,6 +38,8 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
public int maxProgress = 100;
|
||||
public boolean isProgressing;
|
||||
|
||||
private SoundWrapper audio;
|
||||
|
||||
public FluidTank[] tanks;
|
||||
|
||||
//upgraded stats
|
||||
@ -86,7 +91,7 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
loadItems();
|
||||
unloadItems();
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 1 == 0) {
|
||||
if(worldObj.getTotalWorldTime() % 10 == 0) {
|
||||
this.fillFluidInit(tanks[2].getTankType());
|
||||
this.fillFluidInit(tanks[3].getTankType());
|
||||
}
|
||||
@ -136,6 +141,12 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
double z = zCoord + 0.5 + dir.offsetZ * 1.125 + rot.offsetZ * 0.125;
|
||||
worldObj.spawnParticle("cloud", x, y, z, 0.0, 0.1, 0.0);
|
||||
}
|
||||
|
||||
if(this.audio == null) {
|
||||
this.audio = MainRegistry.proxy.getTileSound("hbm:block.chemplantOperate", this);
|
||||
}
|
||||
|
||||
this.audio.updateSound();
|
||||
}
|
||||
}
|
||||
|
||||
@ -515,4 +526,9 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPlaying() {
|
||||
return !this.isInvalid() && this.isProgressing;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,371 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
|
||||
/**
|
||||
* Base class for single and multi chemplants.
|
||||
* Most stuff should be handled by this class automatically, given the slots and indices are defined correctly
|
||||
* Does not sync automatically, nor handle upgrades
|
||||
* Slot indices are mostly free game, but battery has to be slot 0
|
||||
* Tanks follow the order R1(I1, I2, O1, O2), R2(I1, I2, O1, O2) ...
|
||||
* @author hbm
|
||||
*/
|
||||
public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBase implements IEnergyUser, IFluidSource, IFluidAcceptor {
|
||||
|
||||
public long power;
|
||||
public int[] progress;
|
||||
public int maxProgress = 100;
|
||||
public boolean isProgressing;
|
||||
|
||||
public FluidTank[] tanks;
|
||||
|
||||
int consumption = 100;
|
||||
int speed = 100;
|
||||
|
||||
public TileEntityMachineChemplantBase(int scount) {
|
||||
super(scount);
|
||||
|
||||
int count = this.getRecipeCount();
|
||||
|
||||
progress = new int[count];
|
||||
|
||||
tanks = new FluidTank[4 * count];
|
||||
for(int i = 0; i < 4 * count; i++) {
|
||||
tanks[i] = new FluidTank(Fluids.NONE, getTankCapacity(), i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
int count = this.getRecipeCount();
|
||||
|
||||
this.isProgressing = false;
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, this.getMaxPower());
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
loadItems(i);
|
||||
unloadItems(i);
|
||||
}
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 1 == 0) {
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
this.fillFluidInit(tanks[i * 4 + 2].getTankType());
|
||||
this.fillFluidInit(tanks[i * 4 + 3].getTankType());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
if(!canProcess(i)) {
|
||||
this.progress[i] = 0;
|
||||
} else {
|
||||
isProgressing = true;
|
||||
process(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean canProcess(int index) {
|
||||
|
||||
int template = getTemplateIndex(index);
|
||||
|
||||
if(slots[template] == null || slots[template].getItem() != ModItems.chemistry_template)
|
||||
return false;
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[template].getItemDamage());
|
||||
|
||||
if(recipe == null)
|
||||
return false;
|
||||
|
||||
setupTanks(recipe, index);
|
||||
|
||||
if(this.power < this.consumption) return false;
|
||||
if(!hasRequiredFluids(recipe, index)) return false;
|
||||
if(!hasSpaceForFluids(recipe, index)) return false;
|
||||
if(!hasRequiredItems(recipe, index)) return false;
|
||||
if(!hasSpaceForItems(recipe, index)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void setupTanks(ChemRecipe recipe, int index) {
|
||||
if(recipe.inputFluids[0] != null) tanks[index * 4].setTankType(recipe.inputFluids[0].type);
|
||||
if(recipe.inputFluids[1] != null) tanks[index * 4 + 1].setTankType(recipe.inputFluids[1].type);
|
||||
if(recipe.outputFluids[0] != null) tanks[index * 4 + 2].setTankType(recipe.outputFluids[0].type);
|
||||
if(recipe.outputFluids[1] != null) tanks[index * 4 + 3].setTankType(recipe.outputFluids[1].type);
|
||||
}
|
||||
|
||||
private boolean hasRequiredFluids(ChemRecipe recipe, int index) {
|
||||
if(recipe.inputFluids[0] != null && tanks[index * 4].getFill() < recipe.inputFluids[0].fill) return false;
|
||||
if(recipe.inputFluids[1] != null && tanks[index * 4 + 1].getFill() < recipe.inputFluids[1].fill) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean hasSpaceForFluids(ChemRecipe recipe, int index) {
|
||||
if(recipe.outputFluids[0] != null && tanks[index * 4 + 2].getFill() + recipe.outputFluids[0].fill > tanks[index * 4 + 2].getMaxFill()) return false;
|
||||
if(recipe.outputFluids[1] != null && tanks[index * 4 + 3].getFill() + recipe.outputFluids[1].fill > tanks[index * 4 + 3].getMaxFill()) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean hasRequiredItems(ChemRecipe recipe, int index) {
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
return InventoryUtil.doesArrayHaveIngredients(slots, indices[2], indices[3], recipe.inputs);
|
||||
}
|
||||
|
||||
private boolean hasSpaceForItems(ChemRecipe recipe, int index) {
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
return InventoryUtil.doesArrayHaveSpace(slots, indices[0], indices[1], recipe.outputs);
|
||||
}
|
||||
|
||||
private void process(int index) {
|
||||
|
||||
this.power -= this.consumption;
|
||||
this.progress[index]++;
|
||||
|
||||
if(slots[0] != null && slots[0].getItem() == ModItems.meteorite_sword_machined)
|
||||
slots[0] = new ItemStack(ModItems.meteorite_sword_treated); //fisfndmoivndlmgindgifgjfdnblfm
|
||||
|
||||
int template = getTemplateIndex(index);
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[template].getItemDamage());
|
||||
|
||||
this.maxProgress = recipe.getDuration() * this.speed / 100;
|
||||
|
||||
if(this.progress[index] >= this.maxProgress) {
|
||||
consumeFluids(recipe, index);
|
||||
produceFluids(recipe, index);
|
||||
consumeItems(recipe, index);
|
||||
produceItems(recipe, index);
|
||||
this.progress[index] = 0;
|
||||
this.markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
private void consumeFluids(ChemRecipe recipe, int index) {
|
||||
if(recipe.inputFluids[0] != null) tanks[index * 4].setFill(tanks[index * 4].getFill() - recipe.inputFluids[0].fill);
|
||||
if(recipe.inputFluids[1] != null) tanks[index * 4 + 1].setFill(tanks[index * 4 + 1].getFill() - recipe.inputFluids[1].fill);
|
||||
}
|
||||
|
||||
private void produceFluids(ChemRecipe recipe, int index) {
|
||||
if(recipe.outputFluids[0] != null) tanks[index * 4 + 2].setFill(tanks[index * 4 + 2].getFill() + recipe.outputFluids[0].fill);
|
||||
if(recipe.outputFluids[1] != null) tanks[index * 4 + 3].setFill(tanks[index * 4 + 3].getFill() + recipe.outputFluids[1].fill);
|
||||
}
|
||||
|
||||
private void consumeItems(ChemRecipe recipe, int index) {
|
||||
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(AStack in : recipe.inputs) {
|
||||
if(in != null)
|
||||
InventoryUtil.tryConsumeAStack(slots, indices[2], indices[3], in);
|
||||
}
|
||||
}
|
||||
|
||||
private void produceItems(ChemRecipe recipe, int index) {
|
||||
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(ItemStack out : recipe.outputs) {
|
||||
if(out != null)
|
||||
InventoryUtil.tryAddItemToInventory(slots, indices[0], indices[1], out.copy());
|
||||
}
|
||||
}
|
||||
private void loadItems(int index) {
|
||||
|
||||
int template = getTemplateIndex(index);
|
||||
if(slots[template] == null || slots[template].getItem() != ModItems.chemistry_template)
|
||||
return;
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[template].getItemDamage());
|
||||
|
||||
if(recipe != null) {
|
||||
|
||||
ChunkCoordinates[] positions = getInputPositions();
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(ChunkCoordinates coord : positions) {
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(coord.posX, coord.posY, coord.posZ);
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
|
||||
for(AStack ingredient : recipe.inputs) {
|
||||
|
||||
if(!InventoryUtil.doesArrayHaveIngredients(slots, indices[0], indices[1], ingredient)) {
|
||||
|
||||
for(int i = 0; i < inv.getSizeInventory(); i++) {
|
||||
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
if(ingredient.matchesRecipe(stack, true)) {
|
||||
|
||||
for(int j = indices[0]; j <= indices[1]; j++) {
|
||||
|
||||
if(slots[j] != null && slots[j].stackSize < slots[j].getMaxStackSize() & InventoryUtil.doesStackDataMatch(slots[j], stack)) {
|
||||
inv.decrStackSize(i, 1);
|
||||
slots[j].stackSize++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = indices[0]; j <= indices[1]; j++) {
|
||||
|
||||
if(slots[j] == null) {
|
||||
slots[j] = stack.copy();
|
||||
slots[j].stackSize = 1;
|
||||
inv.decrStackSize(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void unloadItems(int index) {
|
||||
|
||||
ChunkCoordinates[] positions = getOutputPositions();
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(ChunkCoordinates coord : positions) {
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(coord.posX, coord.posY, coord.posZ);
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
|
||||
for(int i = indices[2]; i <= indices[3]; i++) {
|
||||
|
||||
ItemStack out = slots[i];
|
||||
|
||||
if(out != null) {
|
||||
|
||||
for(int j = 0; j < inv.getSizeInventory(); j++) {
|
||||
ItemStack target = inv.getStackInSlot(j);
|
||||
|
||||
if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < target.getMaxStackSize()) {
|
||||
this.decrStackSize(i, 1);
|
||||
target.stackSize++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = 0; j < inv.getSizeInventory(); j++) {
|
||||
|
||||
if(inv.getStackInSlot(j) == null) {
|
||||
inv.setInventorySlotContents(j, out.copy());
|
||||
inv.getStackInSlot(j).stackSize = 1;
|
||||
this.decrStackSize(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return this.power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index >= 0 && index < tanks.length) tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
|
||||
//TODO: figure this shit out
|
||||
//also this won't work anyway since there's no difference as of now between setting in or output tanks
|
||||
//the recent rework tried to implement that difference but we all know how that went
|
||||
|
||||
/*for(FluidTank tank : tanks) {
|
||||
if(tank.getTankType() == type) {
|
||||
tank.setFill(fill);
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index >= 0 && index < tanks.length) tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
|
||||
int fill = 0;
|
||||
|
||||
for(FluidTank tank : tanks) {
|
||||
if(tank.getTankType() == type) {
|
||||
fill += tank.getFill();
|
||||
}
|
||||
}
|
||||
|
||||
return fill;
|
||||
}
|
||||
|
||||
/* For input only! */
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
|
||||
int maxFill = 0;
|
||||
int count = getRecipeCount();
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
if(tanks[i * 4].getTankType() == type) maxFill += tanks[i * 4].getMaxFill();
|
||||
if(tanks[i * 4 + 1].getTankType() == type) maxFill += tanks[i * 4 + 1].getMaxFill();
|
||||
}
|
||||
|
||||
return maxFill;
|
||||
}
|
||||
|
||||
public abstract int getRecipeCount();
|
||||
public abstract int getTankCapacity();
|
||||
public abstract int getTemplateIndex(int index);
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return A size 4 int array containing min input, max input, min output and max output indices in that order.
|
||||
*/
|
||||
public abstract int[] getSlotIndicesFromIndex(int index);
|
||||
public abstract ChunkCoordinates[] getInputPositions();
|
||||
public abstract ChunkCoordinates[] getOutputPositions();
|
||||
}
|
||||
@ -12,6 +12,7 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.RefineryRecipes;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -21,7 +22,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineCatalyticCracker extends TileEntity implements IFluidSource, IFluidAcceptor {
|
||||
public class TileEntityMachineCatalyticCracker extends TileEntity implements IFluidSource, IFluidAcceptor, INBTPacketReceiver {
|
||||
|
||||
public FluidTank[] tanks;
|
||||
public List<IFluidAcceptor> list1 = new ArrayList();
|
||||
@ -51,9 +52,22 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl
|
||||
fillFluidInit(tanks[2].getTankType());
|
||||
fillFluidInit(tanks[3].getTankType());
|
||||
fillFluidInit(tanks[4].getTankType());
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
for(int i = 0; i < 5; i++)
|
||||
tanks[i].writeToNBT(data, "tank" + i);
|
||||
|
||||
INBTPacketReceiver.networkPack(this, data, 50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
for(int i = 0; i < 5; i++)
|
||||
tanks[i].readFromNBT(nbt, "tank" + i);
|
||||
}
|
||||
|
||||
private void crack() {
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.RefineryRecipes;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
import com.hbm.util.Tuple.Quartet;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -20,9 +20,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import scala.actors.threadpool.Arrays;
|
||||
|
||||
public class TileEntityMachineFractionTower extends TileEntity implements IFluidSource, IFluidAcceptor {
|
||||
public class TileEntityMachineFractionTower extends TileEntity implements IFluidSource, IFluidAcceptor, INBTPacketReceiver {
|
||||
|
||||
public FluidTank[] tanks;
|
||||
public List<IFluidAcceptor> list1 = new ArrayList();
|
||||
@ -73,9 +72,22 @@ public class TileEntityMachineFractionTower extends TileEntity implements IFluid
|
||||
if(worldObj.getTotalWorldTime() % 10 == 0) {
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
fillFluidInit(tanks[2].getTankType());
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
tanks[i].writeToNBT(data, "tank" + i);
|
||||
|
||||
INBTPacketReceiver.networkPack(this, data, 50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
for(int i = 0; i < 3; i++)
|
||||
tanks[i].readFromNBT(nbt, "tank" + i);
|
||||
}
|
||||
|
||||
private void setupTanks() {
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package com.hbm.util;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.mob.EntityDuck;
|
||||
import com.hbm.entity.mob.EntityNuclearCreeper;
|
||||
import com.hbm.entity.mob.EntityQuackos;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.handler.HazmatRegistry;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
|
||||
@ -23,7 +23,6 @@ import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
public class ContaminationUtil {
|
||||
|
||||
@ -44,44 +43,6 @@ public class ContaminationUtil {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/// RADIATION ///
|
||||
private static void applyRadData(Entity e, float f) {
|
||||
|
||||
if(!(e instanceof EntityLivingBase))
|
||||
return;
|
||||
|
||||
if(isRadImmune(e))
|
||||
return;
|
||||
|
||||
EntityLivingBase entity = (EntityLivingBase)e;
|
||||
|
||||
if(e instanceof EntityPlayer && ((EntityPlayer)e).capabilities.isCreativeMode)
|
||||
return;
|
||||
|
||||
if(e instanceof EntityPlayer && e.ticksExisted < 200)
|
||||
return;
|
||||
|
||||
f *= calculateRadiationMod(entity);
|
||||
|
||||
HbmLivingProps.incrementRadiation(entity, f);
|
||||
}
|
||||
|
||||
private static void applyRadDirect(Entity e, float f) {
|
||||
|
||||
if(!(e instanceof EntityLivingBase))
|
||||
return;
|
||||
|
||||
EntityLivingBase entity = (EntityLivingBase)e;
|
||||
|
||||
if(isRadImmune(e))
|
||||
return;
|
||||
|
||||
if(e instanceof EntityPlayer && ((EntityPlayer)e).capabilities.isCreativeMode)
|
||||
return;
|
||||
|
||||
HbmLivingProps.incrementRadiation(entity, f);
|
||||
}
|
||||
|
||||
public static float getRads(Entity e) {
|
||||
|
||||
if(!(e instanceof EntityLivingBase))
|
||||
@ -135,6 +96,9 @@ public class ContaminationUtil {
|
||||
if(!(e instanceof EntityLivingBase))
|
||||
return;
|
||||
|
||||
if(e instanceof EntityDuck || e instanceof EntityOcelot)
|
||||
return;
|
||||
|
||||
if(e instanceof EntityPlayer && ((EntityPlayer)e).capabilities.isCreativeMode)
|
||||
return;
|
||||
|
||||
|
||||
@ -20,8 +20,8 @@ public class SoundUtil {
|
||||
Map nameMapping = (Map) ReflectionHelper.findField(SoundCategory.class, "field_147168_j").get(null);
|
||||
Map idMapping = (Map) ReflectionHelper.findField(SoundCategory.class, "field_147169_k").get(null);
|
||||
|
||||
Map mapSoundLevelsOrig = (Map) ReflectionHelper.findField(GameSettings.class, "mapSoundLevels" /* TODO: add obfus case */).get(Minecraft.getMinecraft().gameSettings);
|
||||
Map mapSoundLevels = Maps.newEnumMap(SoundCategory.class); //(Map) ReflectionHelper.findField(GameSettings.class, "mapSoundLevels" /* TODO: add obfus case */).get(Minecraft.getMinecraft().gameSettings);
|
||||
Map mapSoundLevelsOrig = (Map) ReflectionHelper.findField(GameSettings.class, "mapSoundLevels", "field_151446_aD").get(Minecraft.getMinecraft().gameSettings);
|
||||
Map mapSoundLevels = Maps.newEnumMap(SoundCategory.class);
|
||||
|
||||
nameMapping.put(category.getCategoryName(), category);
|
||||
idMapping.put(Integer.valueOf(category.getCategoryId()), category);
|
||||
|
||||
@ -2833,6 +2833,8 @@ rbmk.rod.xenon=Xenonvergiftung: %s
|
||||
rbmk.rod.coreTemp=Kerntemperatur: %s
|
||||
rbmk.rod.skinTemp=Außentemperatur: %s / %s
|
||||
|
||||
soundCategory.ntmMachines=NTM Maschinen
|
||||
|
||||
tile.absorber.name=Strahlungs-Absorber
|
||||
tile.absorber_green.name=Fortgeschrittener Strahlungs-Absorber
|
||||
tile.absorber_pink.name=Elite Strahlungs-Absorber
|
||||
|
||||
@ -3196,6 +3196,8 @@ rbmk.rod.xenon=Xenon poison: %s
|
||||
rbmk.rod.coreTemp=Core temperature: %s
|
||||
rbmk.rod.skinTemp=Skin temperature: %s / %s
|
||||
|
||||
soundCategory.ntmMachines=NTM Machines
|
||||
|
||||
tile.absorber.name=Radiation Absorber
|
||||
tile.absorber_green.name=Advanced Radiation Absorber
|
||||
tile.absorber_pink.name=Elite Radiation Absorber
|
||||
|
||||
@ -9,101 +9,131 @@ v -0.250000 -0.187500 -0.250000
|
||||
v -0.250000 -0.187500 0.250000
|
||||
v 0.250000 -0.187500 -0.250000
|
||||
v 0.250000 -0.312500 -0.250000
|
||||
v -0.468750 -0.500000 0.468750
|
||||
v 0.468750 -0.250000 -0.468750
|
||||
v -0.031250 -0.500000 0.468750
|
||||
v 0.468750 -0.250000 0.468750
|
||||
v 0.031250 -0.250000 -0.468750
|
||||
v -0.468750 -0.500000 -0.468750
|
||||
v 0.031250 -0.250000 0.468750
|
||||
v -0.031250 -0.500000 -0.468750
|
||||
v 0.031250 -0.500000 0.468750
|
||||
v -0.031250 -0.250000 -0.468750
|
||||
v 0.468750 -0.500000 0.468750
|
||||
v 0.031250 -0.500000 -0.468750
|
||||
v 0.468750 -0.500000 -0.468750
|
||||
v -0.031250 -0.250000 -0.468750
|
||||
v -0.031250 -0.250000 0.468750
|
||||
v -0.468750 -0.250000 -0.468750
|
||||
v -0.468750 -0.250000 0.468750
|
||||
v 0.031250 -0.500000 -0.468750
|
||||
v -0.031250 -0.250000 0.468750
|
||||
v 0.468750 -0.500000 -0.468750
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
v -0.468750 -0.500000 0.468750
|
||||
v -0.031250 -0.500000 0.468750
|
||||
v -0.468750 -0.500000 -0.468750
|
||||
v -0.031250 -0.500000 -0.468750
|
||||
vt -0.000000 -0.000000
|
||||
vt 0.937500 0.437500
|
||||
vt -0.000000 0.437500
|
||||
vt 0.937500 0.000000
|
||||
vt -0.000000 0.437500
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.000000 0.437500
|
||||
vt 0.250000 0.875000
|
||||
vt 0.750000 0.375000
|
||||
vt 0.750000 0.875000
|
||||
vt 0.250000 0.375000
|
||||
vt 0.750000 0.875000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.937500 0.187500
|
||||
vt -0.000000 0.437500
|
||||
vt -0.000000 0.187500
|
||||
vt 0.250000 0.875000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.250000 0.375000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.250000 0.375000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.250000 0.375000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.250000 0.375000
|
||||
vt 0.750000 0.375000
|
||||
vt 0.750000 0.375000
|
||||
vt 0.750000 0.375000
|
||||
vt 0.750000 0.375000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.937500 0.187500
|
||||
vt -0.000000 0.437500
|
||||
vt -0.000000 0.187500
|
||||
vt -0.000000 -0.000000
|
||||
vt 0.937500 0.437500
|
||||
vt -0.000000 0.437500
|
||||
vt 0.937500 0.000000
|
||||
vt -0.000000 0.437500
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.000000 0.437500
|
||||
vt 0.250000 0.875000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.937500 0.187500
|
||||
vt -0.000000 0.437500
|
||||
vt -0.000000 0.187500
|
||||
vt 0.250000 0.875000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.937500 0.187500
|
||||
vt -0.000000 0.437500
|
||||
vt -0.000000 0.187500
|
||||
vt 0.937500 0.000000
|
||||
vt 0.937500 0.437500
|
||||
vt 0.250000 0.437500
|
||||
vt 0.937500 0.437500
|
||||
vt 0.250000 0.437500
|
||||
vt 0.937500 0.437500
|
||||
vt 0.937500 0.000000
|
||||
vt 0.937500 0.437500
|
||||
vt 0.250000 0.437500
|
||||
vt 0.937500 0.437500
|
||||
vt 0.250000 0.437500
|
||||
vt 0.937500 0.437500
|
||||
vt 0.375000 1.000000
|
||||
vt 0.875000 0.500000
|
||||
vt 0.875000 1.000000
|
||||
vt 0.375000 0.500000
|
||||
vt 0.875000 1.000000
|
||||
vt 0.375000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.875000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.875000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.875000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.875000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.375000 0.500000
|
||||
vt 0.875000 1.000000
|
||||
vt 0.875000 1.000000
|
||||
vt 0.875000 1.000000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 -1.0000 -0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 -0.0000 1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 -0.0000 1.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
s off
|
||||
f 23/1/1 20/2/1 21/3/1
|
||||
f 12/4/1 13/5/1 15/6/1
|
||||
f 22/7/2 19/8/2 17/9/2
|
||||
f 14/10/2 11/11/2 9/12/2
|
||||
f 22/7/3 10/13/3 24/14/3
|
||||
f 23/1/4 9/12/4 11/11/4
|
||||
f 24/14/5 12/4/5 19/8/5
|
||||
f 20/2/3 16/15/3 14/10/3
|
||||
f 21/3/6 14/10/6 9/12/6
|
||||
f 18/16/5 11/11/5 16/15/5
|
||||
f 19/8/4 15/6/4 17/9/4
|
||||
f 17/9/6 13/5/6 22/7/6
|
||||
f 23/1/1 18/16/1 20/2/1
|
||||
f 12/4/1 10/13/1 13/5/1
|
||||
f 22/7/2 24/14/2 19/8/2
|
||||
f 14/10/2 16/15/2 11/11/2
|
||||
f 22/7/3 13/5/3 10/13/3
|
||||
f 23/1/4 21/3/4 9/12/4
|
||||
f 24/14/5 10/13/5 12/4/5
|
||||
f 20/2/3 18/16/3 16/15/3
|
||||
f 21/3/6 20/2/6 14/10/6
|
||||
f 18/16/5 23/1/5 11/11/5
|
||||
f 19/8/4 12/4/4 15/6/4
|
||||
f 17/9/6 15/6/6 13/5/6
|
||||
f 10/1/1 11/2/1 12/3/1
|
||||
f 15/4/2 14/5/2 13/6/2
|
||||
f 15/7/3 9/8/3 16/9/3
|
||||
f 16/10/4 10/11/4 14/12/4
|
||||
f 14/5/5 12/13/5 13/14/5
|
||||
f 13/15/6 11/16/6 15/17/6
|
||||
f 18/18/1 19/19/1 20/20/1
|
||||
f 23/21/2 22/22/2 21/23/2
|
||||
f 23/24/3 17/25/3 24/26/3
|
||||
f 24/27/4 18/28/4 22/29/4
|
||||
f 22/22/5 20/30/5 21/31/5
|
||||
f 21/32/6 19/33/6 23/34/6
|
||||
f 10/1/1 9/35/1 11/2/1
|
||||
f 15/4/2 16/36/2 14/5/2
|
||||
f 15/7/3 11/37/3 9/8/3
|
||||
f 16/10/4 9/38/4 10/11/4
|
||||
f 14/5/5 10/39/5 12/13/5
|
||||
f 13/15/6 12/40/6 11/16/6
|
||||
f 18/18/1 17/41/1 19/19/1
|
||||
f 23/21/2 24/42/2 22/22/2
|
||||
f 23/24/3 19/43/3 17/25/3
|
||||
f 24/27/4 17/44/4 18/28/4
|
||||
f 22/22/5 18/45/5 20/30/5
|
||||
f 21/32/6 20/46/6 19/33/6
|
||||
s 1
|
||||
f 1/17/2 2/18/2 3/19/2
|
||||
f 4/20/1 5/21/1 6/22/1
|
||||
f 1/23/3 7/24/3 8/25/3
|
||||
f 2/26/4 6/27/4 3/28/4
|
||||
f 8/29/5 4/20/5 2/30/5
|
||||
f 3/31/6 5/32/6 1/33/6
|
||||
f 1/17/2 8/34/2 2/18/2
|
||||
f 4/20/1 7/35/1 5/21/1
|
||||
f 1/23/3 5/36/3 7/24/3
|
||||
f 2/26/4 4/37/4 6/27/4
|
||||
f 8/29/5 7/35/5 4/20/5
|
||||
f 3/31/6 6/38/6 5/32/6
|
||||
f 1/47/2 2/48/2 3/49/2
|
||||
f 4/50/1 5/51/1 6/52/1
|
||||
f 1/53/3 7/54/3 8/55/3
|
||||
f 2/56/5 6/57/5 3/58/5
|
||||
f 8/59/4 4/60/4 2/61/4
|
||||
f 3/62/6 5/63/6 1/64/6
|
||||
f 1/47/2 8/65/2 2/48/2
|
||||
f 4/50/1 7/54/1 5/51/1
|
||||
f 1/53/3 5/51/3 7/54/3
|
||||
f 2/56/5 4/66/5 6/57/5
|
||||
f 8/59/4 7/67/4 4/60/4
|
||||
f 3/62/6 6/68/6 5/63/6
|
||||
|
||||
9259
src/main/resources/assets/hbm/models/machines/chemfac.obj
Normal file
@ -5,20 +5,20 @@
|
||||
"misc.nullMine": {"category": "player", "sounds": [{"name": "misc/null", "stream": false}]},
|
||||
|
||||
"block.crateBreak": {"category": "block", "sounds": ["block/crateBreak1", "block/crateBreak2", "block/crateBreak3", "block/crateBreak4", "block/crateBreak5"]},
|
||||
"block.shutdown": {"category": "block", "sounds": [{"name": "block/shutdown", "stream": true}]},
|
||||
"block.minerOperate": {"category": "block", "sounds": [{"name": "block/minerOperate", "stream": true}]},
|
||||
"block.assemblerOperate": {"category": "block", "sounds": [{"name": "block/assemblerOperate", "stream": true}]},
|
||||
"block.chemplantOperate": {"category": "block", "sounds": [{"name": "block/chemplantOperate", "stream": true}]},
|
||||
"block.dieselOperate": {"category": "block", "sounds": [{"name": "block/dieselOperate", "stream": true}]},
|
||||
"block.igeneratorOperate": {"category": "block", "sounds": [{"name": "block/igeneratorOperate", "stream": true}]},
|
||||
"block.turbofanOperate": {"category": "block", "sounds": [{"name": "block/turbofanOperate", "stream": true}]},
|
||||
"block.pressOperate": {"category": "block", "sounds": [{"name": "block/pressOperate", "stream": false}]},
|
||||
"block.shutdown": {"category": "ntmMachines", "sounds": [{"name": "block/shutdown", "stream": true}]},
|
||||
"block.minerOperate": {"category": "ntmMachines", "sounds": [{"name": "block/minerOperate", "stream": true}]},
|
||||
"block.assemblerOperate": {"category": "ntmMachines", "sounds": [{"name": "block/assemblerOperate", "stream": true}]},
|
||||
"block.chemplantOperate": {"category": "ntmMachines", "sounds": [{"name": "block/chemplantOperate", "stream": true}]},
|
||||
"block.dieselOperate": {"category": "ntmMachines", "sounds": [{"name": "block/dieselOperate", "stream": true}]},
|
||||
"block.igeneratorOperate": {"category": "ntmMachines", "sounds": [{"name": "block/igeneratorOperate", "stream": true}]},
|
||||
"block.turbofanOperate": {"category": "ntmMachines", "sounds": [{"name": "block/turbofanOperate", "stream": true}]},
|
||||
"block.pressOperate": {"category": "ntmMachines", "sounds": [{"name": "block/pressOperate", "stream": false}]},
|
||||
"block.broadcast1": {"category": "block", "sounds": [{"name": "block/broadcast1", "stream": true}]},
|
||||
"block.broadcast2": {"category": "block", "sounds": [{"name": "block/broadcast2", "stream": true}]},
|
||||
"block.broadcast3": {"category": "block", "sounds": [{"name": "block/broadcast3", "stream": true}]},
|
||||
"block.sonarPing": {"category": "block", "sounds": [{"name": "block/sonarPing", "stream": false}]},
|
||||
"block.reactorStart": {"category": "block", "sounds": [{"name": "block/reactorStart", "stream": false}]},
|
||||
"block.reactorStop": {"category": "block", "sounds": [{"name": "block/reactorStop", "stream": false}]},
|
||||
"block.sonarPing": {"category": "ntmMachines", "sounds": [{"name": "block/sonarPing", "stream": false}]},
|
||||
"block.reactorStart": {"category": "ntmMachines", "sounds": [{"name": "block/reactorStart", "stream": false}]},
|
||||
"block.reactorStop": {"category": "ntmMachines", "sounds": [{"name": "block/reactorStop", "stream": false}]},
|
||||
"block.vaultScrape": {"category": "block", "sounds": [{"name": "block/vaultScrape", "stream": false}]},
|
||||
"block.vaultThud": {"category": "block", "sounds": [{"name": "block/vaultThud", "stream": false}]},
|
||||
"block.vaultScrapeNew": {"category": "block", "sounds": [{"name": "block/vaultScrapeNew", "stream": false}]},
|
||||
@ -26,17 +26,17 @@
|
||||
"block.lockOpen": {"category": "block", "sounds": [{"name": "block/lockOpen", "stream": false}]},
|
||||
"block.lockHang": {"category": "block", "sounds": [{"name": "block/lockHang", "stream": false}]},
|
||||
"block.debris": {"category": "block", "sounds": ["block/debris1", "block/debris2", "block/debris3"]},
|
||||
"block.centrifugeOperate": {"category": "block", "sounds": [{"name": "block/centrifugeOperate", "stream": true}]},
|
||||
"block.centrifugeOperate": {"category": "ntmMachines", "sounds": [{"name": "block/centrifugeOperate", "stream": true}]},
|
||||
"block.pipePlaced": {"category": "block", "sounds": [{"name": "block/pipePlaced", "stream": false}]},
|
||||
"block.missileAssembly": {"category": "block", "sounds": [{"name": "block/missileAssembly", "stream": false}]},
|
||||
"block.missileAssembly2": {"category": "block", "sounds": [{"name": "block/missileAssembly2", "stream": false}]},
|
||||
"block.missileAssembly": {"category": "ntmMachines", "sounds": [{"name": "block/missileAssembly", "stream": false}]},
|
||||
"block.missileAssembly2": {"category": "ntmMachines", "sounds": [{"name": "block/missileAssembly2", "stream": false}]},
|
||||
"block.openDoor": {"category": "block", "sounds": ["block/door_open_1", "block/door_open_2"]},
|
||||
"block.closeDoor": {"category": "block", "sounds": ["block/door_close_1", "block/door_close_2"]},
|
||||
"block.soyuzReady": {"category": "block", "sounds": [{"name": "block/soyuzReady", "stream": true}]},
|
||||
"block.soyuzReady": {"category": "ntmMachines", "sounds": [{"name": "block/soyuzReady", "stream": true}]},
|
||||
"block.screm": {"category": "block", "sounds": ["screm/scream1", "screm/scream01", "screm/scream2", "screm/scream02", "screm/scream3", "screm/scream03", "screm/scream4", "screm/scream04", "screm/scream5", "screm/scream05", "screm/scream6", "screm/scream06", "screm/scream7", "screm/scream07", "screm/scream08", "screm/scream09", "screm/scream10", "screm/scream11", "screm/scream12", "screm/scream13", "screm/scream14", "screm/scream15", "screm/scream16", "screm/scream17", "screm/scream18", "screm/scream19", "screm/scream20", "screm/scream21", "screm/scream22", "screm/scream23", "screm/scream24", "screm/scream25"]},
|
||||
"block.rbmk_explosion": {"category": "block", "sounds": [{"name": "block/rbmk_explosion", "stream": false}]},
|
||||
"block.rbmk_az5_cover": {"category": "block", "sounds": [{"name": "block/rbmk_az5_cover", "stream": false}]},
|
||||
"block.chungusLever": {"category": "block", "sounds": [{"name": "block/chungusLever", "stream": false}]},
|
||||
"block.chungusLever": {"category": "ntmMachines", "sounds": [{"name": "block/chungusLever", "stream": false}]},
|
||||
"block.bobble": {"category": "block", "sounds": [{"name": "block/bobble", "stream": false}]},
|
||||
|
||||
"item.techBleep": {"category": "player", "sounds": [{"name": "tool/techBleep", "stream": false}]},
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/blocks/block_eternit.png
Normal file
|
After Width: | Height: | Size: 763 B |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 257 B After Width: | Height: | Size: 253 B |
|
After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 2.6 KiB |