Permalink
Browse files

Merge branch 'dev' of https://github.com/Ri5ux/AliensVsPredator into dev

  • Loading branch information...
Ri5ux committed Dec 18, 2017
2 parents 2b4492f + 7c5f76b commit 8a28481097e1e3d5e59fe5e29159069504876fca
Showing with 245 additions and 477 deletions.
  1. +2 −2 src/main/java/org/avp/client/gui/GuiAssembler.java
  2. +47 −47 src/main/java/org/avp/client/render/PressureHUDRenderEvent.java
  3. +1 −1 src/main/java/org/avp/client/render/TacticalHUDRenderEvent.java
  4. +1 −1 src/main/java/org/avp/client/render/block/model/cached/CachedModelReflectiveShape.java
  5. +2 −1 src/main/java/org/avp/client/render/items/RenderItem88MOD4.java
  6. +1 −1 src/main/java/org/avp/client/render/items/RenderItemAK47.java
  7. +4 −3 src/main/java/org/avp/client/render/items/RenderItemM240ICU.java
  8. +2 −1 src/main/java/org/avp/client/render/items/RenderItemM4.java
  9. +5 −4 src/main/java/org/avp/client/render/items/RenderItemM41A.java
  10. +3 −2 src/main/java/org/avp/client/render/items/RenderItemNostromoFlamethrower.java
  11. +11 −10 src/main/java/org/avp/client/render/items/RenderItemSniper.java
  12. +1 −1 src/main/java/org/avp/client/render/items/RenderMotionTrackerScreen.java
  13. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItem88Mod4Action.java
  14. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItem88Mod4Barrel.java
  15. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItem88Mod4Stock.java
  16. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemAK47Action.java
  17. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemAK47Barrel.java
  18. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemAK47Stock.java
  19. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM41AAction.java
  20. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM41ABarrel.java
  21. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM41APeripherals.java
  22. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM41AStock.java
  23. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM4Action.java
  24. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM4Barrel.java
  25. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM4Stock.java
  26. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM56SGAction.java
  27. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM56SGAimingModule.java
  28. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM56SGBarrel.java
  29. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM56SGStock.java
  30. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemM56SGSupportFrame.java
  31. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemSniperAction.java
  32. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemSniperBarrel.java
  33. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemSniperPeripherals.java
  34. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemSniperScope.java
  35. +1 −1 src/main/java/org/avp/client/render/items/firearms/parts/RenderItemSniperStock.java
  36. +3 −7 src/main/java/org/avp/client/render/tile/RenderAssembler.java
  37. +1 −1 src/main/java/org/avp/client/render/tile/RenderLocker.java
  38. +1 −1 src/main/java/org/avp/entities/EntityBullet.java
  39. +1 −1 src/main/java/org/avp/tile/TileEntityTurret.java
  40. +55 −0 src/main/java/org/avp/world/dimension/varda/ClimateProviderVarda.java
  41. +0 −159 src/main/java/org/avp/world/dimension/varda/SkyProviderVarda.java
  42. +0 −201 src/main/java/org/avp/world/dimension/varda/StormProvider.java
  43. +68 −0 src/main/java/org/avp/world/dimension/varda/StormProviderVarda.java
  44. +13 −10 src/main/java/org/avp/world/dimension/varda/WorldProviderVarda.java
  45. BIN src/main/resources/assets/avp/textures/misc/silica.png
@@ -90,7 +90,7 @@ protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
Draw.drawRect(2, stackY - 2, this.xSize - 4, 12, 0x22FFFFFF);
Draw.drawString(curStackSize + "/" + stack.stackSize, 220, stackY, curStackSize >= stack.stackSize ? 0xFF00AAFF : curStackSize < stack.stackSize && curStackSize > 0 ? 0xFFFFAA00 : 0xFF888888);
Draw.drawString(stack.getDisplayName(), 20, stackY, 0xFF888888);
Draw.drawItemIcon(stack.getItem(), 5, stackY, 8, 8);
Draw.drawItem(stack, 5, stackY, 8, 8);
maxProgress += stack.stackSize;
@@ -136,7 +136,7 @@ protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
OpenGL.enableBlend();
OpenGL.disableBlend();
Draw.drawString((curItem + 1) + " " + I18n.translateToLocal(item.getUnlocalizedName() + ".name"), entryX + 13, entryY + 2, curItem == this.scroll ? 0xFF00AAFF : 0xFF555555, false);
Draw.drawItemIcon(item, entryX + 2, entryY + 2, 8, 8);
Draw.drawItem(schematic.getItemStackAssembled(), entryX + 2, entryY + 2, 8, 8);
}
}
}
@@ -23,8 +23,6 @@
import com.arisux.mdx.lib.client.render.ScaledResolution;
import com.arisux.mdx.lib.client.render.Screen;
import com.arisux.mdx.lib.game.Game;
import com.arisux.mdx.lib.world.Pos;
import com.arisux.mdx.lib.world.Worlds;
import com.arisux.mdx.lib.world.block.Blocks;
import com.arisux.mdx.lib.world.entity.player.inventory.Inventories;
@@ -35,6 +33,8 @@
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
@@ -151,57 +151,57 @@ public void drawInfoBar()
OpenGL.popMatrix();
OpenGL.color4i(0xFFFFFFFF);
Draw.drawPlayerFace(Game.minecraft().player.getName(), 0, 0, 32, 32);
Draw.drawPlayerFace(Game.minecraft().player, 0, 0, 32, 32);
/** Silica storm detection indicator **/
WorldProvider provider = Game.minecraft().world.provider;
if (provider instanceof WorldProviderVarda)
{
WorldProviderVarda providerVarda = (WorldProviderVarda) provider;
long stormStartTime = providerVarda.getStormProvider().getStormStartTime() * 1000L;
long stormEndTime = providerVarda.getStormProvider().getStormEndTime() * 1000L;
long worldTime = providerVarda.getWorldTime();
int warningTime = 1000;
int timeUntilStorm = (int) (stormStartTime - provider.getWorldTime());
if ((timeUntilStorm < warningTime && worldTime < stormStartTime || worldTime > stormStartTime && worldTime % 20 <= 10) && worldTime <= stormEndTime + 1000)
{
OpenGL.enableBlend();
OpenGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA);
int indicatorWidth = 300;
int indicatorHeight = 30;
int indicatorX = (Screen.scaledDisplayResolution().getScaledWidth() / 2) - (indicatorWidth / 2);
int indicatorY = 0;
Draw.drawRect(indicatorX, indicatorY, indicatorWidth, indicatorHeight, 0x66333333);
OpenGL.pushMatrix();
{
float nameScale = 1.5F;
OpenGL.scale(nameScale, nameScale, nameScale);
int actualX = (int) ((indicatorX) / nameScale);
int actualY = (int) ((indicatorY) / nameScale);
int actualWidth = (int) (indicatorWidth / nameScale);
int actualHeight = (int) (indicatorHeight / nameScale);
fontrenderer.drawString("Storm Indicator for " + provider.getDimensionType().getName(), actualX + 7, actualY + 7, 0xFFAA00);
if (Worlds.canSeeSky(new Pos(Game.minecraft().player), Game.minecraft().world))
{
Draw.drawStringAlignCenter("You are outdoors, take cover immediately!", (int) ((Screen.scaledDisplayResolution().getScaledWidth() / 2) / nameScale), actualY + 35, 0xFF0000);
}
if (worldTime > stormStartTime)
{
Draw.drawProgressBar("Storm Inbound", (int) stormStartTime, 0, actualX, actualY + 20, actualWidth, 4, 2, 0xFFFFAA00, false);
}
else
{
Draw.drawProgressBar("Time Until Storm (" + (timeUntilStorm / 20) + " seconds)", (int) stormStartTime, ((int) stormStartTime - (int) worldTime), actualX, actualY + 20, actualWidth, 4, 2, (timeUntilStorm / 20) < 15 ? 0xFFFF0000 : 0xFFFFAA00, false);
}
}
OpenGL.popMatrix();
OpenGL.color4i(0xFFFFFFFF);
}
// long stormStartTime = providerVarda.getStormProvider().getStormStartTime() * 1000L;
// long stormEndTime = providerVarda.getStormProvider().getStormEndTime() * 1000L;
// long worldTime = providerVarda.getWorldTime();
// int warningTime = 1000;
// int timeUntilStorm = (int) (stormStartTime - provider.getWorldTime());
// if ((timeUntilStorm < warningTime && worldTime < stormStartTime || worldTime > stormStartTime && worldTime % 20 <= 10) && worldTime <= stormEndTime + 1000)
// {
// OpenGL.enableBlend();
// OpenGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA);
// int indicatorWidth = 300;
// int indicatorHeight = 30;
// int indicatorX = (Screen.scaledDisplayResolution().getScaledWidth() / 2) - (indicatorWidth / 2);
// int indicatorY = 0;
// Draw.drawRect(indicatorX, indicatorY, indicatorWidth, indicatorHeight, 0x66333333);
// OpenGL.pushMatrix();
// {
// float nameScale = 1.5F;
// OpenGL.scale(nameScale, nameScale, nameScale);
//
// int actualX = (int) ((indicatorX) / nameScale);
// int actualY = (int) ((indicatorY) / nameScale);
// int actualWidth = (int) (indicatorWidth / nameScale);
// int actualHeight = (int) (indicatorHeight / nameScale);
// fontrenderer.drawString("Storm Indicator for " + provider.getDimensionType().getName(), actualX + 7, actualY + 7, 0xFFAA00);
//
// if (Worlds.canSeeSky(new Pos(Game.minecraft().player), Game.minecraft().world))
// {
// Draw.drawStringAlignCenter("You are outdoors, take cover immediately!", (int) ((Screen.scaledDisplayResolution().getScaledWidth() / 2) / nameScale), actualY + 35, 0xFF0000);
// }
//
// if (worldTime > stormStartTime)
// {
// Draw.drawProgressBar("Storm Inbound", (int) stormStartTime, 0, actualX, actualY + 20, actualWidth, 4, 2, 0xFFFFAA00, false);
// }
// else
// {
// Draw.drawProgressBar("Time Until Storm (" + (timeUntilStorm / 20) + " seconds)", (int) stormStartTime, ((int) stormStartTime - (int) worldTime), actualX, actualY + 20, actualWidth, 4, 2, (timeUntilStorm / 20) < 15 ? 0xFFFF0000 : 0xFFFFAA00, false);
// }
// }
// OpenGL.popMatrix();
// OpenGL.color4i(0xFFFFFFFF);
// }
}
if (Game.minecraft().player != null)
@@ -325,7 +325,7 @@ public void drawInfoBar()
Block block = blockstate.getBlock();
TileEntity tile = Game.minecraft().player.world.getTileEntity(blockpos);
Draw.drawBlockSide(block, Game.minecraft().objectMouseOver.sideHit.ordinal(), subMenuX + subMenuPadding - 56, 0, 48, 48);
Draw.drawItem(new ItemStack(Item.getItemFromBlock(block), 1), subMenuX + subMenuPadding - 56, 0, 48, 48);
OpenGL.pushMatrix();
{
@@ -102,7 +102,7 @@ public void renderWorldLastEvent(RenderWorldLastEvent event)
if (living != null && (Entities.canEntityBeSeenBy(living, Game.minecraft().player) || !specialPlayer.isEntityCullingEnabled()) && living instanceof EntityLivingBase)
{
Organism organism = (Organism) living.getCapability(Provider.CAPABILITY, null);
Entity rve = Game.minecraft().renderViewEntity;
Entity rve = Game.minecraft().getRenderViewEntity();
Vec3d lPos = new Vec3d(living.posX, living.posY, living.posZ).addVector(0, living.getEyeHeight() / 2, 0);
lPos = lPos.subtract(new Vec3d(rve.posX + (rve.posX - rve.prevPosX) * event.getPartialTicks(), rve.posY + (rve.posY - rve.prevPosY) * event.getPartialTicks(), rve.posZ + (rve.posZ - rve.prevPosZ) * event.getPartialTicks()));
@@ -166,7 +166,7 @@ public TextureAtlasSprite apply(ResourceLocation location)
if (side == null && transformType == null)
{
TextureMap textureMap = Game.minecraft().textureMapBlocks;
TextureMap textureMap = Game.minecraft().getTextureMapBlocks();
BlockRendererDispatcher dispatcher = Game.minecraft().getBlockRendererDispatcher();
IModel retextured = model;
TRSRTransformation transformation = rotation(state);
@@ -6,6 +6,7 @@
import com.arisux.mdx.lib.client.render.ItemRenderer;
import com.arisux.mdx.lib.client.render.OpenGL;
import com.arisux.mdx.lib.game.Game;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
@@ -36,7 +37,7 @@ public void renderFirstPersonRight(ItemStack itemstack, EntityLivingBase entity,
float glScale = 1F;
OpenGL.translate(0.25F, 0.16F, -0.5F);
if (Mouse.isButtonDown(0) && mc.inGameHasFocus)
if (Mouse.isButtonDown(0) && Game.minecraft().inGameHasFocus)
{
OpenGL.translate(-0.77F, 0.25F, 0.35F);
}
@@ -48,7 +48,7 @@ public void renderFirstPersonRight(ItemStack itemstack, EntityLivingBase entity,
{
OpenGL.translate(1F, 0.2F, 0.2F);
if (Mouse.isButtonDown(0) && mc.inGameHasFocus)
if (Mouse.isButtonDown(0) && Game.minecraft().inGameHasFocus)
{
OpenGL.translate(-1.735F, 0.24F, 0.8F);
}
@@ -9,6 +9,7 @@
import com.arisux.mdx.lib.client.render.Draw;
import com.arisux.mdx.lib.client.render.ItemRenderer;
import com.arisux.mdx.lib.client.render.OpenGL;
import com.arisux.mdx.lib.game.Game;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
@@ -50,7 +51,7 @@ public void renderFirstPersonRight(ItemStack itemstack, EntityLivingBase entity,
{
OpenGL.translate(0F, 0.15F, -0.4F);
if (Mouse.isButtonDown(0) && mc.inGameHasFocus)
if (Mouse.isButtonDown(0) && Game.minecraft().inGameHasFocus)
{
OpenGL.translate(-0.6495F, 0F, 0F);
}
@@ -59,7 +60,7 @@ public void renderFirstPersonRight(ItemStack itemstack, EntityLivingBase entity,
OpenGL.scale(-glScale, -glScale, -glScale);
this.getModel().draw();
if (mc.player.getHeldItemMainhand() != null && mc.player.getHeldItemMainhand().getItem() instanceof ItemFirearm)
if (Game.minecraft().player.getHeldItemMainhand() != null && Game.minecraft().player.getHeldItemMainhand().getItem() instanceof ItemFirearm)
{
OpenGL.disable(GL11.GL_LIGHTING);
OpenGL.translate(-0.3439F, 0.6F, 0.04F);
@@ -89,7 +90,7 @@ public void renderInInventory(ItemStack itemstack, EntityLivingBase entity, Tran
public String getAmmoCountDisplayString()
{
int ammoCount = ((ItemFirearm) mc.player.inventory.getCurrentItem().getItem()).getAmmoCount();
int ammoCount = ((ItemFirearm) Game.minecraft().player.inventory.getCurrentItem().getItem()).getAmmoCount();
return (ammoCount < 10 ? "0" + ammoCount : String.valueOf(ammoCount));
}
}
@@ -6,6 +6,7 @@
import com.arisux.mdx.lib.client.render.ItemRenderer;
import com.arisux.mdx.lib.client.render.OpenGL;
import com.arisux.mdx.lib.game.Game;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
@@ -45,7 +46,7 @@ public void renderFirstPersonRight(ItemStack itemstack, EntityLivingBase entity,
float glScale = 1.0F;
OpenGL.translate(0F, 0.85F, 0F);
if (Mouse.isButtonDown(0) && mc.inGameHasFocus)
if (Mouse.isButtonDown(0) && Game.minecraft().inGameHasFocus)
{
OpenGL.translate(-0.8095F, 0.165F, 0.4F);
}
@@ -18,6 +18,7 @@
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class RenderItemM41A extends ItemRenderer<ModelM41A>
@@ -57,7 +58,7 @@ public void renderFirstPersonRight(ItemStack itemstack, EntityLivingBase entity,
{
OpenGL.translate(1F, 1.25F, -0.3F);
if (Mouse.isButtonDown(0) && mc.inGameHasFocus)
if (Mouse.isButtonDown(0) && Game.minecraft().inGameHasFocus)
{
OpenGL.translate(-1.16F, -0.095F, 0.52F);
}
@@ -67,7 +68,7 @@ public void renderFirstPersonRight(ItemStack itemstack, EntityLivingBase entity,
new Texture(Remote.downloadResource(String.format(URLs.SKIN_M41A, Game.session().getPlayerID()), this.getModel().getTexture())).bind();
this.getModel().getModel().render();
if (mc.player.getHeldItemMainhand() != null && mc.player.getHeldItemMainhand().getItem() instanceof ItemFirearm)
if (Game.minecraft().player.getHeldItemMainhand() != null && Game.minecraft().player.getHeldItemMainhand().getItem() instanceof ItemFirearm)
{
OpenGL.disable(GL11.GL_LIGHTING);
OpenGL.translate(-0.3439F, 0.6F, 0.04F);
@@ -81,7 +82,7 @@ public void renderFirstPersonRight(ItemStack itemstack, EntityLivingBase entity,
OpenGL.color(1F, 1F, 1F, 1F);
}
if (Inventories.getAmountOfItemEntityHas(AliensVsPredator.items().itemMotionTracker, entity) > 0)
if (Inventories.getAmountOfItemPlayerHas(AliensVsPredator.items().itemMotionTracker, (EntityPlayer) entity) > 0)
{
OpenGL.translate(-50F, -20F, -50F);
OpenGL.rotate(-90F, 0F, 1F, 0F);
@@ -107,7 +108,7 @@ public void renderInInventory(ItemStack itemstack, EntityLivingBase entity, Tran
public String getAmmoCountDisplayString()
{
int ammoCount = ((ItemFirearm) mc.player.inventory.getCurrentItem().getItem()).getAmmoCount();
int ammoCount = ((ItemFirearm) Game.minecraft().player.inventory.getCurrentItem().getItem()).getAmmoCount();
return (ammoCount < 10 ? "0" + ammoCount : String.valueOf(ammoCount));
}
}
@@ -7,6 +7,7 @@
import com.arisux.mdx.lib.client.render.ItemRenderer;
import com.arisux.mdx.lib.client.render.OpenGL;
import com.arisux.mdx.lib.game.Game;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
@@ -47,7 +48,7 @@ public void renderFirstPersonRight(ItemStack itemstack, EntityLivingBase entity,
{
OpenGL.translate(0F, 0.35F, -0.9F);
if (Mouse.isButtonDown(0) && mc.inGameHasFocus)
if (Mouse.isButtonDown(0) && Game.minecraft().inGameHasFocus)
{
OpenGL.translate(-0.5595F, 0F, 0F);
}
@@ -73,7 +74,7 @@ public void renderInInventory(ItemStack itemstack, EntityLivingBase entity, Tran
public String getAmmoCountDisplayString()
{
int ammoCount = ((ItemFirearm) mc.player.inventory.getCurrentItem().getItem()).getAmmoCount();
int ammoCount = ((ItemFirearm) Game.minecraft().player.inventory.getCurrentItem().getItem()).getAmmoCount();
return (ammoCount < 10 ? "0" + ammoCount : String.valueOf(ammoCount));
}
}
Oops, something went wrong.

0 comments on commit 8a28481

Please sign in to comment.