finished assembler and chemplant renderers, lead apples, new textures

This commit is contained in:
HbmMods 2019-04-09 20:34:09 +02:00
parent 87defa55a8
commit 42716b5682
25 changed files with 158 additions and 84 deletions

View File

@ -176,6 +176,7 @@ death.attack.bang=%1$s wurde in mundgerechte Stücke zerfetzt.
death.attack.pc=%1$s wurde zu einer Pfütze in der pinken Wolke.
death.attack.cloud=%1$s schmolz wie ein Eis in der Sonne.
death.attack.lead=%1$s starb an Bleivergiftung.
death.attack.taint=%1$s starb an Flux-Tumoren.
item.redstone_sword.name=Redstoneschwert
item.big_sword.name=Großes Schwert
@ -1265,6 +1266,7 @@ item.thermo_unit_exo.name=Hitzeverteilungseinheit
item.bomb_waffle.name=Massenvernichtungswaffel
item.schnitzel_vegan.name=Veganes Schnitzel
item.apple_lead.name=Bleiapfel
item.apple_schrabidium.name=Schrabidiumapfel
item.cotton_candy.name=Radioaktive Zuckerwatte
item.tem_flakes.name=Tem Flakes

View File

@ -176,6 +176,7 @@ death.attack.bang=%1$s was blasted into bite-sized pieces.
death.attack.pc=%1$s was reduced to a puddle in the pink cloud.
death.attack.cloud=%1$s melted like a popsicle in the sun.
death.attack.lead=%1$s died from lead poisoning.
death.attack.taint=%1$s died from flux tumors.
item.redstone_sword.name=Redstone Sword
item.big_sword.name=Great Sword
@ -1265,6 +1266,7 @@ item.thermo_unit_exo.name=Heat Distribution Unit
item.bomb_waffle.name=Waffle of Mass Destruction
item.schnitzel_vegan.name=Vegan Schnitzel
item.apple_lead.name=Lead Apple
item.apple_schrabidium.name=Schrabidium Apple
item.cotton_candy.name=Radioactive Cotton Candy
item.tem_flakes.name=Tem Flakes

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 772 B

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 252 B

View File

@ -137,6 +137,9 @@ public class ModBlocks {
public static Block concrete_smooth;
public static Block concrete;
public static Block brick_concrete;
public static Block brick_concrete_mossy;
public static Block brick_concrete_cracked;
public static Block brick_concrete_broken;
public static Block brick_obsidian;
public static Block brick_light;
public static Block brick_compound;
@ -762,6 +765,9 @@ public class ModBlocks {
concrete_smooth = new BlockGeneric(Material.rock).setBlockName("concrete_smooth").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete");
concrete = new BlockGeneric(Material.rock).setBlockName("concrete").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete_tile");
brick_concrete = new BlockGeneric(Material.rock).setBlockName("brick_concrete").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete");
brick_concrete_mossy = new BlockGeneric(Material.rock).setBlockName("brick_concrete_mossy").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete_mossy");
brick_concrete_cracked = new BlockGeneric(Material.rock).setBlockName("brick_concrete_cracked").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(2000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete_cracked");
brick_concrete_broken = new BlockGeneric(Material.rock).setBlockName("brick_concrete_broken").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(1500.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete_broken");
brick_obsidian = new BlockGeneric(Material.rock).setBlockName("brick_obsidian").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(8000.0F).setBlockTextureName(RefStrings.MODID + ":brick_obsidian");
brick_light = new BlockGeneric(Material.rock).setBlockName("brick_light").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":brick_light");
brick_compound = new BlockGeneric(Material.rock).setBlockName("brick_compound").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(10000.0F).setBlockTextureName(RefStrings.MODID + ":brick_compound");
@ -1270,6 +1276,9 @@ public class ModBlocks {
GameRegistry.registerBlock(concrete_smooth, concrete_smooth.getUnlocalizedName());
GameRegistry.registerBlock(concrete, concrete.getUnlocalizedName());
GameRegistry.registerBlock(brick_concrete, brick_concrete.getUnlocalizedName());
GameRegistry.registerBlock(brick_concrete_mossy, brick_concrete_mossy.getUnlocalizedName());
GameRegistry.registerBlock(brick_concrete_cracked, brick_concrete_cracked.getUnlocalizedName());
GameRegistry.registerBlock(brick_concrete_broken, brick_concrete_broken.getUnlocalizedName());
GameRegistry.registerBlock(brick_obsidian, brick_obsidian.getUnlocalizedName());
GameRegistry.registerBlock(brick_compound, brick_compound.getUnlocalizedName());
GameRegistry.registerBlock(brick_light, brick_light.getUnlocalizedName());

View File

@ -1028,6 +1028,7 @@ public class ModItems {
public static Item bomb_waffle;
public static Item schnitzel_vegan;
public static Item cotton_candy;
public static Item apple_lead;
public static Item apple_schrabidium;
public static Item tem_flakes;
public static Item glowing_stew;
@ -2500,6 +2501,7 @@ public class ModItems {
bomb_waffle = new ItemWaffle(20, false).setUnlocalizedName("bomb_waffle").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":bomb_waffle");
schnitzel_vegan = new ItemSchnitzelVegan(0, true).setUnlocalizedName("schnitzel_vegan").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":schnitzel_vegan");
cotton_candy = new ItemCottonCandy(5, false).setUnlocalizedName("cotton_candy").setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":cotton_candy");
apple_lead = new ItemAppleSchrabidium(5, 0, false).setUnlocalizedName("apple_lead").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":apple_lead");
apple_schrabidium = new ItemAppleSchrabidium(20, 100, false).setUnlocalizedName("apple_schrabidium").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":apple_schrabidium");
tem_flakes = new ItemTemFlakes(0, 0, false).setUnlocalizedName("tem_flakes").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":tem_flakes");
glowing_stew = new ItemSoup(6).setUnlocalizedName("glowing_stew").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":glowing_stew");
@ -4310,6 +4312,7 @@ public class ModItems {
GameRegistry.registerItem(bomb_waffle, bomb_waffle.getUnlocalizedName());
GameRegistry.registerItem(schnitzel_vegan, schnitzel_vegan.getUnlocalizedName());
GameRegistry.registerItem(cotton_candy, cotton_candy.getUnlocalizedName());
GameRegistry.registerItem(apple_lead, apple_lead.getUnlocalizedName());
GameRegistry.registerItem(apple_schrabidium, apple_schrabidium.getUnlocalizedName());
GameRegistry.registerItem(tem_flakes, tem_flakes.getUnlocalizedName());
GameRegistry.registerItem(glowing_stew, glowing_stew.getUnlocalizedName());

View File

@ -2,6 +2,10 @@ package com.hbm.items.food;
import java.util.List;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import com.hbm.potion.HbmPotion;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.creativetab.CreativeTabs;
@ -30,52 +34,63 @@ public class ItemAppleSchrabidium extends ItemFood {
}
@Override
protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer p_77849_3_)
{
if (!p_77849_2_.isRemote)
{
p_77849_3_.addPotionEffect(new PotionEffect(Potion.regeneration.id, 600, 4));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 6000, 0));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 6000, 0));
}
protected void onFoodEaten(ItemStack stack, World world, EntityPlayer player) {
if (!world.isRemote) {
if(stack.getItem() == ModItems.apple_schrabidium) {
if (stack.getItemDamage() == 0) {
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 600, 4));
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 6000, 0));
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 6000, 0));
}
if (stack.getItemDamage() == 1) {
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 1200, 4));
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 1200, 4));
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 1200, 0));
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 1200, 4));
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1200, 2));
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 1200, 2));
player.addPotionEffect(new PotionEffect(Potion.jump.id, 1200, 4));
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 1200, 9));
player.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 1200, 4));
player.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 1200, 9));
}
if (stack.getItemDamage() == 2) {
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 2147483647, 4));
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2147483647, 1));
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2147483647, 0));
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 2147483647, 9));
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2147483647, 4));
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 2147483647, 3));
player.addPotionEffect(new PotionEffect(Potion.jump.id, 2147483647, 4));
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 2147483647, 24));
player.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2147483647, 14));
player.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 2147483647, 99));
}
}
if(stack.getItem() == ModItems.apple_lead) {
if (stack.getItemDamage() == 0) {
player.addPotionEffect(new PotionEffect(HbmPotion.lead.id, 15 * 20, 2));
}
if (stack.getItemDamage() == 1) {
if (p_77849_1_.getItemDamage() == 1)
{
if (!p_77849_2_.isRemote)
{
p_77849_3_.addPotionEffect(new PotionEffect(Potion.regeneration.id, 1200, 4));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 1200, 4));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 1200, 0));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 1200, 4));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1200, 2));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 1200, 2));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.jump.id, 1200, 4));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 1200, 9));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 1200, 4));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 1200, 9));
}
}
if (p_77849_1_.getItemDamage() == 2)
{
if (!p_77849_2_.isRemote)
{
p_77849_3_.addPotionEffect(new PotionEffect(Potion.regeneration.id, 2147483647, 4));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 2147483647, 1));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2147483647, 0));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 2147483647, 9));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2147483647, 4));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 2147483647, 3));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.jump.id, 2147483647, 4));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 2147483647, 24));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2147483647, 14));
p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 2147483647, 99));
}
}
else
{
super.onFoodEaten(p_77849_1_, p_77849_2_, p_77849_3_);
}
player.addPotionEffect(new PotionEffect(HbmPotion.lead.id, 60 * 20, 4));
}
if (stack.getItemDamage() == 2) {
player.attackEntityFrom(ModDamageSource.lead, 500F);
}
}
}
}
@Override

View File

@ -1011,6 +1011,9 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModItems.apple_schrabidium, 1, 0), new Object[] { "SSS", "SAS", "SSS", 'S', ModItems.nugget_schrabidium, 'A', Items.apple });
GameRegistry.addRecipe(new ItemStack(ModItems.apple_schrabidium, 1, 1), new Object[] { "SSS", "SAS", "SSS", 'S', ModItems.ingot_schrabidium, 'A', Items.apple });
GameRegistry.addRecipe(new ItemStack(ModItems.apple_schrabidium, 1, 2), new Object[] { "SSS", "SAS", "SSS", 'S', Item.getItemFromBlock(ModBlocks.block_schrabidium), 'A', Items.apple });
GameRegistry.addRecipe(new ItemStack(ModItems.apple_lead, 1, 0), new Object[] { "SSS", "SAS", "SSS", 'S', ModItems.nugget_lead, 'A', Items.apple });
GameRegistry.addRecipe(new ItemStack(ModItems.apple_lead, 1, 1), new Object[] { "SSS", "SAS", "SSS", 'S', ModItems.ingot_lead, 'A', Items.apple });
GameRegistry.addRecipe(new ItemStack(ModItems.apple_lead, 1, 2), new Object[] { "SSS", "SAS", "SSS", 'S', ModBlocks.block_lead, 'A', Items.apple });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tem_flakes, 1, 0), new Object[] { Items.gold_nugget, Items.paper });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tem_flakes, 1, 1), new Object[] { Items.gold_nugget, Items.gold_nugget, Items.gold_nugget, Items.paper });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tem_flakes, 1, 2), new Object[] { Items.gold_ingot, Items.gold_ingot, Items.gold_nugget, Items.gold_nugget, Items.paper });

View File

@ -1348,6 +1348,11 @@ public class MainRegistry
HazmatRegistry.instance.registerHazmat(ModItems.hazmat_legs_grey, 0.6F);
HazmatRegistry.instance.registerHazmat(ModItems.hazmat_boots_grey, 0.2F);
HazmatRegistry.instance.registerHazmat(ModItems.t45_helmet, 0.4F);
HazmatRegistry.instance.registerHazmat(ModItems.t45_plate, 0.8F);
HazmatRegistry.instance.registerHazmat(ModItems.t45_legs, 0.6F);
HazmatRegistry.instance.registerHazmat(ModItems.t45_boots, 0.2F);
HazmatRegistry.instance.registerHazmat(ModItems.hazmat_paa_helmet, 0.6F);
HazmatRegistry.instance.registerHazmat(ModItems.hazmat_paa_plate, 1.2F);
HazmatRegistry.instance.registerHazmat(ModItems.hazmat_paa_legs, 0.9F);

View File

@ -1,5 +1,7 @@
package com.hbm.main;
import org.lwjgl.opengl.GL11;
import com.hbm.entity.mob.EntityHunterChopper;
import com.hbm.entity.projectile.EntityChopperMine;
import com.hbm.handler.BulletConfigSyncingUtil;
@ -98,11 +100,15 @@ public class ModEventHandlerClient {
@SubscribeEvent
public void preRenderEvent(RenderPlayerEvent.Pre event) {
//event.setCanceled(true);
RenderPlayer renderer = event.renderer;
AbstractClientPlayer player = (AbstractClientPlayer)event.entityPlayer;
ResourceLocation cloak = RenderAccessoryUtility.getCloakFromPlayer(player);
//GL11.glRotated(180, 1, 0, 0);
if(cloak != null)
player.func_152121_a(Type.CAPE, cloak);

View File

@ -14,7 +14,6 @@ public class TEAssemblerPacket implements IMessage {
int x;
int y;
int z;
float spin;
boolean progress;
public TEAssemblerPacket()
@ -22,12 +21,11 @@ public class TEAssemblerPacket implements IMessage {
}
public TEAssemblerPacket(int x, int y, int z, float spin, boolean bool)
public TEAssemblerPacket(int x, int y, int z, boolean bool)
{
this.x = x;
this.y = y;
this.z = z;
this.spin = spin;
this.progress = bool;
}
@ -36,7 +34,6 @@ public class TEAssemblerPacket implements IMessage {
x = buf.readInt();
y = buf.readInt();
z = buf.readInt();
spin = buf.readFloat();
progress = buf.readBoolean();
}
@ -45,7 +42,6 @@ public class TEAssemblerPacket implements IMessage {
buf.writeInt(x);
buf.writeInt(y);
buf.writeInt(z);
buf.writeFloat(spin);
buf.writeBoolean(progress);
}
@ -58,7 +54,6 @@ public class TEAssemblerPacket implements IMessage {
if (te != null && te instanceof TileEntityMachineAssembler) {
TileEntityMachineAssembler gen = (TileEntityMachineAssembler) te;
gen.rotation = m.spin;
gen.isProgressing = m.progress;
}
return null;

View File

@ -15,7 +15,6 @@ public class TEChemplantPacket implements IMessage {
int x;
int y;
int z;
float spin;
boolean isProgressing;
public TEChemplantPacket()
@ -23,12 +22,11 @@ public class TEChemplantPacket implements IMessage {
}
public TEChemplantPacket(int x, int y, int z, float spin, boolean isProgressing)
public TEChemplantPacket(int x, int y, int z, boolean isProgressing)
{
this.x = x;
this.y = y;
this.z = z;
this.spin = spin;
this.isProgressing = isProgressing;
}
@ -37,7 +35,6 @@ public class TEChemplantPacket implements IMessage {
x = buf.readInt();
y = buf.readInt();
z = buf.readInt();
spin = buf.readFloat();
isProgressing = buf.readBoolean();
}
@ -46,7 +43,6 @@ public class TEChemplantPacket implements IMessage {
buf.writeInt(x);
buf.writeInt(y);
buf.writeInt(z);
buf.writeFloat(spin);
buf.writeBoolean(isProgressing);
}
@ -59,7 +55,6 @@ public class TEChemplantPacket implements IMessage {
if (te != null && te instanceof TileEntityMachineChemplant) {
TileEntityMachineChemplant gen = (TileEntityMachineChemplant) te;
gen.rotation = m.spin;
gen.isProgressing = m.isProgressing;
}
return null;

View File

@ -94,7 +94,10 @@ public class RenderAssembler extends TileEntitySpecialRenderer {
if(offset > 500)
offset = 500 - (offset - 500);
GL11.glTranslated(offset * 0.003 - 0.75, 0, 0);
TileEntityMachineAssembler assembler = (TileEntityMachineAssembler) tileEntity;
if(assembler.isProgressing)
GL11.glTranslated(offset * 0.003 - 0.75, 0, 0);
sliderModel.renderAll();
@ -103,8 +106,9 @@ public class RenderAssembler extends TileEntitySpecialRenderer {
double sway = (System.currentTimeMillis() % 2000) / 2;
sway = Math.sin(sway / Math.PI / 50);
GL11.glTranslated(0, 0, sway * 0.3);
if(assembler.isProgressing)
GL11.glTranslated(0, 0, sway * 0.3);
armModel.renderAll();
GL11.glPopMatrix();
@ -137,7 +141,12 @@ public class RenderAssembler extends TileEntitySpecialRenderer {
bindTexture(cogTexture);
int rotation = (int) (System.currentTimeMillis() % (360 * 5)) / 5;
TileEntityMachineAssembler assembler = (TileEntityMachineAssembler) tileEntity;
if(!assembler.isProgressing)
rotation = 0;
GL11.glPushMatrix();
GL11.glTranslated(-0.6, 0.75, 1.0625);
GL11.glRotatef(-rotation, 0F, 0F, 1F);

View File

@ -97,15 +97,23 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
GL11.glPushMatrix();
GL11.glTranslated(-0.625, 0, 0.625);
if(!chem.tanks[1].getTankType().name().equals(FluidType.NONE.name()))
if(!chem.tanks[0].getTankType().name().equals(FluidType.NONE.name()) && chem.isProgressing)
GL11.glRotatef(-rotation, 0F, 1F, 0F);
else
GL11.glRotatef(-45, 0F, 1F, 0F);
spinnerModel.renderAll();
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(0.625, 0, 0.625);
if(!chem.tanks[0].getTankType().name().equals(FluidType.NONE.name()))
if(!chem.tanks[1].getTankType().name().equals(FluidType.NONE.name()) && chem.isProgressing)
GL11.glRotatef(rotation, 0F, 1F, 0F);
else
GL11.glRotatef(45, 0F, 1F, 0F);
spinnerModel.renderAll();
GL11.glPopMatrix();
@ -114,7 +122,12 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
bindTexture(pistonTexture);
GL11.glPushMatrix();
GL11.glTranslated(0, push, 0);
if(chem.isProgressing)
GL11.glTranslated(0, push, 0);
else
GL11.glTranslated(0, -0.25, 0);
pistonModel.renderAll();
GL11.glPopMatrix();
@ -122,14 +135,19 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
int color = 0;
GL11.glDisable(GL11.GL_LIGHTING);
if(!chem.tanks[1].getTankType().name().equals(FluidType.NONE.name())) {
if(!chem.tanks[0].getTankType().name().equals(FluidType.NONE.name())) {
GL11.glPushMatrix();
HmfController.setMod(50000D, -250D);
color = chem.tanks[1].getTankType().getColor();
if(chem.isProgressing)
HmfController.setMod(50000D, -250D);
else
HmfController.setMod(50000D, -50000D);
color = chem.tanks[0].getTankType().getColor();
GL11.glColor3ub((byte)((color & 0xFF0000) >> 16), (byte)((color & 0x00FF00) >> 8), (byte)((color & 0x0000FF) >> 0));
GL11.glTranslated(-0.625, 0, 0.625);
int count = chem.tanks[1].getFill() / 1000;
int count = chem.tanks[0].getFill() / 1000;
for(int i = 0; i < count; i++) {
if(i < count - 1)
@ -141,14 +159,19 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
GL11.glPopMatrix();
}
if(!chem.tanks[0].getTankType().name().equals(FluidType.NONE.name())) {
if(!chem.tanks[1].getTankType().name().equals(FluidType.NONE.name())) {
GL11.glPushMatrix();
HmfController.setMod(50000D, 250D);
color = chem.tanks[0].getTankType().getColor();
if(chem.isProgressing)
HmfController.setMod(50000D, 250D);
else
HmfController.setMod(50000D, 50000D);
color = chem.tanks[1].getTankType().getColor();
GL11.glColor3ub((byte)((color & 0xFF0000) >> 16), (byte)((color & 0x00FF00) >> 8), (byte)((color & 0x0000FF) >> 0));
GL11.glTranslated(0.625, 0, 0.625);
int count = chem.tanks[0].getFill() / 1000;
int count = chem.tanks[1].getFill() / 1000;
for(int i = 0; i < count; i++) {
if(i < count - 1)

View File

@ -35,7 +35,6 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve
public static final long maxPower = 100000;
public int progress;
public int maxProgress = 100;
public float rotation = 0;
public boolean isProgressing;
int age = 0;
int consumption = 100;
@ -266,10 +265,6 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve
if(slots[5] == null || (slots[5] != null && slots[5].getItem() == MachineRecipes.getOutputFromTempate(slots[4]).copy().getItem()) && slots[5].stackSize + MachineRecipes.getOutputFromTempate(slots[4]).copy().stackSize <= slots[5].getMaxStackSize()) {
progress++;
isProgressing = true;
rotation += 5;
if(rotation >= 360)
rotation -= 360;
if(progress >= maxProgress) {
progress = 0;
@ -374,7 +369,7 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve
break;
}
PacketDispatcher.wrapper.sendToAll(new TEAssemblerPacket(xCoord, yCoord, zCoord, rotation, isProgressing));
PacketDispatcher.wrapper.sendToAll(new TEAssemblerPacket(xCoord, yCoord, zCoord, isProgressing));
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
}

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import com.hbm.entity.particle.EntityGasFlameFX;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.IFluidAcceptor;
@ -46,7 +47,6 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
public static final long maxPower = 100000;
public int progress;
public int maxProgress = 100;
public float rotation = 0;
public boolean isProgressing;
int age = 0;
int consumption = 100;
@ -284,6 +284,8 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
if(!worldObj.isRemote)
{
int meta = worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
isProgressing = false;
age++;
@ -322,10 +324,6 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
if(hasSpaceForItems(MachineRecipes.getChemOutputFromTempate(slots[4])) && hasSpaceForFluids(outputs)) {
progress++;
isProgressing = true;
rotation += 5;
if(rotation >= 360)
rotation -= 360;
if(progress >= maxProgress) {
progress = 0;
@ -344,7 +342,6 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
} else
progress = 0;
int meta = worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
TileEntity te = null;
if(meta == 2) {
te = worldObj.getTileEntity(xCoord - 2, yCoord, zCoord);
@ -433,7 +430,22 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
break;
}
PacketDispatcher.wrapper.sendToAll(new TEChemplantPacket(xCoord, yCoord, zCoord, rotation, isProgressing));
if(isProgressing) {
if(meta == 2) {
worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.375, yCoord + 3, zCoord - 0.625, 0.0, 0.0, 0.0));
}
if(meta == 3) {
worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.625, yCoord + 3, zCoord + 1.625, 0.0, 0.0, 0.0));
}
if(meta == 4) {
worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord - 0.625, yCoord + 3, zCoord + 0.625, 0.0, 0.0, 0.0));
}
if(meta == 5) {
worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 1.625, yCoord + 3, zCoord + 0.375, 0.0, 0.0, 0.0));
}
}
PacketDispatcher.wrapper.sendToAll(new TEChemplantPacket(xCoord, yCoord, zCoord, isProgressing));
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
}