mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fixed mappings and broken textures
This commit is contained in:
parent
6af5a8eb35
commit
1478664109
@ -2,6 +2,7 @@ package com.hbm.blocks;
|
||||
|
||||
import com.hbm.blocks.generic.*;
|
||||
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.ItemRandomOreBlock;
|
||||
import com.hbm.blocks.bomb.*;
|
||||
import com.hbm.blocks.fluid.*;
|
||||
import com.hbm.blocks.gas.*;
|
||||
@ -2399,6 +2400,9 @@ public class ModBlocks {
|
||||
//End Ores
|
||||
GameRegistry.registerBlock(ore_tikite, ore_tikite.getUnlocalizedName());
|
||||
|
||||
//It's a meme you dip
|
||||
GameRegistry.registerBlock(ore_random, ItemRandomOreBlock.class, ore_random.getUnlocalizedName());
|
||||
|
||||
//Crystals
|
||||
GameRegistry.registerBlock(crystal_power, crystal_power.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(crystal_energy, crystal_energy.getUnlocalizedName());
|
||||
|
||||
@ -1,28 +1,59 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.hbm.blocks.IBlockMultiPass;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.block.RenderBlockMultipass;
|
||||
import com.hbm.util.ColorUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class BlockMotherOfAllOres extends BlockContainer implements IBlockMultiPass {
|
||||
|
||||
public static int override = -1;
|
||||
|
||||
public static void shuffleOverride(Random rand) {
|
||||
override = rand.nextInt(uniqueItems.size());
|
||||
}
|
||||
|
||||
public static void resetOverride() {
|
||||
override = -1;
|
||||
}
|
||||
|
||||
public BlockMotherOfAllOres() {
|
||||
super(Material.rock);
|
||||
this.blockIcon = Blocks.stone.getIcon(0, 0);
|
||||
this.setBlockTextureName("stone");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -30,16 +61,54 @@ public class BlockMotherOfAllOres extends BlockContainer implements IBlockMultiP
|
||||
return new TileEntityRandomOre();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
|
||||
for(int i = 0; i < uniqueItems.size(); i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityRandomOre) {
|
||||
return ((TileEntityRandomOre) te).getStack().copy();
|
||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
||||
return new ItemStack(this, 1, ore.getStackId());
|
||||
}
|
||||
|
||||
return super.getPickBlock(target, world, x, y, z);
|
||||
return new ItemStack(ModItems.nothing);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
|
||||
if(fortune == 0xFECE00) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityRandomOre) {
|
||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
||||
ComparableStack item = ore.getCompStack();
|
||||
ret.add(item.toStack());
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
this.dropBlockAsItemWithChance(world, x, y, z, meta, 1, 0xFECE00);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
|
||||
((TileEntityRandomOre)world.getTileEntity(x, y, z)).setItem(stack.getItemDamage());
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -57,6 +126,8 @@ public class BlockMotherOfAllOres extends BlockContainer implements IBlockMultiP
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
|
||||
this.blockIcon = reg.registerIcon("stone");
|
||||
for(int i = 0; i < overlays.length; i++) {
|
||||
overlays[i] = reg.registerIcon(RefStrings.MODID + ":ore_random_" + (i + 1));
|
||||
}
|
||||
@ -67,22 +138,27 @@ public class BlockMotherOfAllOres extends BlockContainer implements IBlockMultiP
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
|
||||
if(RenderBlockMultipass.currentPass == 0)
|
||||
return this.blockIcon;
|
||||
return Blocks.stone.getIcon(0, 0);
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityRandomOre) {
|
||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
||||
ItemStack item = ore.getStack();
|
||||
|
||||
if(item != null) {
|
||||
ComparableStack stack = new ComparableStack(item);
|
||||
int index = stack.hashCode() % overlays.length;
|
||||
return overlays[index];
|
||||
}
|
||||
int index = ore.getStackId() % overlays.length;
|
||||
return overlays[index];
|
||||
}
|
||||
|
||||
return Blocks.stone.getIcon(0, 0);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
if(RenderBlockMultipass.currentPass == 0)
|
||||
return Blocks.stone.getIcon(0, 0);
|
||||
|
||||
return this.getIcon(side, world.getBlockMetadata(x, y, z));
|
||||
int index = meta % overlays.length;
|
||||
return overlays[index];
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -91,19 +167,146 @@ public class BlockMotherOfAllOres extends BlockContainer implements IBlockMultiP
|
||||
|
||||
if(RenderBlockMultipass.currentPass == 0)
|
||||
return 0xffffff;
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityRandomOre) {
|
||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
||||
ItemStack stack = ore.getStack();
|
||||
int color = ColorUtil.getAverageColorFromStack(stack);
|
||||
color = ColorUtil.amplifyColor(color);
|
||||
|
||||
Color col = new Color(color);
|
||||
int r = col.getRed();
|
||||
int g = col.getGreen();
|
||||
int b = col.getBlue();
|
||||
|
||||
float[] hsb = new Color(color).RGBtoHSB(r, g, b, new float[3]);
|
||||
|
||||
if(hsb[1] > 0F && hsb[1] < 0.75F)
|
||||
hsb[1] = 0.75F;
|
||||
|
||||
color = Color.HSBtoRGB(hsb[0], hsb[1], hsb[2]);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
return super.colorMultiplier(world, x, y, z);
|
||||
}
|
||||
|
||||
public static class TileEntityRandomOre extends TileEntity {
|
||||
|
||||
private ComparableStack stack;
|
||||
|
||||
public TileEntityRandomOre() {
|
||||
if(override != -1) {
|
||||
setItem(override);
|
||||
}
|
||||
}
|
||||
|
||||
public void setItem(int id) {
|
||||
ComparableStack comp = itemMap.get(id);
|
||||
this.stack = comp != null ? ((ComparableStack) comp.copy()) : null;
|
||||
|
||||
if(this.worldObj != null)
|
||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
}
|
||||
|
||||
public int getStackId() {
|
||||
return itemMap.inverse().get(getCompStack());
|
||||
}
|
||||
|
||||
public ItemStack getStack() {
|
||||
return new ItemStack(Blocks.dirt);
|
||||
return getCompStack().toStack();
|
||||
}
|
||||
|
||||
public ComparableStack getCompStack() {
|
||||
|
||||
if(stack == null) {
|
||||
int rand = worldObj.rand.nextInt(uniqueItems.size());
|
||||
stack = (ComparableStack) itemMap.get(rand).copy();
|
||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
}
|
||||
|
||||
return stack != null ? stack : new ComparableStack(ModItems.nothing);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
int key = nbt.getInteger("item");
|
||||
this.setItem(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
int key = itemMap.inverse().get(getCompStack());
|
||||
nbt.setInteger("item", key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
this.writeToNBT(nbt);
|
||||
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
this.readFromNBT(pkt.func_148857_g());
|
||||
}
|
||||
}
|
||||
|
||||
public static class ItemRandomOreBlock extends ItemBlock {
|
||||
|
||||
public ItemRandomOreBlock(Block block) {
|
||||
super(block);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
ComparableStack comp = itemMap.get(stack.getItemDamage());
|
||||
ItemStack name = comp != null ? comp.toStack() : new ItemStack(ModItems.nothing);
|
||||
if(name.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
|
||||
name.setItemDamage(0);
|
||||
}
|
||||
return I18nUtil.resolveKey(this.getUnlocalizedName() + ".name", name.getItem().getItemStackDisplayName(name));
|
||||
}
|
||||
}
|
||||
|
||||
public static HashSet<ComparableStack> uniqueItems = new HashSet();
|
||||
public static HashBiMap<Integer, ComparableStack> itemMap = HashBiMap.create();
|
||||
|
||||
public static void init() {
|
||||
|
||||
for(Object b : Block.blockRegistry.getKeys()) {
|
||||
Block block = Block.getBlockFromName((String) b);
|
||||
if(block != null)
|
||||
uniqueItems.add(new ComparableStack(block));
|
||||
}
|
||||
|
||||
for(Object i : Item.itemRegistry.getKeys()) {
|
||||
Item item = (Item) Item.itemRegistry.getObject((String) i);
|
||||
uniqueItems.add(new ComparableStack(item));
|
||||
}
|
||||
|
||||
for(String i : OreDictionary.getOreNames()) {
|
||||
for(ItemStack stack : OreDictionary.getOres(i)) {
|
||||
uniqueItems.add(new ComparableStack(stack));
|
||||
}
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
for(ComparableStack stack : uniqueItems) {
|
||||
itemMap.put(i++, stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,9 +9,11 @@ import com.hbm.lib.Library;
|
||||
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -27,10 +29,17 @@ public class ItemWandD extends Item {
|
||||
|
||||
if(pos != null) {
|
||||
|
||||
EntitySiegeTunneler tunneler = new EntitySiegeTunneler(world);
|
||||
List<EntityZombie> zombies = world.getEntitiesWithinAABB(EntityZombie.class, AxisAlignedBB.getBoundingBox(pos.blockX - 2, pos.blockY - 2, pos.blockZ - 2, pos.blockX + 2, pos.blockY + 2, pos.blockZ + 2));
|
||||
|
||||
for(EntityZombie zombie : zombies) {
|
||||
zombie.setChild(true);
|
||||
zombie.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask_m65));
|
||||
}
|
||||
|
||||
/*EntitySiegeTunneler tunneler = new EntitySiegeTunneler(world);
|
||||
tunneler.setPosition(pos.blockX, pos.blockY + 1, pos.blockZ);
|
||||
tunneler.onSpawnWithEgg(null);
|
||||
world.spawnEntityInWorld(tunneler);
|
||||
world.spawnEntityInWorld(tunneler);*/
|
||||
|
||||
//CellularDungeonFactory.meteor.generate(world, x, y, z, world.rand);
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.lib;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.WorldConfig;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -116,6 +117,12 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.titaniumClusterSpawn, 6, 15, 30, ModBlocks.cluster_titanium);
|
||||
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.aluminiumClusterSpawn, 6, 15, 35, ModBlocks.cluster_aluminium);
|
||||
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.copperClusterSpawn, 6, 15, 20, ModBlocks.cluster_copper);
|
||||
|
||||
for(int k = 0; k < 16; k++) {
|
||||
BlockMotherOfAllOres.shuffleOverride(rand);
|
||||
DungeonToolbox.generateOre(world, rand, i, j, 1, 10, 4, 30, ModBlocks.ore_random);
|
||||
}
|
||||
BlockMotherOfAllOres.resetOverride();
|
||||
|
||||
if(GeneralConfig.enable528ColtanSpawn) {
|
||||
DungeonToolbox.generateOre(world, rand, i, j, GeneralConfig.coltanRate, 4, 15, 40, ModBlocks.ore_coltan);
|
||||
|
||||
@ -74,6 +74,7 @@ public class Library {
|
||||
public static String SolsticeUnlimitd = "f5574fd2-ec28-4927-9d11-3c0c731771f4";
|
||||
public static String FrizzleFrazzle = "fc4cc2ee-12e8-4097-b26a-1c6cb1b96531";
|
||||
public static String the_NCR = "28ae585f-4431-4491-9ce8-3def6126e3c6";
|
||||
public static String Barnaby99_x = "711aaf78-a862-4b7e-921a-216349716e9a";
|
||||
|
||||
public static Set<String> contributors = Sets.newHashSet(new String[] {
|
||||
"06ab7c03-55ce-43f8-9d3c-2850e3c652de", //mustang_rudolf
|
||||
|
||||
@ -38,6 +38,7 @@ import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres;
|
||||
import com.hbm.config.*;
|
||||
import com.hbm.creativetabs.*;
|
||||
import com.hbm.entity.effect.*;
|
||||
@ -972,6 +973,8 @@ public class MainRegistry {
|
||||
|
||||
proxy.registerMissileItems();
|
||||
|
||||
BlockMotherOfAllOres.init();
|
||||
|
||||
//expand for the largest entity we have (currently Quackos who is 17.5m in diameter, that's one fat duck)
|
||||
World.MAX_ENTITY_RADIUS = Math.max(World.MAX_ENTITY_RADIUS, 8.75);
|
||||
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
package com.hbm.main;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
||||
import com.hbm.config.VersatileConfig;
|
||||
import com.hbm.handler.nei.*;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -9,7 +12,14 @@ import com.hbm.lib.RefStrings;
|
||||
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
import codechicken.nei.api.IHighlightHandler;
|
||||
import codechicken.nei.api.ItemInfo.Layout;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class NEIConfig implements IConfigureNEI {
|
||||
|
||||
@ -139,6 +149,31 @@ public class NEIConfig implements IConfigureNEI {
|
||||
API.hideItem(new ItemStack(ModBlocks.pink_slab));
|
||||
API.hideItem(new ItemStack(ModBlocks.pink_double_slab));
|
||||
API.hideItem(new ItemStack(ModBlocks.pink_stairs));
|
||||
|
||||
API.registerHighlightIdentifier(ModBlocks.ore_random, new IHighlightHandler() {
|
||||
|
||||
@Override
|
||||
public ItemStack identifyHighlight(World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
int x = mop.blockX;
|
||||
int y = mop.blockY;
|
||||
int z = mop.blockZ;
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityRandomOre) {
|
||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
||||
return new ItemStack(ModBlocks.ore_random, 1, ore.getStackId());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> handleTextData(ItemStack itemStack, World world, EntityPlayer player, MovingObjectPosition mop, List<String> currenttip, Layout layout) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,13 +1,21 @@
|
||||
package com.hbm.render.block;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.IBlockMultiPass;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.util.ColorUtil;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class RenderBlockMultipass implements ISimpleBlockRenderingHandler {
|
||||
@ -59,6 +67,59 @@ public class RenderBlockMultipass implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata));
|
||||
tessellator.draw();
|
||||
|
||||
if(block == ModBlocks.ore_random) {
|
||||
|
||||
this.currentPass = 1;
|
||||
renderer.setOverrideBlockTexture(block.getIcon(0, metadata));
|
||||
this.currentPass = 0;
|
||||
ComparableStack stack = BlockMotherOfAllOres.itemMap.get(metadata);
|
||||
int color = ColorUtil.getAverageColorFromStack(stack != null ? stack.toStack() : new ItemStack(ModItems.nothing));
|
||||
color = ColorUtil.amplifyColor(color);
|
||||
|
||||
Color col = new Color(color);
|
||||
int r = col.getRed();
|
||||
int g = col.getGreen();
|
||||
int b = col.getBlue();
|
||||
|
||||
float[] hsb = new Color(color).RGBtoHSB(r, g, b, new float[3]);
|
||||
|
||||
if(hsb[1] > 0F && hsb[1] < 0.75F)
|
||||
hsb[1] = 0.75F;
|
||||
|
||||
color = Color.HSBtoRGB(hsb[0], hsb[1], hsb[2]);
|
||||
col = new Color(color);
|
||||
|
||||
GL11.glColor3f(col.getRed() / 255F, col.getGreen() / 255F, col.getBlue() / 255F);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
||||
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
||||
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
||||
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata));
|
||||
tessellator.draw();
|
||||
|
||||
renderer.clearOverrideBlockTexture();
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
}
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
|
||||
@ -126,17 +126,33 @@ public class ModelM65 extends ModelBiped {
|
||||
@Override
|
||||
public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, entity);
|
||||
GL11.glPushMatrix();
|
||||
double d = 1D / 16D * 18D;
|
||||
//GL11.glTranslated(0, 1/16D, 0);
|
||||
GL11.glScaled(d, d, d);
|
||||
GL11.glScaled(1.01D, 1.01D, 1.01D);
|
||||
this.mask.render(par7);
|
||||
|
||||
if(!(entity instanceof EntityLivingBase) || ArmorUtil.getGasMaskFilterRecursively(((EntityLivingBase)entity).getEquipmentInSlot(4), (EntityLivingBase)entity) != null)
|
||||
this.filter.render(par7);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
if(this.isChild) {
|
||||
float f6 = 2.0F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6);
|
||||
GL11.glTranslatef(0.0F, 16.0F * par7, 0.0F);
|
||||
double d = 1D / 16D * 18D;
|
||||
GL11.glScaled(d, d, d);
|
||||
GL11.glScaled(1.01D, 1.01D, 1.01D);
|
||||
this.mask.render(par7);
|
||||
|
||||
if(!(entity instanceof EntityLivingBase) || ArmorUtil.getGasMaskFilterRecursively(((EntityLivingBase)entity).getEquipmentInSlot(4), (EntityLivingBase)entity) != null)
|
||||
this.filter.render(par7);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} else {
|
||||
GL11.glPushMatrix();
|
||||
double d = 1D / 16D * 18D;
|
||||
GL11.glScaled(d, d, d);
|
||||
GL11.glScaled(1.01D, 1.01D, 1.01D);
|
||||
this.mask.render(par7);
|
||||
|
||||
if(!(entity instanceof EntityLivingBase) || ArmorUtil.getGasMaskFilterRecursively(((EntityLivingBase)entity).getEquipmentInSlot(4), (EntityLivingBase)entity) != null)
|
||||
this.filter.render(par7);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
|
||||
@ -41,6 +41,7 @@ public class RenderAccessoryUtility {
|
||||
private static ResourceLocation rightnugget = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeRightNugget.png");
|
||||
private static ResourceLocation tankish = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeTankish.png");
|
||||
private static ResourceLocation frizzlefrazzle = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeFrizzleFrazzle.png");
|
||||
private static ResourceLocation pheo = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapePheo.png");
|
||||
|
||||
public static ResourceLocation getCloakFromPlayer(EntityPlayer player) {
|
||||
|
||||
@ -111,6 +112,9 @@ public class RenderAccessoryUtility {
|
||||
if(uuid.equals(Library.FrizzleFrazzle)) {
|
||||
return frizzlefrazzle;
|
||||
}
|
||||
if(uuid.equals(Library.Barnaby99_x)) {
|
||||
return pheo;
|
||||
}
|
||||
if(Library.contributors.contains(uuid)) {
|
||||
return wiki;
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.HashMap;
|
||||
import com.hbm.blocks.generic.BlockBobble.TileEntityBobble;
|
||||
import com.hbm.blocks.generic.BlockEmitter.TileEntityEmitter;
|
||||
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
||||
import com.hbm.blocks.network.CableDiode.TileEntityDiode;
|
||||
import com.hbm.tileentity.bomb.*;
|
||||
import com.hbm.tileentity.conductor.*;
|
||||
@ -199,6 +200,8 @@ public class TileMappings {
|
||||
put(TileEntityProxyEnergy.class, "tileentity_proxy_power");
|
||||
put(TileEntityProxyCombo.class, "tileentity_proxy_combo");
|
||||
put(TileEntityProxyConductor.class, "tileentity_proxy_conductor");
|
||||
|
||||
put(TileEntityRandomOre.class, "tileentity_mother_of_all_ores");
|
||||
|
||||
putNetwork();
|
||||
putBombs();
|
||||
|
||||
@ -63,7 +63,7 @@ public class ColorUtil {
|
||||
int avgG = g / pixels;
|
||||
int avgB = b / pixels;
|
||||
|
||||
return (r << 16) | (g << 8) | b;
|
||||
return (avgR << 16) | (avgG << 8) | avgB;
|
||||
|
||||
} catch(Exception ex) {
|
||||
return 0xFFFFFF;
|
||||
@ -122,7 +122,7 @@ public class ColorUtil {
|
||||
if(b / r > 1.5) return true;
|
||||
if(b / g > 1.5) return true;*/
|
||||
|
||||
float[] hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), new float[0]);
|
||||
float[] hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), new float[3]);
|
||||
|
||||
// saturation brightness
|
||||
return hsb[1] > 0.25 && hsb[2] > 0.25;
|
||||
@ -139,7 +139,7 @@ public class ColorUtil {
|
||||
int r = color.getRed();
|
||||
int g = color.getGreen();
|
||||
int b = color.getBlue();
|
||||
int max = Math.max(r, Math.max(g, b));
|
||||
int max = Math.max(Math.max(1, r), Math.max(g, b));
|
||||
|
||||
r = r * limit / max;
|
||||
g = g * limit / max;
|
||||
|
||||
@ -947,6 +947,7 @@ item.can_empty.name=Leere Dose
|
||||
item.can_key.name=Dosenschlüssel
|
||||
item.can_luna.name=Black Mesa Luna - Dark Cola
|
||||
item.can_mrsugar.name='Dr. Sugar' Softdrink
|
||||
item.can_mug.name=MUG Root Beer
|
||||
item.can_overcharge.name=Overcharge Delirium XT
|
||||
item.can_redbomb.name='Red Bomb' Energy-Drink
|
||||
item.can_smart.name='Smart' Energy-Drink
|
||||
@ -3446,6 +3447,7 @@ tile.ore_niter.name=Salpetererz
|
||||
tile.ore_oil.name=Ölvorkommen
|
||||
tile.ore_oil_empty.name=Leeres Ölvorkommen
|
||||
tile.ore_oil_sand.name=Teersand
|
||||
tile.ore_random.name=%s-Erz
|
||||
tile.ore_rare.name=Seltenerden-Erz
|
||||
tile.ore_reiium.name=Reiit
|
||||
tile.ore_schrabidium.name=Schrabidiumerz
|
||||
|
||||
@ -1157,6 +1157,7 @@ item.can_empty.name=Empty Can
|
||||
item.can_key.name=Winding Key
|
||||
item.can_luna.name=Black Mesa Luna - Dark Cola
|
||||
item.can_mrsugar.name='Dr. Sugar' Soft Drink
|
||||
item.can_mug.name=MUG Root Beer
|
||||
item.can_overcharge.name=Overcharge Delirium XT
|
||||
item.can_redbomb.name='Red Bomb' Energy Drink
|
||||
item.can_smart.name='Smart' Energy Drink
|
||||
@ -3819,6 +3820,7 @@ tile.ore_niter.name=Niter Ore
|
||||
tile.ore_oil.name=Oil Deposit
|
||||
tile.ore_oil_empty.name=Empty Oil Deposit
|
||||
tile.ore_oil_sand.name=Tar Sand
|
||||
tile.ore_random.name=%s Ore
|
||||
tile.ore_rare.name=Rare Earth Ore
|
||||
tile.ore_reiium.name=Reiite
|
||||
tile.ore_schrabidium.name=Schrabidium Ore
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 593 B |
Binary file not shown.
|
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 527 B |
BIN
src/main/resources/assets/hbm/textures/models/capes/CapePheo.png
Normal file
BIN
src/main/resources/assets/hbm/textures/models/capes/CapePheo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Loading…
x
Reference in New Issue
Block a user