fixed more trash

This commit is contained in:
Bob 2020-09-01 22:25:51 +02:00
parent f1ca8e93cc
commit 1bba730882
10 changed files with 205 additions and 61 deletions

View File

@ -5,17 +5,17 @@
"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": false}]},
"block.minerOperate": {"category": "block", "sounds": [{"name": "block/minerOperate", "stream": false}]},
"block.assemblerOperate": {"category": "block", "sounds": [{"name": "block/assemblerOperate", "stream": false}]},
"block.chemplantOperate": {"category": "block", "sounds": [{"name": "block/chemplantOperate", "stream": false}]},
"block.dieselOperate": {"category": "block", "sounds": [{"name": "block/dieselOperate", "stream": false}]},
"block.igeneratorOperate": {"category": "block", "sounds": [{"name": "block/igeneratorOperate", "stream": false}]},
"block.turbofanOperate": {"category": "block", "sounds": [{"name": "block/turbofanOperate", "stream": false}]},
"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.broadcast1": {"category": "block", "sounds": [{"name": "block/broadcast1", "stream": false}]},
"block.broadcast2": {"category": "block", "sounds": [{"name": "block/broadcast2", "stream": false}]},
"block.broadcast3": {"category": "block", "sounds": [{"name": "block/broadcast3", "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}]},
@ -26,13 +26,13 @@
"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": false}]},
"block.centrifugeOperate": {"category": "block", "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.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": false}]},
"block.soyuzReady": {"category": "block", "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"]},
"item.techBleep": {"category": "player", "sounds": [{"name": "tool/techBleep", "stream": false}]},

View File

@ -17,6 +17,7 @@ import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@ -239,48 +240,53 @@ public abstract class BlockDummyable extends BlockContainer {
}
}
ISidedInventory tileentityfurnace = (ISidedInventory)world.getTileEntity(x, y, z);
if (tileentityfurnace != null)
{
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
{
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
if (itemstack != null)
{
float f = world.rand.nextFloat() * 0.8F + 0.1F;
float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
float f2 = world.rand.nextFloat() * 0.8F + 0.1F;
while (itemstack.stackSize > 0)
{
int j1 = world.rand.nextInt(21) + 10;
if (j1 > itemstack.stackSize)
{
j1 = itemstack.stackSize;
}
itemstack.stackSize -= j1;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
if (itemstack.hasTagCompound())
{
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
}
float f3 = 0.05F;
entityitem.motionX = (float)world.rand.nextGaussian() * f3;
entityitem.motionY = (float)world.rand.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float)world.rand.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, b);
}
TileEntity te = world.getTileEntity(x, y, z);
if(te instanceof ISidedInventory) {
ISidedInventory sidedinv = (ISidedInventory)te;
if (sidedinv != null)
{
for (int i1 = 0; i1 < sidedinv.getSizeInventory(); ++i1)
{
ItemStack itemstack = sidedinv.getStackInSlot(i1);
if (itemstack != null)
{
float f = world.rand.nextFloat() * 0.8F + 0.1F;
float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
float f2 = world.rand.nextFloat() * 0.8F + 0.1F;
while (itemstack.stackSize > 0)
{
int j1 = world.rand.nextInt(21) + 10;
if (j1 > itemstack.stackSize)
{
j1 = itemstack.stackSize;
}
itemstack.stackSize -= j1;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
if (itemstack.hasTagCompound())
{
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
}
float f3 = 0.05F;
entityitem.motionX = (float)world.rand.nextGaussian() * f3;
entityitem.motionY = (float)world.rand.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float)world.rand.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, b);
}
}
super.breakBlock(world, x, y, z, b, i);
}

View File

@ -231,10 +231,12 @@ public class MachineITER extends BlockDummyable {
return 7;
}
public static boolean drop = true;
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int i) {
if(i >= 12) {
if(i >= 12 && drop) {
for(int l = 0; l < 4; l++)
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.fusion_conductor, 64)));

View File

@ -287,7 +287,9 @@ public class EntityModBeam extends Entity implements IProjectile {
}
if(movingobjectposition.entityHit instanceof EntityLivingBase) {
((EntityLivingBase) movingobjectposition.entityHit).addPotionEffect(new PotionEffect(HbmPotion.bang.id, 60, 0));
if(!worldObj.isRemote)
((EntityLivingBase) movingobjectposition.entityHit).addPotionEffect(new PotionEffect(HbmPotion.bang.id, 60, 0));
} else {
explode();
}

View File

@ -3304,8 +3304,8 @@ public class ModItems {
dynosphere_dineutronium = new ItemBattery(1000000000000L, 10000000, 0).setUnlocalizedName("dynosphere_dineutronium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_dineutronium");
dynosphere_dineutronium_charged = new Item().setUnlocalizedName("dynosphere_dineutronium_charged").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_dineutronium_charged");
factory_core_titanium = new ItemBattery(70400, 10, 0).setUnlocalizedName("factory_core_titanium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":factory_core_titanium");
factory_core_advanced = new ItemBattery(41600, 10, 0).setUnlocalizedName("factory_core_advanced").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":factory_core_advanced");
factory_core_titanium = new ItemBattery(7040000, 1000, 0).setUnlocalizedName("factory_core_titanium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":factory_core_titanium");
factory_core_advanced = new ItemBattery(4160000, 1000, 0).setUnlocalizedName("factory_core_advanced").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":factory_core_advanced");
ams_focus_blank = new Item().setUnlocalizedName("ams_focus_blank").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_focus_blank");
ams_focus_limiter = new ItemCustomLore().setUnlocalizedName("ams_focus_limiter").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_focus_limiter");

View File

@ -4,6 +4,7 @@ import java.util.List;
import com.google.common.collect.Multimap;
import com.hbm.handler.ArmorUtil;
import com.hbm.interfaces.Spaghetti;
import com.hbm.items.ModItems;
import com.hbm.render.model.ModelT45Boots;
import com.hbm.render.model.ModelT45Chest;
@ -30,6 +31,7 @@ import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraftforge.common.ISpecialArmor;
@Spaghetti("kill it")
public class ArmorT45 extends ItemArmor implements ISpecialArmor {
@SideOnly(Side.CLIENT)
private ModelT45Helmet helmet;
@ -153,6 +155,7 @@ public class ArmorT45 extends ItemArmor implements ISpecialArmor {
}
//TODO: cleanse this filth with holy fire once it's time to overhaul armors
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack armor) {
if (armor.getItem() == ModItems.t45_plate) {
@ -212,9 +215,9 @@ public class ArmorT45 extends ItemArmor implements ISpecialArmor {
if (itemstack.getItem() == ModItems.t45_plate) {
if (itemstack.stackTagCompound != null) {
if (itemstack.stackTagCompound.getInteger("charge") != 0)
list.add("Charge: " + (itemstack.stackTagCompound.getInteger("charge") / 2000 + 1) + "%");
list.add("Charge: " + (itemstack.stackTagCompound.getInteger("charge") / 200000 + 1) + "%");
else
list.add("Charge: " + (itemstack.stackTagCompound.getInteger("charge") / 2000) + "%");
list.add("Charge: " + (itemstack.stackTagCompound.getInteger("charge") / 200000) + "%");
}
}
}

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (3612)";
public static final String VERSION = "1.0.27 BETA (3614)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -290,6 +290,8 @@ public class ClientProxy extends ServerProxy {
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.steel_wall), new ItemRenderDecoBlock());
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.steel_corner), new ItemRenderDecoBlock());
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.steel_roof), new ItemRenderDecoBlock());
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.machine_selenium), new ItemRendererMachine(2D));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.radiorec), new ItemRendererMachine(1D));
}
@Override

View File

@ -0,0 +1,124 @@
package com.hbm.render.item.block;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import com.hbm.render.model.ModelBroadcaster;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
public class ItemRendererMachine implements IItemRenderer {
///// THIS IS A TEST CLASS. CARVE THIS INTO A BASE CLASS FOR LESS CRAPPY BLOCK ITEM RENDERERS IN THE FUTURE ////
double scale = 1.0D;
private ModelBroadcaster broadcaster;
private static final ResourceLocation broadcasterTex = new ResourceLocation(RefStrings.MODID + ":" + "textures/models/ModelRadioReceiver.png");
public ItemRendererMachine(double scale) {
this.scale = scale;
this.broadcaster = new ModelBroadcaster();
}
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
switch(type) {
case EQUIPPED_FIRST_PERSON:
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glTranslated(1, 0.5, 0);
GL11.glRotated(180, 0, 1, 0);
break;
case EQUIPPED:
GL11.glTranslated(0.5, 0, 0);
GL11.glRotated(90, 0, 1, 0);
double scaleEq = 0.5;
GL11.glScaled(scaleEq, scaleEq, scaleEq);
break;
case ENTITY:
GL11.glScaled(0.5, 0.5, 0.5);
break;
case INVENTORY:
GL11.glRotated(180, 1, 0, 0);
int scale = 8;
GL11.glTranslated(8, -16, 0);
GL11.glScaled(scale, scale, scale);
//GL11.glRotated(25, 1, 0, 0);
//GL11.glRotated(45, 0, 1, 0);
break;
default: break;
}
if(item.getItem() == Item.getItemFromBlock(ModBlocks.machine_selenium)) {
GL11.glDisable(GL11.GL_CULL_FACE);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.selenium_body_tex);
ResourceManager.selenium_body.renderAll();
GL11.glTranslated(0.0D, 1.0D, 0.0D);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.selenium_piston_tex);
for(int i = 0; i < 7; i++) {
ResourceManager.selenium_piston.renderAll();
GL11.glRotatef(360F/7F, 0, 0, 1);
}
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.selenium_rotor_tex);
ResourceManager.selenium_rotor.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
}
if(item.getItem() == Item.getItemFromBlock(ModBlocks.radiorec)) {
GL11.glTranslated(0, 1.5, 0);
GL11.glRotated(180, 1, 0, 0);
Minecraft.getMinecraft().renderEngine.bindTexture(broadcasterTex);
broadcaster.renderModel(0.0625F);
}
GL11.glPopMatrix();
}
}

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.machine.MachineITER;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.IFluidAcceptor;
@ -422,6 +423,8 @@ public class TileEntityITER extends TileEntityMachineBase implements IConsumer,
public void disassemble() {
MachineITER.drop = false;
int[][][] layout = TileEntityITERStruct.layout;
for(int y = 0; y < 5; y++) {
@ -448,5 +451,7 @@ public class TileEntityITER extends TileEntityMachineBase implements IConsumer,
}
worldObj.setBlock(xCoord, yCoord - 2, zCoord, ModBlocks.struct_iter_core);
MachineITER.drop = true;
}
}