mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
mask filter unscrewing, small cooling tower, bedrock ore improvements
This commit is contained in:
parent
fad8924b7d
commit
a29f1ab8f8
@ -864,6 +864,7 @@ public class ModBlocks {
|
|||||||
|
|
||||||
public static Block machine_chungus;
|
public static Block machine_chungus;
|
||||||
public static Block machine_condenser;
|
public static Block machine_condenser;
|
||||||
|
public static Block machine_tower_small;
|
||||||
public static Block machine_tower_large;
|
public static Block machine_tower_large;
|
||||||
|
|
||||||
public static Block machine_deaerator;
|
public static Block machine_deaerator;
|
||||||
@ -1971,6 +1972,7 @@ public class ModBlocks {
|
|||||||
machine_large_turbine = new MachineLargeTurbine(Material.iron).setBlockName("machine_large_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_large_turbine");
|
machine_large_turbine = new MachineLargeTurbine(Material.iron).setBlockName("machine_large_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_large_turbine");
|
||||||
machine_chungus = new MachineChungus(Material.iron).setBlockName("machine_chungus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chungus");
|
machine_chungus = new MachineChungus(Material.iron).setBlockName("machine_chungus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chungus");
|
||||||
machine_condenser = new MachineCondenser(Material.iron).setBlockName("machine_condenser").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":condenser");
|
machine_condenser = new MachineCondenser(Material.iron).setBlockName("machine_condenser").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":condenser");
|
||||||
|
machine_tower_small = new MachineTowerSmall(Material.iron).setBlockName("machine_tower_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_tower_small");
|
||||||
machine_tower_large = new MachineTowerLarge(Material.iron).setBlockName("machine_tower_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_tower_large");
|
machine_tower_large = new MachineTowerLarge(Material.iron).setBlockName("machine_tower_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_tower_large");
|
||||||
|
|
||||||
anvil_iron = new NTMAnvil(Material.iron, 1).setBlockName("anvil_iron").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_iron");
|
anvil_iron = new NTMAnvil(Material.iron, 1).setBlockName("anvil_iron").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_iron");
|
||||||
@ -2810,6 +2812,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(machine_large_turbine, machine_large_turbine.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_large_turbine, machine_large_turbine.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_chungus, machine_chungus.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_chungus, machine_chungus.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_condenser, machine_condenser.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_condenser, machine_condenser.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(machine_tower_small, machine_tower_small.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_tower_large, machine_tower_large.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_tower_large, machine_tower_large.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_deaerator, machine_deaerator.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_deaerator, machine_deaerator.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_waste_drum, machine_waste_drum.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_waste_drum, machine_waste_drum.getUnlocalizedName());
|
||||||
|
|||||||
52
src/main/java/com/hbm/blocks/machine/MachineTowerSmall.java
Normal file
52
src/main/java/com/hbm/blocks/machine/MachineTowerSmall.java
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityTowerSmall;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineTowerSmall extends BlockDummyable {
|
||||||
|
|
||||||
|
public MachineTowerSmall(Material mat) {
|
||||||
|
super(mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World p_149915_1_, int meta) {
|
||||||
|
|
||||||
|
if(meta >= 12)
|
||||||
|
return new TileEntityTowerSmall();
|
||||||
|
|
||||||
|
if(meta >= 8)
|
||||||
|
return new TileEntityProxyCombo(false, false, true);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDimensions() {
|
||||||
|
return new int[] {12, 0, 1, 1, 1, 1};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOffset() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@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 = x + dir.offsetX * o;
|
||||||
|
z = z + dir.offsetZ * o;
|
||||||
|
|
||||||
|
for(int i = 2; i <= 6; i++) {
|
||||||
|
ForgeDirection dr2 = ForgeDirection.getOrientation(i);
|
||||||
|
this.makeExtra(world, x + dr2.offsetX, y, z + dr2.offsetZ);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -23,12 +23,14 @@ import net.minecraft.client.model.ModelBiped;
|
|||||||
import net.minecraft.client.renderer.OpenGlHelper;
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityLiving;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemArmor;
|
import net.minecraft.item.ItemArmor;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ArmorGasMask extends ItemArmor implements IGasMask {
|
public class ArmorGasMask extends ItemArmor implements IGasMask {
|
||||||
|
|
||||||
@ -187,4 +189,25 @@ public class ArmorGasMask extends ItemArmor implements IGasMask {
|
|||||||
public boolean isFilterApplicable(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
public boolean isFilterApplicable(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||||
|
|
||||||
|
if(player.isSneaking()) {
|
||||||
|
|
||||||
|
ItemStack filter = this.getFilter(stack, player);
|
||||||
|
|
||||||
|
if(filter != null) {
|
||||||
|
ArmorUtil.removeFilter(stack);
|
||||||
|
|
||||||
|
if(!player.inventory.addItemStackToInventory(filter)) {
|
||||||
|
player.dropPlayerItemWithRandomChoice(filter, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return stack;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onItemRightClick(stack, world, player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import net.minecraft.client.model.ModelBiped;
|
|||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ArmorHazmatMask extends ArmorHazmat implements IGasMask {
|
public class ArmorHazmatMask extends ArmorHazmat implements IGasMask {
|
||||||
|
|
||||||
@ -68,4 +69,25 @@ public class ArmorHazmatMask extends ArmorHazmat implements IGasMask {
|
|||||||
public boolean isFilterApplicable(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
public boolean isFilterApplicable(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||||
|
|
||||||
|
if(player.isSneaking()) {
|
||||||
|
|
||||||
|
ItemStack filter = this.getFilter(stack, player);
|
||||||
|
|
||||||
|
if(filter != null) {
|
||||||
|
ArmorUtil.removeFilter(stack);
|
||||||
|
|
||||||
|
if(!player.inventory.addItemStackToInventory(filter)) {
|
||||||
|
player.dropPlayerItemWithRandomChoice(filter, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return stack;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onItemRightClick(stack, world, player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ArmorLiquidatorMask extends ArmorLiquidator implements IGasMask {
|
public class ArmorLiquidatorMask extends ArmorLiquidator implements IGasMask {
|
||||||
|
|
||||||
@ -48,4 +49,25 @@ public class ArmorLiquidatorMask extends ArmorLiquidator implements IGasMask {
|
|||||||
public boolean isFilterApplicable(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
public boolean isFilterApplicable(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||||
|
|
||||||
|
if(player.isSneaking()) {
|
||||||
|
|
||||||
|
ItemStack filter = this.getFilter(stack, player);
|
||||||
|
|
||||||
|
if(filter != null) {
|
||||||
|
ArmorUtil.removeFilter(stack);
|
||||||
|
|
||||||
|
if(!player.inventory.addItemStackToInventory(filter)) {
|
||||||
|
player.dropPlayerItemWithRandomChoice(filter, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return stack;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onItemRightClick(stack, world, player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||||
|
|
||||||
public class ItemModGasmask extends ItemArmorMod implements IGasMask {
|
public class ItemModGasmask extends ItemArmorMod implements IGasMask {
|
||||||
@ -119,4 +120,23 @@ public class ItemModGasmask extends ItemArmorMod implements IGasMask {
|
|||||||
public boolean isFilterApplicable(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
public boolean isFilterApplicable(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||||
|
|
||||||
|
if(player.isSneaking()) {
|
||||||
|
|
||||||
|
ItemStack filter = this.getFilter(stack, player);
|
||||||
|
|
||||||
|
if(filter != null) {
|
||||||
|
ArmorUtil.removeFilter(stack);
|
||||||
|
|
||||||
|
if(!player.inventory.addItemStackToInventory(filter)) {
|
||||||
|
player.dropPlayerItemWithRandomChoice(filter, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onItemRightClick(stack, world, player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -841,7 +841,7 @@ public class ModEventHandler {
|
|||||||
else if(player.motionY < 0)
|
else if(player.motionY < 0)
|
||||||
player.motionY = 0;
|
player.motionY = 0;
|
||||||
|
|
||||||
if(isSol) {
|
if(isSol && !player.onGround) {
|
||||||
if(player.getFoodStats().getSaturationLevel() > 0F)
|
if(player.getFoodStats().getSaturationLevel() > 0F)
|
||||||
player.addExhaustion(4F);
|
player.addExhaustion(4F);
|
||||||
else
|
else
|
||||||
|
|||||||
@ -229,9 +229,9 @@ public class TileMappings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void putMachines() {
|
private static void putMachines() {
|
||||||
//TODO: bring some order into this garbage dump
|
|
||||||
map.put(TileEntityCondenser.class, "tileentity_condenser");
|
map.put(TileEntityCondenser.class, "tileentity_condenser");
|
||||||
map.put(TileEntityTowerLarge.class, "tileentity_cooling_tower_larger");
|
map.put(TileEntityTowerSmall.class, "tileentity_cooling_tower_small");
|
||||||
|
map.put(TileEntityTowerLarge.class, "tileentity_cooling_tower_large");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void putPile() {
|
private static void putPile() {
|
||||||
|
|||||||
@ -152,9 +152,7 @@ public class TileEntityMachineMiningDrill extends TileEntityMachineBase implemen
|
|||||||
ItemStack stack1 = new ItemStack(b1.getItemDropped(meta1, rand, fortune), b1.quantityDropped(meta1, fortune, rand), b1.damageDropped(meta1));
|
ItemStack stack1 = new ItemStack(b1.getItemDropped(meta1, rand, fortune), b1.quantityDropped(meta1, fortune, rand), b1.damageDropped(meta1));
|
||||||
|
|
||||||
if(i == this.yCoord - 1 && worldObj.getBlock(this.xCoord, i, this.zCoord) != ModBlocks.drill_pipe) {
|
if(i == this.yCoord - 1 && worldObj.getBlock(this.xCoord, i, this.zCoord) != ModBlocks.drill_pipe) {
|
||||||
if(this.isOreo(this.xCoord, i, this.zCoord) && this.hasSpace(stack)) {
|
if(this.tryDrill(xCoord, i, zCoord) || worldObj.getBlock(xCoord, i, zCoord).isReplaceable(worldObj, xCoord, i, zCoord)) {
|
||||||
//if(stack != null)
|
|
||||||
//this.addItemToInventory(stack);
|
|
||||||
worldObj.setBlock(this.xCoord, i, this.zCoord, ModBlocks.drill_pipe);
|
worldObj.setBlock(this.xCoord, i, this.zCoord, ModBlocks.drill_pipe);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -0,0 +1,53 @@
|
|||||||
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
|
import com.hbm.inventory.FluidTank;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class TileEntityTowerSmall extends TileEntityCondenser {
|
||||||
|
|
||||||
|
public TileEntityTowerSmall() {
|
||||||
|
tanks = new FluidTank[2];
|
||||||
|
tanks[0] = new FluidTank(FluidType.SPENTSTEAM, 1000, 0);
|
||||||
|
tanks[1] = new FluidTank(FluidType.WATER, 1000, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
|
for(int i = 2; i <= 6; i++) {
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||||
|
fillFluid(xCoord + dir.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2, getTact(), type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AxisAlignedBB bb = null;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
|
|
||||||
|
if(bb == null) {
|
||||||
|
bb = AxisAlignedBB.getBoundingBox(
|
||||||
|
xCoord - 1,
|
||||||
|
yCoord,
|
||||||
|
zCoord - 1,
|
||||||
|
xCoord + 2,
|
||||||
|
yCoord + 13,
|
||||||
|
zCoord + 2
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public double getMaxRenderDistanceSquared() {
|
||||||
|
return 65536.0D;
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 856 B |
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
BIN
src/main/resources/assets/hbm/textures/items/pattern.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/pattern.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 179 B |
BIN
src/main/resources/assets/hbm/textures/items/pattern_drawn.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/pattern_drawn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 208 B |
Loading…
x
Reference in New Issue
Block a user