1.10.2 src
This commit is contained in:
parent
4363ccff52
commit
cfc7775d96
145
src/main/java/com/legacy/aether/client/AetherClientEvents.java
Normal file
145
src/main/java/com/legacy/aether/client/AetherClientEvents.java
Normal file
|
@ -0,0 +1,145 @@
|
|||
package com.legacy.aether.client;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.event.FOVUpdateEvent;
|
||||
import net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent;
|
||||
import net.minecraftforge.client.event.GuiScreenEvent.PotionShiftEvent;
|
||||
import net.minecraftforge.client.event.RenderHandEvent;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
|
||||
|
||||
import com.legacy.aether.client.gui.inventory.GuiAccessories;
|
||||
import com.legacy.aether.server.containers.inventory.InventoryAccessories;
|
||||
import com.legacy.aether.server.items.ItemsAether;
|
||||
import com.legacy.aether.server.networking.AetherGuiHandler;
|
||||
import com.legacy.aether.server.networking.AetherNetworkingManager;
|
||||
import com.legacy.aether.server.networking.packets.PacketOpenContainer;
|
||||
import com.legacy.aether.server.player.PlayerAether;
|
||||
|
||||
public class AetherClientEvents
|
||||
{
|
||||
|
||||
@SubscribeEvent
|
||||
public void onInventoryKeyPressed(KeyInputEvent event)
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
if (mc.currentScreen == null && mc.theWorld != null)
|
||||
{
|
||||
if (mc.thePlayer != null && !mc.thePlayer.capabilities.isCreativeMode && mc.gameSettings.keyBindInventory.isPressed())
|
||||
{
|
||||
AetherNetworkingManager.sendToServer(new PacketOpenContainer(AetherGuiHandler.accessories));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBowPulled(FOVUpdateEvent event)
|
||||
{
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if (player == null || (player != null && player.getActiveItemStack() == null))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Item item = player.getActiveItemStack().getItem();
|
||||
|
||||
if (item == ItemsAether.phoenix_bow)
|
||||
{
|
||||
int i = player.getItemInUseMaxCount();
|
||||
float f1 = (float)i / 20.0F;
|
||||
|
||||
if (f1 > 1.0F)
|
||||
{
|
||||
f1 = 1.0F;
|
||||
}
|
||||
else
|
||||
{
|
||||
f1 = f1 * f1;
|
||||
}
|
||||
|
||||
float original = event.getFov();
|
||||
|
||||
original *= 1.0F - f1 * 0.15F;
|
||||
|
||||
event.setNewfov(original);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderHand(RenderHandEvent event)
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
FirstPersonRenderer render = new FirstPersonRenderer(mc, event.getPartialTicks());
|
||||
|
||||
if (render.shouldRender())
|
||||
{
|
||||
mc.entityRenderer.enableLightmap();
|
||||
render.render();
|
||||
mc.entityRenderer.disableLightmap();
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onInvisibilityPlayerUpdate(RenderPlayerEvent.Pre event)
|
||||
{
|
||||
EntityPlayer player = event.getEntityPlayer();
|
||||
PlayerAether playerAether = PlayerAether.get(player);
|
||||
|
||||
if (playerAether != null)
|
||||
{
|
||||
if (playerAether.wearingAccessory(ItemsAether.invisibility_cape))
|
||||
{
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTextureStichedEvent(TextureStitchEvent event)
|
||||
{
|
||||
for (int i = 0; i < InventoryAccessories.EMPTY_SLOT_NAMES.length; ++i)
|
||||
{
|
||||
event.getMap().registerSprite(new ResourceLocation("aether_legacy", "items/slots/" + InventoryAccessories.EMPTY_SLOT_NAMES[i]));
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onGuiRender(InitGuiEvent.Post event)
|
||||
{
|
||||
ScaledResolution resolution = new ScaledResolution(Minecraft.getMinecraft());
|
||||
|
||||
for (int size = 0; size < event.getButtonList().size(); ++size)
|
||||
{
|
||||
GuiButton button = event.getButtonList().get(size);
|
||||
|
||||
if (Loader.isModLoaded("Baubles"))
|
||||
{
|
||||
if (button.id == 55)
|
||||
{
|
||||
button.xPosition = (resolution.getScaledWidth() / 2) - 39;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onStopPotionEffect(PotionShiftEvent event)
|
||||
{
|
||||
if (event.getGui() instanceof GuiAccessories)
|
||||
{
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
255
src/main/java/com/legacy/aether/client/AetherEntityRenderer.java
Normal file
255
src/main/java/com/legacy/aether/client/AetherEntityRenderer.java
Normal file
|
@ -0,0 +1,255 @@
|
|||
package com.legacy.aether.client;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItemFrame;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EntitySelectors;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityAerbunny;
|
||||
import com.legacy.aether.server.player.PlayerAether;
|
||||
|
||||
public class AetherEntityRenderer extends EntityRenderer
|
||||
{
|
||||
|
||||
private Entity pointedEntity;
|
||||
|
||||
private Minecraft mc;
|
||||
|
||||
public AetherEntityRenderer(Minecraft mc, IResourceManager resources)
|
||||
{
|
||||
super(mc, resources);
|
||||
this.mc = mc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getMouseOver(float partialTick)
|
||||
{
|
||||
EntityPlayer entityPlayer = this.mc.thePlayer;
|
||||
|
||||
if (this.mc.thePlayer != null && entityPlayer.inventory.getCurrentItem() != null && PlayerAether.get(entityPlayer) != null && PlayerAether.get(entityPlayer).getReach() == 10.0D)
|
||||
{
|
||||
this.getExtendedReach(partialTick);
|
||||
}
|
||||
else if (this.mc.thePlayer != null && !this.mc.thePlayer.getPassengers().isEmpty() && this.mc.thePlayer.getPassengers().get(0) instanceof EntityAerbunny)
|
||||
{
|
||||
this.getMountRightClick(partialTick);
|
||||
}
|
||||
else
|
||||
{
|
||||
super.getMouseOver(partialTick);
|
||||
}
|
||||
}
|
||||
|
||||
private void getMountRightClick(float partialTick)
|
||||
{
|
||||
Entity entity = this.mc.getRenderViewEntity();
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
if (this.mc.theWorld != null)
|
||||
{
|
||||
this.mc.mcProfiler.startSection("pick");
|
||||
this.mc.pointedEntity = null;
|
||||
double d0 = (double)this.mc.playerController.getBlockReachDistance();
|
||||
this.mc.objectMouseOver = entity.rayTrace(d0, partialTick);
|
||||
double d1 = d0;
|
||||
Vec3d vec3d = entity.getPositionEyes(partialTick);
|
||||
boolean flag = false;
|
||||
|
||||
if (this.mc.playerController.extendedReach())
|
||||
{
|
||||
d0 = 6.0D;
|
||||
d1 = 6.0D;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (d0 > 3.0D)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.mc.objectMouseOver != null)
|
||||
{
|
||||
d1 = this.mc.objectMouseOver.hitVec.distanceTo(vec3d);
|
||||
}
|
||||
|
||||
Vec3d vec3d1 = entity.getLook(partialTick);
|
||||
Vec3d vec3d2 = vec3d.addVector(vec3d1.xCoord * d0, vec3d1.yCoord * d0, vec3d1.zCoord * d0);
|
||||
this.pointedEntity = null;
|
||||
Vec3d vec3d3 = null;
|
||||
float f = 1.0F;
|
||||
List<Entity> list = this.mc.theWorld.getEntitiesInAABBexcluding(entity, entity.getEntityBoundingBox().addCoord(vec3d1.xCoord * d0, vec3d1.yCoord * d0, vec3d1.zCoord * d0).expand((double)f, (double)f, (double)f), Predicates.and(EntitySelectors.NOT_SPECTATING, new Predicate<Entity>()
|
||||
{
|
||||
public boolean apply(@Nullable Entity p_apply_1_)
|
||||
{
|
||||
return p_apply_1_ != null;
|
||||
}
|
||||
}));
|
||||
double d2 = d1;
|
||||
|
||||
for (int j = 0; j < list.size(); ++j)
|
||||
{
|
||||
Entity entity1 = (Entity)list.get(j);
|
||||
AxisAlignedBB axisalignedbb = entity1.getEntityBoundingBox().expandXyz((double)entity1.getCollisionBorderSize());
|
||||
RayTraceResult raytraceresult = axisalignedbb.calculateIntercept(vec3d, vec3d2);
|
||||
|
||||
if (axisalignedbb.isVecInside(vec3d))
|
||||
{
|
||||
if (d2 >= 0.0D)
|
||||
{
|
||||
this.pointedEntity = entity1;
|
||||
vec3d3 = raytraceresult == null ? vec3d : raytraceresult.hitVec;
|
||||
d2 = 0.0D;
|
||||
}
|
||||
}
|
||||
else if (raytraceresult != null)
|
||||
{
|
||||
double d3 = vec3d.distanceTo(raytraceresult.hitVec);
|
||||
|
||||
if (d3 < d2 || d2 == 0.0D)
|
||||
{
|
||||
if (d2 == 0.0D)
|
||||
{
|
||||
this.pointedEntity = entity1;
|
||||
vec3d3 = raytraceresult.hitVec;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pointedEntity = entity1;
|
||||
vec3d3 = raytraceresult.hitVec;
|
||||
d2 = d3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.pointedEntity != null && flag && vec3d.distanceTo(vec3d3) > 3.0D)
|
||||
{
|
||||
this.pointedEntity = null;
|
||||
this.mc.objectMouseOver = new RayTraceResult(RayTraceResult.Type.MISS, vec3d3, (EnumFacing)null, new BlockPos(vec3d3));
|
||||
}
|
||||
|
||||
if (this.pointedEntity != null && (d2 < d1 || this.mc.objectMouseOver == null))
|
||||
{
|
||||
this.mc.objectMouseOver = new RayTraceResult(this.pointedEntity, vec3d3);
|
||||
|
||||
if (this.pointedEntity instanceof EntityLivingBase || this.pointedEntity instanceof EntityItemFrame)
|
||||
{
|
||||
this.mc.pointedEntity = this.pointedEntity;
|
||||
}
|
||||
}
|
||||
|
||||
this.mc.mcProfiler.endSection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void getExtendedReach(float partialTicks)
|
||||
{
|
||||
Entity entity = this.mc.getRenderViewEntity();
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
if (this.mc.theWorld != null)
|
||||
{
|
||||
this.mc.mcProfiler.startSection("pick");
|
||||
this.mc.pointedEntity = null;
|
||||
double d0 = 10.0D;
|
||||
this.mc.objectMouseOver = entity.rayTrace(d0, partialTicks);
|
||||
double d1 = d0;
|
||||
Vec3d vec3d = entity.getPositionEyes(partialTicks);
|
||||
boolean flag = false;
|
||||
|
||||
if (this.mc.objectMouseOver != null)
|
||||
{
|
||||
d1 = this.mc.objectMouseOver.hitVec.distanceTo(vec3d);
|
||||
}
|
||||
|
||||
Vec3d vec3d1 = entity.getLook(partialTicks);
|
||||
Vec3d vec3d2 = vec3d.addVector(vec3d1.xCoord * d0, vec3d1.yCoord * d0, vec3d1.zCoord * d0);
|
||||
this.pointedEntity = null;
|
||||
Vec3d vec3d3 = null;
|
||||
float f = 1.0F;
|
||||
List<Entity> list = this.mc.theWorld.getEntitiesInAABBexcluding(entity, entity.getEntityBoundingBox().addCoord(vec3d1.xCoord * d0, vec3d1.yCoord * d0, vec3d1.zCoord * d0).expand((double)f, (double)f, (double)f), Predicates.and(EntitySelectors.NOT_SPECTATING, new Predicate<Entity>()
|
||||
{
|
||||
public boolean apply(@Nullable Entity p_apply_1_)
|
||||
{
|
||||
return p_apply_1_ != null;
|
||||
}
|
||||
}));
|
||||
double d2 = d1;
|
||||
|
||||
for (int j = 0; j < list.size(); ++j)
|
||||
{
|
||||
Entity entity1 = (Entity)list.get(j);
|
||||
AxisAlignedBB axisalignedbb = entity1.getEntityBoundingBox().expandXyz((double)entity1.getCollisionBorderSize());
|
||||
RayTraceResult raytraceresult = axisalignedbb.calculateIntercept(vec3d, vec3d2);
|
||||
|
||||
if (axisalignedbb.isVecInside(vec3d))
|
||||
{
|
||||
if (d2 >= 0.0D)
|
||||
{
|
||||
this.pointedEntity = entity1;
|
||||
vec3d3 = raytraceresult == null ? vec3d : raytraceresult.hitVec;
|
||||
d2 = 0.0D;
|
||||
}
|
||||
}
|
||||
else if (raytraceresult != null)
|
||||
{
|
||||
double d3 = vec3d.distanceTo(raytraceresult.hitVec);
|
||||
|
||||
if (d3 < d2 || d2 == 0.0D)
|
||||
{
|
||||
if (d2 == 0.0D)
|
||||
{
|
||||
this.pointedEntity = entity1;
|
||||
vec3d3 = raytraceresult.hitVec;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pointedEntity = entity1;
|
||||
vec3d3 = raytraceresult.hitVec;
|
||||
d2 = d3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.pointedEntity != null && flag && vec3d.distanceTo(vec3d3) > 3.0D)
|
||||
{
|
||||
this.pointedEntity = null;
|
||||
this.mc.objectMouseOver = new RayTraceResult(RayTraceResult.Type.MISS, vec3d3, (EnumFacing)null, new BlockPos(vec3d3));
|
||||
}
|
||||
|
||||
if (this.pointedEntity != null && (d2 < d1 || this.mc.objectMouseOver == null))
|
||||
{
|
||||
this.mc.objectMouseOver = new RayTraceResult(this.pointedEntity, vec3d3);
|
||||
|
||||
if (this.pointedEntity instanceof EntityLivingBase || this.pointedEntity instanceof EntityItemFrame)
|
||||
{
|
||||
this.mc.pointedEntity = this.pointedEntity;
|
||||
}
|
||||
}
|
||||
|
||||
this.mc.mcProfiler.endSection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
77
src/main/java/com/legacy/aether/client/ClientProxy.java
Normal file
77
src/main/java/com/legacy/aether/client/ClientProxy.java
Normal file
|
@ -0,0 +1,77 @@
|
|||
package com.legacy.aether.client;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
|
||||
import com.legacy.aether.client.audio.AetherMusicHandler;
|
||||
import com.legacy.aether.client.gui.GuiAetherInGame;
|
||||
import com.legacy.aether.client.renders.AetherEntityRenderingRegistry;
|
||||
import com.legacy.aether.client.renders.blocks.BlockRendering;
|
||||
import com.legacy.aether.client.renders.items.ItemRendering;
|
||||
import com.legacy.aether.server.ServerProxy;
|
||||
|
||||
public class ClientProxy extends ServerProxy
|
||||
{
|
||||
|
||||
@Override
|
||||
public void preInitialization()
|
||||
{
|
||||
AetherEntityRenderingRegistry.initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialization()
|
||||
{
|
||||
Minecraft.getMinecraft().entityRenderer = new AetherEntityRenderer(Minecraft.getMinecraft(), Minecraft.getMinecraft().getResourceManager());
|
||||
|
||||
AetherEntityRenderingRegistry.initializePlayerLayers();
|
||||
|
||||
BlockRendering.initialize();
|
||||
ItemRendering.initialize();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new GuiAetherInGame(Minecraft.getMinecraft()));
|
||||
MinecraftForge.EVENT_BUS.register(new AetherClientEvents());
|
||||
|
||||
registerEvent(new AetherMusicHandler());
|
||||
registerEvent(new ClientTickHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(EntityPlayer player, String message)
|
||||
{
|
||||
player.addChatMessage(new TextComponentString(message));
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityPlayer getThePlayer()
|
||||
{
|
||||
return Minecraft.getMinecraft().thePlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnSmoke(World world, BlockPos pos)
|
||||
{
|
||||
Random rand = new Random();
|
||||
double a, b, c;
|
||||
a = pos.getX() + 0.5D + ((rand.nextFloat() - rand.nextFloat()) * 0.375D);
|
||||
b = pos.getY() + 0.5D + ((rand.nextFloat() - rand.nextFloat()) * 0.375D);
|
||||
c = pos.getZ() + 0.5D + ((rand.nextFloat() - rand.nextFloat()) * 0.375D);
|
||||
world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, a, b, c, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnBlockBrokenFX(IBlockState state, BlockPos pos)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().effectRenderer.addBlockDestroyEffects(pos, state);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.legacy.aether.client;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
|
||||
import com.legacy.aether.client.gui.AetherLoadingScreen;
|
||||
|
||||
public class ClientTickHandler
|
||||
{
|
||||
|
||||
public static Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
@SubscribeEvent
|
||||
public void onClientTick(TickEvent.ClientTickEvent event) throws Exception
|
||||
{
|
||||
TickEvent.Phase phase = event.phase;
|
||||
TickEvent.Type type = event.type;
|
||||
|
||||
if (phase == TickEvent.Phase.END)
|
||||
{
|
||||
if (type.equals(TickEvent.Type.CLIENT))
|
||||
{
|
||||
if (!(mc.loadingScreen instanceof AetherLoadingScreen))
|
||||
{
|
||||
mc.loadingScreen = new AetherLoadingScreen(mc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
218
src/main/java/com/legacy/aether/client/FirstPersonRenderer.java
Normal file
218
src/main/java/com/legacy/aether/client/FirstPersonRenderer.java
Normal file
|
@ -0,0 +1,218 @@
|
|||
package com.legacy.aether.client;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelPlayer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EnumHandSide;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
|
||||
import com.legacy.aether.server.containers.inventory.InventoryAccessories;
|
||||
import com.legacy.aether.server.items.ItemsAether;
|
||||
import com.legacy.aether.server.items.accessories.ItemAccessory;
|
||||
import com.legacy.aether.server.player.PlayerAether;
|
||||
|
||||
public class FirstPersonRenderer
|
||||
{
|
||||
|
||||
private final TextureManager renderEngine = Minecraft.getMinecraft().getRenderManager().renderEngine;
|
||||
|
||||
private Minecraft mc;
|
||||
|
||||
public PlayerAether player;
|
||||
|
||||
public EntityPlayer thePlayer;
|
||||
|
||||
public ModelPlayer modelBase;
|
||||
|
||||
public ModelBiped modelGlove;
|
||||
|
||||
private float partialTickTime;
|
||||
|
||||
private boolean isSlim;
|
||||
|
||||
public FirstPersonRenderer(Minecraft mc, float tickTime)
|
||||
{
|
||||
this.mc = mc;
|
||||
this.thePlayer = mc.thePlayer;
|
||||
this.partialTickTime = tickTime;
|
||||
|
||||
this.player = PlayerAether.get(mc.thePlayer);
|
||||
|
||||
this.modelGlove = new ModelBiped(1.0F);
|
||||
this.isSlim = ((AbstractClientPlayer)this.thePlayer).getSkinType() == "slim" ? true : false;
|
||||
this.modelBase = new ModelPlayer(1.0F, this.isSlim);
|
||||
}
|
||||
|
||||
public void render()
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
this.hurtCameraEffect(this.partialTickTime);
|
||||
|
||||
this.setupWobbleEffect(this.partialTickTime);
|
||||
|
||||
this.mc.entityRenderer.enableLightmap();
|
||||
float f5 = this.thePlayer.getSwingProgress(this.partialTickTime);
|
||||
float f6 = MathHelper.sin(f5 * (float)Math.PI);
|
||||
float f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI);
|
||||
boolean flag = this.thePlayer.getPrimaryHand() == EnumHandSide.RIGHT ? true : false;
|
||||
GlStateManager.translate((flag ? -f7 : f7) * 0.3F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI * 2.0F) * 0.4F, -f6 * 0.4F);
|
||||
GlStateManager.translate((flag ? 0.8F : -0.8F) * 0.8F, -0.75F * 0.8F - (0.1F) * 0.6F, -0.9F * 0.8F);
|
||||
if (!flag)
|
||||
{
|
||||
GlStateManager.translate(!this.isSlim ? 0.1 : 0.15, 0, 0);
|
||||
GlStateManager.rotate(90.0F, 0.03F, 0.5F, -0.03F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
f5 = this.thePlayer.getSwingProgress(this.partialTickTime);
|
||||
f6 = MathHelper.sin(f5 * f5 * (float)Math.PI);
|
||||
f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI);
|
||||
GlStateManager.rotate((flag ? f7 : -f7) * 70.0F, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate((flag ? -f6 : f6) * 20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GlStateManager.translate(-1.0F, 3.6F, 3.5F);
|
||||
GlStateManager.rotate(120.0F, 0.0F, 0.02F, 1.0F);
|
||||
GlStateManager.rotate(200.0F, 1.0F, 0.02F, 0.02F);
|
||||
GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.scale(1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.translate(5.6F, 0.02F, 0.0F);
|
||||
GlStateManager.scale(1F, 1F, 1F);
|
||||
this.setLightmap();
|
||||
this.armRender(flag);
|
||||
this.mc.entityRenderer.disableLightmap();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
private void setupWobbleEffect(float partialTickTime)
|
||||
{
|
||||
EntityPlayerSP entityplayersp = (EntityPlayerSP)this.thePlayer;
|
||||
float f3 = entityplayersp.prevRenderArmPitch + (entityplayersp.renderArmPitch - entityplayersp.prevRenderArmPitch) * partialTickTime;
|
||||
float f4 = entityplayersp.prevRenderArmYaw + (entityplayersp.renderArmYaw - entityplayersp.prevRenderArmYaw) * partialTickTime;
|
||||
GlStateManager.rotate((this.thePlayer.rotationPitch - f3) * 0.1F, 1.0F, 0.0F, 0.0F);
|
||||
GlStateManager.rotate((this.thePlayer.rotationYaw - f4) * 0.1F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
private void hurtCameraEffect(float p_78482_1_)
|
||||
{
|
||||
EntityLivingBase entitylivingbase = (EntityLivingBase) this.mc.getRenderViewEntity();
|
||||
float f1 = (float)entitylivingbase.hurtTime - p_78482_1_;
|
||||
float f2;
|
||||
|
||||
if (entitylivingbase.getHealth() <= 0.0F)
|
||||
{
|
||||
f2 = (float)entitylivingbase.deathTime + p_78482_1_;
|
||||
GlStateManager.rotate(40.0F - 8000.0F / (f2 + 200.0F), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (f1 >= 0.0F)
|
||||
{
|
||||
f1 /= (float)entitylivingbase.maxHurtTime;
|
||||
f1 = MathHelper.sin(f1 * f1 * f1 * f1 * (float)Math.PI);
|
||||
f2 = entitylivingbase.attackedAtYaw;
|
||||
GlStateManager.rotate(-f2, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(-f1 * 14.0F, 0.0F, 0.0F, 1.0F);
|
||||
GlStateManager.rotate(f2, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
private void setLightmap()
|
||||
{
|
||||
AbstractClientPlayer abstractclientplayer = this.mc.thePlayer;
|
||||
int i = this.mc.theWorld.getCombinedLight(new BlockPos(abstractclientplayer.posX, abstractclientplayer.posY + (double)abstractclientplayer.getEyeHeight(), abstractclientplayer.posZ), 0);
|
||||
float f = (float)(i & 65535);
|
||||
float f1 = (float)(i >> 16);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, f, f1);
|
||||
}
|
||||
|
||||
public void armRender(boolean isLeft)
|
||||
{
|
||||
InventoryAccessories accessories = this.player.accessories;
|
||||
|
||||
if (accessories == null || !this.shouldRender() || this.renderEngine == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (accessories.stacks[6] != null)
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.translate(-0.0F, 0, -0.05F);
|
||||
|
||||
if (!this.isSlim)
|
||||
{
|
||||
GlStateManager.translate(0, 0, 0.15F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlStateManager.translate(0, 0, 0.15F);
|
||||
}
|
||||
|
||||
this.modelGlove.setRotationAngles(0, 0, 0, 0, 0, 0, this.thePlayer);
|
||||
this.modelBase.setRotationAngles(0, 0, 0, 0, 0, 0, this.thePlayer);
|
||||
|
||||
if (this.thePlayer instanceof AbstractClientPlayer)
|
||||
{
|
||||
this.renderEngine.bindTexture(((AbstractClientPlayer)this.thePlayer).getLocationSkin());
|
||||
}
|
||||
|
||||
this.modelBase.bipedRightArm.render(this.isSlim ? 0.0625F : 0.0625F);
|
||||
|
||||
if (accessories.stacks[6].getItem() instanceof ItemAccessory)
|
||||
{
|
||||
ItemAccessory glove = (ItemAccessory) accessories.stacks[6].getItem();
|
||||
|
||||
this.renderEngine.bindTexture(glove.texture);
|
||||
|
||||
int colour = glove.getColorFromItemStack(accessories.stacks[6], 0);
|
||||
float red = ((colour >> 16) & 0xff) / 255F;
|
||||
float green = ((colour >> 8) & 0xff) / 255F;
|
||||
float blue = (colour & 0xff) / 255F;
|
||||
|
||||
if (glove != ItemsAether.phoenix_gloves)
|
||||
{
|
||||
GlStateManager.color(red, green, blue);
|
||||
}
|
||||
|
||||
GlStateManager.disableDepth();
|
||||
|
||||
if (this.isSlim)
|
||||
{
|
||||
|
||||
this.modelGlove.bipedRightArm.offsetX = 0.036F;
|
||||
this.modelGlove.bipedRightArm.offsetY = isLeft ? 0.11F : 0.12F;
|
||||
this.modelGlove.bipedRightArm.offsetZ = isLeft ? 0.02F : 0.008F;
|
||||
}
|
||||
|
||||
this.modelGlove.bipedRightArm.render(this.isSlim ? 0.06F : 0.0625F);
|
||||
|
||||
GlStateManager.enableDepth();
|
||||
}
|
||||
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldRender()
|
||||
{
|
||||
if (this.player.thePlayer.inventory.getCurrentItem() == null && this.player.accessories.stacks[6] != null && this.mc.gameSettings.thirdPersonView == 0 && !((EntityPlayer) this.mc.getRenderViewEntity()).isPlayerSleeping() && !this.mc.gameSettings.hideGUI && !this.mc.playerController.isSpectatorMode() && !FMLClientHandler.instance().hasOptifine())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package com.legacy.aether.client.audio;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraftforge.client.event.sound.PlaySoundEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import com.legacy.aether.server.Aether;
|
||||
import com.legacy.aether.server.AetherConfig;
|
||||
import com.legacy.aether.server.registry.sounds.SoundsAether;
|
||||
|
||||
public class AetherMusicHandler
|
||||
{
|
||||
|
||||
private Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
private Random random;
|
||||
|
||||
public AetherMusicHandler()
|
||||
{
|
||||
this.random = new Random();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onMusicControl(PlaySoundEvent event)
|
||||
{
|
||||
if (event.getSound().getCategory() == SoundCategory.MUSIC)
|
||||
{
|
||||
if (this.mc.thePlayer != null)
|
||||
{
|
||||
if (event.getSound().getSoundLocation() == this.mc.getAmbientMusicType().getMusicLocation().getSoundName() && this.mc.thePlayer.dimension == AetherConfig.getAetherDimensionID())
|
||||
{
|
||||
if (!this.isAetherSongPlaying(event.getSound()))
|
||||
{
|
||||
int songNum = this.random.nextInt(4);
|
||||
|
||||
event.setResultSound(getSound(Aether.locate("music.aether" + (songNum + 1))));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
event.setResultSound(null);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (event.getSound().getCategory() == SoundCategory.RECORDS)
|
||||
{
|
||||
this.mc.getSoundHandler().stopSounds();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isAetherSongPlaying(ISound sound)
|
||||
{
|
||||
boolean aether1Playing = this.mc.getSoundHandler().isSoundPlaying(getSound(new ResourceLocation("aether_legacy:music.aether1")));
|
||||
boolean aether2Playing = this.mc.getSoundHandler().isSoundPlaying(getSound(new ResourceLocation("aether_legacy:music.aether2")));
|
||||
boolean aether3Playing = this.mc.getSoundHandler().isSoundPlaying(getSound(new ResourceLocation("aether_legacy:music.aether3")));
|
||||
boolean aether4Playing = this.mc.getSoundHandler().isSoundPlaying(getSound(new ResourceLocation("aether_legacy:music.aether4")));
|
||||
|
||||
return aether1Playing || aether2Playing || aether3Playing || aether4Playing;
|
||||
}
|
||||
|
||||
public void playSound(SoundEvent event)
|
||||
{
|
||||
ISound sound = new PositionedSoundRecord(event.getSoundName(), SoundCategory.PLAYERS, 1.0F, 1.0F, false, 0, ISound.AttenuationType.NONE, 0, 0, 0);
|
||||
|
||||
this.mc.getSoundHandler().playSound(sound);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static ISound getAchievementSound(int number)
|
||||
{
|
||||
SoundEvent sound = number == 1 ? SoundsAether.achievement_bronze : number == 2 ? SoundsAether.achievement_silver : SoundsAether.achievement_gen;
|
||||
|
||||
return getSound(sound.getSoundName());
|
||||
}
|
||||
|
||||
public static ISound getSound(ResourceLocation location)
|
||||
{
|
||||
return new PositionedSoundRecord(location, SoundCategory.MUSIC, 1.0F, 1.0F, false, 0, ISound.AttenuationType.NONE, 0, 0, 0);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,152 @@
|
|||
package com.legacy.aether.client.gui;
|
||||
|
||||
import net.minecraft.client.LoadingScreenRenderer;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.shader.Framebuffer;
|
||||
|
||||
import com.legacy.aether.client.gui.trivia.AetherTrivia;
|
||||
|
||||
public class AetherLoadingScreen extends LoadingScreenRenderer
|
||||
{
|
||||
|
||||
private String message = "";
|
||||
|
||||
private Minecraft mc;
|
||||
|
||||
private String currentlyDisplayedText = "";
|
||||
|
||||
private String currentDisplayedTrivia = "";
|
||||
|
||||
private long systemTime = Minecraft.getSystemTime();
|
||||
|
||||
private Framebuffer framebuffer;
|
||||
|
||||
public AetherLoadingScreen(Minecraft mcIn)
|
||||
{
|
||||
super(mcIn);
|
||||
|
||||
this.mc = mcIn;
|
||||
|
||||
this.framebuffer = new Framebuffer(mcIn.displayWidth, mcIn.displayHeight, false);
|
||||
this.framebuffer.setFramebufferFilter(9728);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetProgressAndMessage(String message)
|
||||
{
|
||||
super.resetProgressAndMessage(message);
|
||||
|
||||
this.currentDisplayedTrivia = AetherTrivia.getNewTrivia();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLoadingProgress(int progress)
|
||||
{
|
||||
long i = Minecraft.getSystemTime();
|
||||
|
||||
if (i - this.systemTime >= 100L)
|
||||
{
|
||||
this.systemTime = i;
|
||||
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
||||
int j = scaledresolution.getScaleFactor();
|
||||
int k = scaledresolution.getScaledWidth();
|
||||
int l = scaledresolution.getScaledHeight();
|
||||
|
||||
this.mc.fontRendererObj.drawStringWithShadow(this.currentDisplayedTrivia, (k - this.mc.fontRendererObj.getStringWidth(this.currentDisplayedTrivia)) / 2, l - 16, 0xffff99);
|
||||
if (OpenGlHelper.isFramebufferEnabled())
|
||||
{
|
||||
this.framebuffer.framebufferClear();
|
||||
}
|
||||
else
|
||||
{
|
||||
GlStateManager.clear(256);
|
||||
}
|
||||
|
||||
this.framebuffer.bindFramebuffer(false);
|
||||
GlStateManager.matrixMode(5889);
|
||||
GlStateManager.loadIdentity();
|
||||
GlStateManager.ortho(0.0D, scaledresolution.getScaledWidth_double(), scaledresolution.getScaledHeight_double(), 0.0D, 100.0D, 300.0D);
|
||||
GlStateManager.matrixMode(5888);
|
||||
GlStateManager.loadIdentity();
|
||||
GlStateManager.translate(0.0F, 0.0F, -200.0F);
|
||||
|
||||
if (!OpenGlHelper.isFramebufferEnabled())
|
||||
{
|
||||
GlStateManager.clear(16640);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!net.minecraftforge.fml.client.FMLClientHandler.instance().handleLoadingScreen(scaledresolution)) //FML Don't render while FML's pre-screen is rendering
|
||||
{
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer worldrenderer = tessellator.getBuffer();
|
||||
this.mc.getTextureManager().bindTexture(Gui.OPTIONS_BACKGROUND);
|
||||
float f = 32.0F;
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
worldrenderer.pos(0.0D, (double)l, 0.0D).tex(0.0D, (double)((float)l / f)).color(64, 64, 64, 255).endVertex();
|
||||
worldrenderer.pos((double)k, (double)l, 0.0D).tex((double)((float)k / f), (double)((float)l / f)).color(64, 64, 64, 255).endVertex();
|
||||
worldrenderer.pos((double)k, 0.0D, 0.0D).tex((double)((float)k / f), 0.0D).color(64, 64, 64, 255).endVertex();
|
||||
worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, 0.0D).color(64, 64, 64, 255).endVertex();
|
||||
tessellator.draw();
|
||||
|
||||
if (progress >= 0)
|
||||
{
|
||||
int i1 = 100;
|
||||
int j1 = 2;
|
||||
int k1 = k / 2 - i1 / 2;
|
||||
int l1 = l / 2 + 16;
|
||||
GlStateManager.disableTexture2D();
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
worldrenderer.pos((double)k1, (double)l1, 0.0D).color(128, 128, 128, 255).endVertex();
|
||||
worldrenderer.pos((double)k1, (double)(l1 + j1), 0.0D).color(128, 128, 128, 255).endVertex();
|
||||
worldrenderer.pos((double)(k1 + i1), (double)(l1 + j1), 0.0D).color(128, 128, 128, 255).endVertex();
|
||||
worldrenderer.pos((double)(k1 + i1), (double)l1, 0.0D).color(128, 128, 128, 255).endVertex();
|
||||
worldrenderer.pos((double)k1, (double)l1, 0.0D).color(128, 255, 128, 255).endVertex();
|
||||
worldrenderer.pos((double)k1, (double)(l1 + j1), 0.0D).color(128, 255, 128, 255).endVertex();
|
||||
worldrenderer.pos((double)(k1 + progress), (double)(l1 + j1), 0.0D).color(128, 255, 128, 255).endVertex();
|
||||
worldrenderer.pos((double)(k1 + progress), (double)l1, 0.0D).color(128, 255, 128, 255).endVertex();
|
||||
tessellator.draw();
|
||||
GlStateManager.enableTexture2D();
|
||||
}
|
||||
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
this.mc.fontRendererObj.drawStringWithShadow(this.currentlyDisplayedText, (float)((k - this.mc.fontRendererObj.getStringWidth(this.currentlyDisplayedText)) / 2), (float)(l / 2 - 4 - 16), 16777215);
|
||||
this.mc.fontRendererObj.drawStringWithShadow(this.message, (float)((k - this.mc.fontRendererObj.getStringWidth(this.message)) / 2), (float)(l / 2 - 4 + 8), 16777215);
|
||||
this.mc.fontRendererObj.drawStringWithShadow(this.currentDisplayedTrivia, (k - this.mc.fontRendererObj.getStringWidth(this.currentDisplayedTrivia)) / 2, l - 16, 0xffff99);
|
||||
}
|
||||
}
|
||||
catch (java.io.IOException e)
|
||||
{
|
||||
com.google.common.base.Throwables.propagate(e);
|
||||
}
|
||||
|
||||
this.framebuffer.unbindFramebuffer();
|
||||
|
||||
if (OpenGlHelper.isFramebufferEnabled())
|
||||
{
|
||||
this.framebuffer.framebufferRender(k * j, l * j);
|
||||
}
|
||||
|
||||
this.mc.updateDisplay();
|
||||
|
||||
try
|
||||
{
|
||||
Thread.yield();
|
||||
}
|
||||
catch (Exception var15)
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.legacy.aether.client.gui;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraftforge.client.event.RenderBlockOverlayEvent;
|
||||
import net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
import com.legacy.aether.client.overlay.AetherOverlay;
|
||||
import com.legacy.aether.server.player.PlayerAether;
|
||||
|
||||
public class GuiAetherInGame extends Gui
|
||||
{
|
||||
|
||||
private Minecraft mc;
|
||||
|
||||
public GuiAetherInGame(Minecraft mc)
|
||||
{
|
||||
super();
|
||||
this.mc = mc;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderBlockOverlay(RenderBlockOverlayEvent event)
|
||||
{
|
||||
if (this.mc.thePlayer != null)
|
||||
{
|
||||
PlayerAether player = PlayerAether.get(this.mc.thePlayer);
|
||||
|
||||
if (player.isWearingPhoenixSet() && event.getOverlayType() == OverlayType.FIRE)
|
||||
{
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderGui(RenderGameOverlayEvent event)
|
||||
{
|
||||
if (event.isCancelable() || event.getType() != ElementType.TEXT)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerAether player = PlayerAether.get(this.mc.thePlayer);
|
||||
|
||||
if (player.poisonInstance() != null)
|
||||
{
|
||||
AetherOverlay.renderCure(this.mc);
|
||||
AetherOverlay.renderPoison(this.mc);
|
||||
}
|
||||
|
||||
if (player.thePlayer != null)
|
||||
{
|
||||
AetherOverlay.renderIronBubble(this.mc);
|
||||
AetherOverlay.renderCooldown(this.mc);
|
||||
AetherOverlay.renderJumps(this.mc);
|
||||
AetherOverlay.renderBossHP(this.mc);
|
||||
}
|
||||
|
||||
float portalTime = player.prevTimeInPortal * 1.2F + (player.timeInPortal - player.prevTimeInPortal);
|
||||
|
||||
if(portalTime > 0.0F)
|
||||
{
|
||||
GlStateManager.enableBlend();
|
||||
|
||||
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
||||
|
||||
AetherOverlay.renderPortal(portalTime, scaledresolution.getScaledWidth(), scaledresolution.getScaledHeight());
|
||||
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
58
src/main/java/com/legacy/aether/client/gui/GuiEnchanter.java
Normal file
58
src/main/java/com/legacy/aether/client/gui/GuiEnchanter.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
package com.legacy.aether.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.server.containers.ContainerEnchanter;
|
||||
import com.legacy.aether.server.tile_entities.TileEntityEnchanter;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiEnchanter extends GuiContainer
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/gui/enchanter.png");
|
||||
|
||||
private TileEntityEnchanter enchanter;
|
||||
|
||||
public GuiEnchanter(InventoryPlayer inventory, TileEntityEnchanter tileEntity)
|
||||
{
|
||||
super(new ContainerEnchanter(inventory, tileEntity));
|
||||
this.enchanter = tileEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
||||
{
|
||||
String enchanterName = "Enchanter";
|
||||
|
||||
this.fontRendererObj.drawString(enchanterName, this.xSize / 2 - this.fontRendererObj.getStringWidth(enchanterName) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(TEXTURE);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
int i1;
|
||||
|
||||
if (this.enchanter.isBurning())
|
||||
{
|
||||
i1 = this.enchanter.getEnchantmentTimeRemaining(12);
|
||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2);
|
||||
}
|
||||
|
||||
i1 = this.enchanter.getEnchantmentProgressScaled(24);
|
||||
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16);
|
||||
}
|
||||
|
||||
}
|
58
src/main/java/com/legacy/aether/client/gui/GuiFreezer.java
Normal file
58
src/main/java/com/legacy/aether/client/gui/GuiFreezer.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
package com.legacy.aether.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.server.containers.ContainerFreezer;
|
||||
import com.legacy.aether.server.tile_entities.TileEntityFreezer;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiFreezer extends GuiContainer
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/gui/enchanter.png");
|
||||
|
||||
private TileEntityFreezer freezer;
|
||||
|
||||
public GuiFreezer(InventoryPlayer inventory, TileEntityFreezer tileEntity)
|
||||
{
|
||||
super(new ContainerFreezer(inventory, tileEntity));
|
||||
this.freezer = tileEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
||||
{
|
||||
String freezerName = "Freezer";
|
||||
|
||||
this.fontRendererObj.drawString(freezerName, this.xSize / 2 - this.fontRendererObj.getStringWidth(freezerName) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(TEXTURE);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
int i1;
|
||||
|
||||
if (this.freezer.isBurning())
|
||||
{
|
||||
i1 = this.freezer.getEnchantmentTimeRemaining(12);
|
||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2);
|
||||
}
|
||||
|
||||
i1 = this.freezer.getEnchantmentProgressScaled(24);
|
||||
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16);
|
||||
}
|
||||
|
||||
}
|
53
src/main/java/com/legacy/aether/client/gui/GuiIncubator.java
Normal file
53
src/main/java/com/legacy/aether/client/gui/GuiIncubator.java
Normal file
|
@ -0,0 +1,53 @@
|
|||
package com.legacy.aether.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.server.containers.ContainerIncubator;
|
||||
import com.legacy.aether.server.tile_entities.TileEntityIncubator;
|
||||
|
||||
public class GuiIncubator extends GuiContainer
|
||||
{
|
||||
|
||||
private TileEntityIncubator incubatorInventory;
|
||||
|
||||
private static final ResourceLocation TEXTURE_INCUBATOR = new ResourceLocation("aether_legacy", "textures/gui/incubator.png");
|
||||
|
||||
public GuiIncubator(EntityPlayer player, InventoryPlayer inventoryplayer, IInventory tileentityIncubator)
|
||||
{
|
||||
super(new ContainerIncubator(player, inventoryplayer, tileentityIncubator));
|
||||
this.incubatorInventory = (TileEntityIncubator) tileentityIncubator;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
||||
{
|
||||
this.fontRendererObj.drawString("Incubator", 60, 6, 0x404040);
|
||||
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int ia, int ib)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.renderEngine.bindTexture(TEXTURE_INCUBATOR);
|
||||
int j = (this.width - this.xSize) / 2;
|
||||
int k = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize);
|
||||
if (this.incubatorInventory.isBurning())
|
||||
{
|
||||
int l = this.incubatorInventory.getBurnTimeRemainingScaled(12);
|
||||
this.drawTexturedModalRect(j + 74, (k + 47) - l, 176, 12 - l, 14, l + 2);
|
||||
}
|
||||
int i1 = this.incubatorInventory.getCookProgressScaled(54);
|
||||
this.drawTexturedModalRect(j + 103, k + 70 - i1, 179, 70 - i1, 10, i1);
|
||||
}
|
||||
|
||||
}
|
110
src/main/java/com/legacy/aether/client/gui/GuiLore.java
Normal file
110
src/main/java/com/legacy/aether/client/gui/GuiLore.java
Normal file
|
@ -0,0 +1,110 @@
|
|||
package com.legacy.aether.client.gui;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.server.containers.ContainerLore;
|
||||
import com.legacy.aether.server.registry.lore.AetherLoreEntry;
|
||||
import com.legacy.aether.server.registry.lore.EndLoreEntry;
|
||||
import com.legacy.aether.server.registry.lore.NetherLoreEntry;
|
||||
import com.legacy.aether.server.registry.lore.OverworldLoreEntry;
|
||||
import com.legacy.aether.server.registry.objects.EntryInformation;
|
||||
import com.legacy.aether.server.registry.objects.LoreEntry;
|
||||
|
||||
public class GuiLore extends GuiContainer
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE_LORE = new ResourceLocation("aether_legacy", "textures/gui/lore.png");
|
||||
|
||||
private HashMap<String, LoreEntry> lore_pages = new HashMap<String, LoreEntry>();
|
||||
|
||||
public GuiLore(InventoryPlayer inventoryplayer)
|
||||
{
|
||||
super(new ContainerLore(inventoryplayer));
|
||||
|
||||
this.xSize = 256; this.ySize = 195;
|
||||
}
|
||||
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
registerSection("Overworld Lore", new OverworldLoreEntry().initEntries()); //199 Complete
|
||||
registerSection("Nether Lore", new NetherLoreEntry().initEntries()); // 22 Complete
|
||||
registerSection("End Lore", new EndLoreEntry().initEntries()); //11 Complete
|
||||
registerSection("Aether Lore", new AetherLoreEntry().initEntries()); //157 Complete
|
||||
}
|
||||
|
||||
public void registerSection(String name, LoreEntry lore)
|
||||
{
|
||||
lore_pages.put(name, lore);
|
||||
}
|
||||
|
||||
public LoreEntry getSection(String name)
|
||||
{
|
||||
return lore_pages.get(name);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
||||
{
|
||||
this.fontRendererObj.drawString("Book of Lore:", 37, 18, 4210752);
|
||||
this.fontRendererObj.drawString("Add Object", 37, 28, 4210752);
|
||||
|
||||
this.fontRendererObj.drawString("Item : ", 46, 72, 4210752);
|
||||
ItemStack searchedStack = ((ContainerLore)this.inventorySlots).loreSlot.getStackInSlot(0);
|
||||
|
||||
if (searchedStack != null)
|
||||
{
|
||||
Iterator<LoreEntry> entries = this.lore_pages.values().iterator();
|
||||
|
||||
while(entries.hasNext())
|
||||
{
|
||||
Iterator<EntryInformation> entry_contents = entries.next().EntryInformation().iterator();
|
||||
|
||||
while (entry_contents.hasNext())
|
||||
{
|
||||
EntryInformation information = entry_contents.next();
|
||||
Item loreItem = information.base.getItem();
|
||||
|
||||
if (loreItem != null && (information.base.getItemDamage() == searchedStack.getItemDamage() || information.base.isItemStackDamageable()) && loreItem == searchedStack.getItem())
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(0.8F, 1.2F, 0.0F);
|
||||
|
||||
this.fontRendererObj.drawString(information.s, 164, 14, 4210752);
|
||||
this.fontRendererObj.drawString(information.s1, 164, 28, 4210752);
|
||||
this.fontRendererObj.drawString(information.s2, 164, 38, 4210752);
|
||||
this.fontRendererObj.drawString(information.s3, 164, 48, 4210752);
|
||||
this.fontRendererObj.drawString(information.s4, 164, 58, 4210752);
|
||||
this.fontRendererObj.drawString(information.s5, 164, 68, 4210752);
|
||||
this.fontRendererObj.drawString(information.s6, 164, 78, 4210752);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onGuiClosed()
|
||||
{
|
||||
super.onGuiClosed();
|
||||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i1, int i2)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.renderEngine.bindTexture(TEXTURE_LORE);
|
||||
int j = (this.width - this.xSize) / 2;
|
||||
int k = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.legacy.aether.client.gui.button;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
|
||||
public class GuiButtonPerks extends GuiButton
|
||||
{
|
||||
|
||||
public GuiButtonPerks(int xPos, int yPos)
|
||||
{
|
||||
super(24, xPos, yPos, 20, 20, "?");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.legacy.aether.client.gui.inventory;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiInventory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.client.gui.button.GuiButtonPerks;
|
||||
import com.legacy.aether.server.containers.ContainerAccessories;
|
||||
import com.legacy.aether.server.player.PlayerAether;
|
||||
import com.legacy.aether.server.player.perks.AetherRankings;
|
||||
|
||||
public class GuiAccessories extends GuiInventory
|
||||
{
|
||||
|
||||
private static final ResourceLocation ACCESSORIES = new ResourceLocation("aether_legacy", "textures/gui/inventory/accessories.png");
|
||||
|
||||
private static final ResourceLocation ACCESSORIES_SHIFTED = new ResourceLocation("aether_legacy", "textures/gui/inventory/accessories_shifted.png");
|
||||
|
||||
PlayerAether playerAether;
|
||||
|
||||
public GuiAccessories(PlayerAether player)
|
||||
{
|
||||
super(player.thePlayer);
|
||||
this.inventorySlots = new ContainerAccessories(player.accessories, player.thePlayer);
|
||||
this.playerAether = player;
|
||||
this.allowUserInput = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
if (AetherRankings.isRankedPlayer(this.playerAether.thePlayer.getUniqueID()) || this.playerAether.isDonator())
|
||||
{
|
||||
this.buttonList.add(new GuiButtonPerks(this.width / 2 - 108, this.height / 2 - 83));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) throws IOException
|
||||
{
|
||||
if (button.id == 24)
|
||||
{
|
||||
this.mc.displayGuiScreen(new GuiAetherPerks());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
|
||||
{
|
||||
GL11.glColor3d(1.0D, 1.0D, 1.0D);
|
||||
|
||||
this.mc.renderEngine.bindTexture(Loader.isModLoaded("inventorytweaks") ? ACCESSORIES_SHIFTED : ACCESSORIES);
|
||||
|
||||
this.drawTexturedModalRect(this.width / 2 - 88, this.height / 2 - 166 / 2, 0, 0, 176, 166);
|
||||
|
||||
drawEntityOnScreen(this.guiLeft + 35, this.guiTop + 75, 30, (float)(this.guiLeft + 51) - (float)mouseX, (float)(this.guiTop + 75 - 50) - (float)mouseY, this.mc.thePlayer);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,289 @@
|
|||
package com.legacy.aether.client.gui.inventory;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.gui.inventory.GuiInventory;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityMoa;
|
||||
import com.legacy.aether.server.entities.util.MoaColor;
|
||||
import com.legacy.aether.server.networking.AetherNetworkingManager;
|
||||
import com.legacy.aether.server.networking.packets.PacketPerkChanged;
|
||||
import com.legacy.aether.server.player.PlayerAether;
|
||||
import com.legacy.aether.server.player.perks.AetherRankings;
|
||||
import com.legacy.aether.server.player.perks.util.DonatorMoaSkin;
|
||||
import com.legacy.aether.server.player.perks.util.EnumAetherPerkType;
|
||||
|
||||
public class GuiAetherPerks extends GuiScreen
|
||||
{
|
||||
|
||||
private boolean enableMoaEditor, enableHaloEditor;
|
||||
|
||||
private PlayerAether player;
|
||||
|
||||
private EntityMoa moa;
|
||||
|
||||
private GuiButton defualtSkin, enableHalo, confirmPreference;
|
||||
|
||||
private GuiTextField moaWingMarking, moaWing, moaBody, moaBodyMarking, moaEye, moaOutside;
|
||||
|
||||
private DonatorMoaSkin moaSkin = new DonatorMoaSkin();
|
||||
|
||||
protected int guiLeft;
|
||||
|
||||
protected int guiTop;
|
||||
|
||||
public GuiAetherPerks()
|
||||
{
|
||||
super();
|
||||
|
||||
this.mc = Minecraft.getMinecraft();
|
||||
this.player = PlayerAether.get(this.mc.thePlayer);
|
||||
this.moaSkin = this.player.donatorMoaSkin;
|
||||
|
||||
this.moa = this.player.thePlayer.getRidingEntity() instanceof EntityMoa ? (EntityMoa) this.player.thePlayer.getRidingEntity() : new EntityMoa(this.mc.theWorld, MoaColor.getColor(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateScreen()
|
||||
{
|
||||
this.moaWingMarking.updateCursorCounter();
|
||||
this.moaWing.updateCursorCounter();
|
||||
this.moaBody.updateCursorCounter();
|
||||
this.moaBodyMarking.updateCursorCounter();
|
||||
this.moaEye.updateCursorCounter();
|
||||
this.moaOutside.updateCursorCounter();
|
||||
|
||||
if (!this.moaWingMarking.getText().isEmpty())
|
||||
{
|
||||
this.moaSkin.setWingMarkingColor(Integer.decode("0x" + this.moaWingMarking.getText()));
|
||||
}
|
||||
|
||||
if (!this.moaWing.getText().isEmpty())
|
||||
{
|
||||
this.moaSkin.setWingColor(Integer.decode("0x" + this.moaWing.getText()));
|
||||
}
|
||||
|
||||
if (!this.moaBody.getText().isEmpty())
|
||||
{
|
||||
this.moaSkin.setBodyColor(Integer.decode("0x" + this.moaBody.getText()));
|
||||
}
|
||||
|
||||
if (!this.moaBodyMarking.getText().isEmpty())
|
||||
{
|
||||
this.moaSkin.setMarkingColor(Integer.decode("0x" + this.moaBodyMarking.getText()));
|
||||
}
|
||||
|
||||
if (!this.moaEye.getText().isEmpty())
|
||||
{
|
||||
this.moaSkin.setEyeColor(Integer.decode("0x" + this.moaEye.getText()));
|
||||
}
|
||||
|
||||
if (!this.moaOutside.getText().isEmpty())
|
||||
{
|
||||
this.moaSkin.setOutsideColor(Integer.decode("0x" + this.moaOutside.getText()));
|
||||
}
|
||||
|
||||
this.moaSkin.shouldUseDefualt(this.defualtSkin.displayString.contains("true"));
|
||||
|
||||
if (!this.enableHaloEditor || !AetherRankings.isRankedPlayer(this.player.thePlayer.getUniqueID()))
|
||||
{
|
||||
this.enableHalo.visible = false;
|
||||
}
|
||||
|
||||
if (!this.enableMoaEditor)
|
||||
{
|
||||
this.defualtSkin.visible = false;
|
||||
this.confirmPreference.visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
Keyboard.enableRepeatEvents(true);
|
||||
|
||||
this.guiLeft = (this.width - 176) / 2;
|
||||
this.guiTop = (this.height - 166) / 2;
|
||||
|
||||
this.buttonList.add(new GuiButton(1, 4, 17, 100, 20, "Moa Customizer"));
|
||||
this.buttonList.add(new GuiButton(5, 110, 17, 100, 20, "Developer Perks"));
|
||||
|
||||
this.buttonList.add(this.enableHalo = new GuiButton(6, this.width / 2 - 50, this.height - 20, 100, 20, "Enable Halo: "));
|
||||
this.buttonList.add(this.defualtSkin = new GuiButton(2, this.width / 2 - 100, this.height - 20, 100, 20, "Default skin: " + this.player.donatorMoaSkin.shouldUseDefualt()));
|
||||
this.buttonList.add(this.confirmPreference = new GuiButton(4, this.width / 2, this.height - 20, 100, 20, "Confirm Skin"));
|
||||
|
||||
this.enableHalo.displayString = this.enableHalo.displayString + Boolean.toString(this.player.shouldRenderHalo ? false : true);
|
||||
|
||||
this.moaEye = new GuiTextField(1, this.fontRendererObj, (this.width / 2) + 105, 70, 45, 20);
|
||||
this.moaEye.setMaxStringLength(6);
|
||||
this.moaEye.setText(Integer.toHexString(this.player.donatorMoaSkin.getEyeColor()));
|
||||
|
||||
this.moaWingMarking = new GuiTextField(5, this.fontRendererObj, (this.width / 2) + 105, this.height - 40, 45, 20);
|
||||
this.moaWingMarking.setMaxStringLength(6);
|
||||
this.moaWingMarking.setText(Integer.toHexString(this.player.donatorMoaSkin.getWingMarkingColor()));
|
||||
|
||||
this.moaWing = new GuiTextField(10, this.fontRendererObj, (this.width / 2) + 105, this.height / 2 + 15, 45, 20);
|
||||
this.moaWing.setMaxStringLength(6);
|
||||
this.moaWing.setText(Integer.toHexString(this.player.donatorMoaSkin.getWingColor()));
|
||||
|
||||
this.moaBody = new GuiTextField(14, this.fontRendererObj, (this.width / 2) - 155, this.height / 2 + 15, 45, 20);
|
||||
this.moaBody.setMaxStringLength(6);
|
||||
this.moaBody.setText(Integer.toHexString(this.player.donatorMoaSkin.getBodyColor()));
|
||||
|
||||
this.moaBodyMarking = new GuiTextField(18, this.fontRendererObj, (this.width / 2) - 155, this.height - 40, 45, 20);
|
||||
this.moaBodyMarking.setMaxStringLength(6);
|
||||
this.moaBodyMarking.setText(Integer.toHexString(this.player.donatorMoaSkin.getMarkingColor()));
|
||||
|
||||
this.moaOutside = new GuiTextField(22, this.fontRendererObj, (this.width / 2) - 155, 70, 45, 20);
|
||||
this.moaOutside.setMaxStringLength(6);
|
||||
this.moaOutside.setText(Integer.toHexString(this.player.donatorMoaSkin.getOutsideColor()));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char typedChar, int keyCode) throws IOException
|
||||
{
|
||||
super.keyTyped(typedChar, keyCode);
|
||||
|
||||
if (this.enableMoaEditor)
|
||||
{
|
||||
if (keyCode > 1 && keyCode < 12 || keyCode == 14 || keyCode == 30 || keyCode == 48 || keyCode == 46 || keyCode == 32 || keyCode == 18 || keyCode == 33)
|
||||
{
|
||||
this.moaWingMarking.textboxKeyTyped(typedChar, keyCode);
|
||||
this.moaWing.textboxKeyTyped(typedChar, keyCode);
|
||||
this.moaBody.textboxKeyTyped(typedChar, keyCode);
|
||||
this.moaBodyMarking.textboxKeyTyped(typedChar, keyCode);
|
||||
this.moaEye.textboxKeyTyped(typedChar, keyCode);
|
||||
this.moaOutside.textboxKeyTyped(typedChar, keyCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException
|
||||
{
|
||||
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
|
||||
if (this.enableMoaEditor)
|
||||
{
|
||||
this.moaWingMarking.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
this.moaWing.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
this.moaBody.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
this.moaBodyMarking.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
this.moaEye.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
this.moaOutside.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGuiClosed()
|
||||
{
|
||||
Keyboard.enableRepeatEvents(false);
|
||||
AetherNetworkingManager.sendToServer(new PacketPerkChanged(this.player.thePlayer.getEntityId(), EnumAetherPerkType.Moa, this.moaSkin));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) throws IOException
|
||||
{
|
||||
if (button.id == 1)
|
||||
{
|
||||
boolean shouldEnable = this.enableMoaEditor ? false : true;
|
||||
|
||||
this.enableMoaEditor = shouldEnable;
|
||||
this.enableHaloEditor = false;
|
||||
this.enableHalo.visible = false;
|
||||
this.confirmPreference.visible = true;
|
||||
this.defualtSkin.visible = true;
|
||||
}
|
||||
else if (button.id == 2)
|
||||
{
|
||||
boolean enableDefualt = this.player.donatorMoaSkin.shouldUseDefualt() ? false : true;
|
||||
|
||||
this.defualtSkin.displayString = "Use Default: " + Boolean.toString(enableDefualt);
|
||||
this.player.donatorMoaSkin.shouldUseDefualt(enableDefualt);
|
||||
}
|
||||
else if (button.id == 4)
|
||||
{
|
||||
AetherNetworkingManager.sendToServer(new PacketPerkChanged(this.player.thePlayer.getEntityId(), EnumAetherPerkType.Moa, this.moaSkin));
|
||||
}
|
||||
else if (button.id == 5)
|
||||
{
|
||||
boolean shouldEnable = this.enableHaloEditor ? false : true;
|
||||
|
||||
this.enableHaloEditor = shouldEnable;
|
||||
this.enableMoaEditor = false;
|
||||
this.enableHalo.visible = true;
|
||||
}
|
||||
else if (button.id == 6)
|
||||
{
|
||||
boolean enableHalo = this.player.shouldRenderHalo ? false : true;
|
||||
|
||||
AetherNetworkingManager.sendToServer(new PacketPerkChanged(this.player.thePlayer.getEntityId(), EnumAetherPerkType.Halo, enableHalo));
|
||||
this.enableHalo.displayString = "Enable Halo: " + Boolean.toString(enableHalo);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
|
||||
this.drawCenteredString(this.fontRendererObj, "Donator Options", 45, 4, 16777215);
|
||||
|
||||
if (this.enableMoaEditor)
|
||||
{
|
||||
GuiInventory.drawEntityOnScreen(this.width / 2, this.height / 2 + (this.height / 2) - 30, (this.height / 3) - 20, (float)(this.guiLeft + 51) - (float)mouseX, (float)(75 - 50) - (float)mouseY, this.moa);
|
||||
|
||||
/* Left Side*/
|
||||
|
||||
this.drawString(this.fontRendererObj, "Leg/Beak Color", (this.width / 2) - 170, 55, 16777215);
|
||||
|
||||
this.drawString(this.fontRendererObj, "Body Color", (this.width / 2) - 160, this.height / 2, 16777215);
|
||||
|
||||
this.drawString(this.fontRendererObj, "Body Marking Color", (this.width / 2) - 180, this.height - 55, 16777215);
|
||||
|
||||
/* Right Side */
|
||||
|
||||
this.drawString(this.fontRendererObj, "Eye Color", (this.width / 2) + 104, 55, 16777215);
|
||||
|
||||
this.drawString(this.fontRendererObj, "Wing Color", (this.width / 2) + 102, this.height / 2, 16777215);
|
||||
|
||||
this.drawString(this.fontRendererObj, "Wing Marking Color", (this.width / 2) + 82, this.height - 55, 16777215);
|
||||
|
||||
this.moaWingMarking.drawTextBox();
|
||||
this.moaWing.drawTextBox();
|
||||
this.moaBody.drawTextBox();
|
||||
this.moaBodyMarking.drawTextBox();
|
||||
this.moaEye.drawTextBox();
|
||||
this.moaOutside.drawTextBox();
|
||||
}
|
||||
|
||||
if (this.enableHaloEditor)
|
||||
{
|
||||
GuiInventory.drawEntityOnScreen(this.width / 2, this.height / 2 + (this.height / 2) - 30, (this.height / 3) - 20, (float)(this.guiLeft + 51) - (float)mouseX, (float)(75 - 50) - (float)mouseY, this.player.thePlayer);
|
||||
}
|
||||
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawWorldBackground(int tint)
|
||||
{
|
||||
this.drawGradientRect(0, 0, this.width, 50, -1072689136, -804253680);
|
||||
|
||||
if (this.mc.theWorld != null)
|
||||
{
|
||||
this.drawGradientRect(0, 0, this.width, this.height, -1072689136, -804253680);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drawBackground(tint);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
package com.legacy.aether.client.gui.trivia;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class AetherTrivia
|
||||
{
|
||||
|
||||
private static Random random = new Random();
|
||||
|
||||
public static final List<String> trivia = Arrays.asList(new String[] {
|
||||
"Placing a saddle on Flying Pigs makes them a mount.",
|
||||
"Moa Eggs can be incubated into Baby Moas with the Incubator.",
|
||||
"Gravitite Ore can be enchanted into Enchanted Gravitite.",
|
||||
"Enchanted Gravitite only floats up when powered.",
|
||||
"Enchanted Gravitite can be crafted into armour and tools.",
|
||||
"Gravitite Armour grants you higher jumps and no fall damage.",
|
||||
"Gravitite Tools can levitate blocks when right-clicking.",
|
||||
"Baby Moas will stay put when right clicking them with a nature staff.",
|
||||
"Golden Oak trees yeild valuable Golden Amber in their logs.",
|
||||
"Enchanters can repair damaged items and enhance existing items.",
|
||||
"Skyroot tools gain double drops from blocks.",
|
||||
"Place water into a Glowstone frame for a Hostile Paradise.",
|
||||
"The Champs and Champettes are pretty baller.",
|
||||
"Zanite Tools gain strength the more they are used.",
|
||||
"Ambrosium Shards are great for fueling Enchanters and food.",
|
||||
"Icestone freezes water into ice and lava into obsidian.",
|
||||
"Some dungeons in the Aether contain chests which are Mimics.",
|
||||
"White Aerclouds prevent fall damage when landed upon.",
|
||||
"Blue Aerclouds are bouncy, and launch mobs very high in the air.",
|
||||
"Cloud Parachutes can be crafted with four White Aercloud blocks.",
|
||||
"Parachutes auto-activate when falling off an island.",
|
||||
"Golden Parachutes have twenty uses rather than one.",
|
||||
"The leaves of Golden Oak trees occasionally drop Golden Apples.",
|
||||
"Aerogel acts as an explosion-resistant, transparent block.",
|
||||
"Quicksoil increases the speed of walking mobs and sliding items.",
|
||||
"Holystone tools occasionally generate Ambrosium.",
|
||||
"Dungeons can contain extremely powerful and unique rewards.",
|
||||
"Dungeons have various difficulties: from Bronze, Silver, to Gold.",
|
||||
"Normal music disks can be enchanted into a Blue version.",
|
||||
"You can harvest Aechor Plant's poison with Skyroot Buckets.",
|
||||
"Golden, Poison, and Enchanted Darts are not affected by gravity.",
|
||||
"Dart Shooters can be crafted with Skyroot Logs and Zanite Gemstones.",
|
||||
"A Remedy Bucket for poison can be obtained by enchanting Poison.",
|
||||
"Gravitite Armour increases your jump-height when a full set is worn.",
|
||||
"Try submerging yourself in water while wearing Phoenix Armour.",
|
||||
"Zephyrs shoot snowballs with a force that can throw you off islands.",
|
||||
"Days in the Aether realm last three times longer than surface days.",
|
||||
"Sheepuff occasionally puff their wool out, making them float.",
|
||||
"When Valkyrie's are defeated they will drop a Victory Medal.",
|
||||
"Skeletons won't shoot if they can't see your face.",
|
||||
"Never dig straight down.",
|
||||
"If a drop looks too big, it probably is.",
|
||||
"A shelter made of dirt is still a shelter.",
|
||||
"Don't fear the Creeper.",
|
||||
"Before you jump, make sure the water isn't too shallow.",
|
||||
"Watch your back when running from spiders.",
|
||||
"Don't leave your house without closing the door.",
|
||||
"Check underneath a Diamond Ore block before mining it.",
|
||||
"Watch where you step - deep shafts can be anywhere.",
|
||||
"Cliff overhangs and lighting glitches can spawn hostile mobs.",
|
||||
"Gold may be weak, but it's better than nothing.",
|
||||
"Always bring tons of logs with you when exploring caves.",
|
||||
"Always check your surroundings before entering a fight.",
|
||||
"Don't store spare TNT blocks near your Redstone circuits.",
|
||||
"You can always come back later and mine some more.",
|
||||
"Unlike the other tools, the hoe is used by right-clicking.",
|
||||
"Always keep a spare stack of blocks in your active inventory.",
|
||||
"Raw meat is better than no meat.",
|
||||
"Blocks can be mined faster if you time your clicks correctly.",
|
||||
"Placing a torch under sand as it falls speeds up the process.",
|
||||
"Animals push you around if you leave the game idle (again).",
|
||||
"Ghasts have lower health than any other hostile mob.",
|
||||
"You can reflect a Ghast's fireball by simply hitting it.",
|
||||
"Mobs might not drop loot if they die from explosions.",
|
||||
"Don't take huge risks far from home.",
|
||||
"If you hear a cave noise above ground, there's one nearby.",
|
||||
"If you hear a lot of monsters, it's probably a dungeon.",
|
||||
"Mining cave ceilings can easily lead to disaster.",
|
||||
"Catching on fire can easily drain an entire health bar.",
|
||||
"The best time to do anything is before it's too late.",
|
||||
"One boat is never enough...unless you're using the combat update.",
|
||||
"Wood is the most versatile resource in the game.",
|
||||
"Never expect that nothing will happen while you're gone.",
|
||||
"Always treat modders with respect.",
|
||||
"Baby slimes are terribly vulnerable to fall damage.",
|
||||
"Slimes do exist... I think.",
|
||||
"Only give away your personal information to Paypal.",
|
||||
"The sun and the compass are both useful for directions.",
|
||||
"Paintings aren't considered to be blocks.",
|
||||
"Sand on red dust on TNT can make a falling floor trap.",
|
||||
"Easier rarely means funner.",
|
||||
"Zombies can reach pretty far and hit pretty hard.",
|
||||
"Arrows reflect off of creatures recently damaged.",
|
||||
"Be careful not to misclick when building portals.",
|
||||
"Sand is useful for getting down from high places.",
|
||||
"If all you can hear is footsteps, it's a Creeper.",
|
||||
"It's misleading to locate monsters by sound alone.",
|
||||
"Spider jockeys will dismount after a save and reload.",
|
||||
"The game is only as fun as you make it.",
|
||||
});
|
||||
|
||||
public static String getNewTrivia()
|
||||
{
|
||||
int i = random.nextInt(trivia.size());
|
||||
return "Pro Tip: "+trivia.get(i);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package com.legacy.aether.client.models;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityArmorStand;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.legacy.aether.server.items.armor.ItemAetherArmor;
|
||||
|
||||
public class ModelColoredArmor extends ModelBiped
|
||||
{
|
||||
private Item item;
|
||||
|
||||
private EntityEquipmentSlot armorType;
|
||||
|
||||
public ModelColoredArmor(float size, Item item, EntityEquipmentSlot armorSlot)
|
||||
{
|
||||
super(size);
|
||||
this.item = item;
|
||||
this.armorType = armorSlot;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
if (!(entity instanceof EntityArmorStand))
|
||||
{
|
||||
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entity);
|
||||
}
|
||||
|
||||
if (entity instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer)entity;
|
||||
|
||||
if (player.isSneaking())
|
||||
{
|
||||
GlStateManager.translate(0, 0.20F, 0);
|
||||
}
|
||||
}
|
||||
|
||||
this.isSneak = entity.isSneaking();
|
||||
|
||||
int color = ((ItemAetherArmor)this.item).getColorFromItemStack(new ItemStack(this.item), 0);
|
||||
float red = ((color >> 16) & 0xff) / 255F;
|
||||
float green = ((color >> 8) & 0xff) / 255F;
|
||||
float blue = (color & 0xff) / 255F;
|
||||
|
||||
GlStateManager.color(red, green, blue);
|
||||
|
||||
if (this.armorType == EntityEquipmentSlot.HEAD)
|
||||
{
|
||||
this.bipedHeadwear.render(scale);
|
||||
this.bipedHead.render(scale);
|
||||
}
|
||||
else if (this.armorType == EntityEquipmentSlot.CHEST)
|
||||
{
|
||||
this.bipedBody.render(scale);
|
||||
this.bipedRightArm.render(scale);
|
||||
this.bipedLeftArm.render(scale);
|
||||
}
|
||||
else if (this.armorType == EntityEquipmentSlot.LEGS)
|
||||
{
|
||||
this.bipedBody.render(scale);
|
||||
this.bipedRightLeg.render(scale);
|
||||
this.bipedLeftLeg.render(scale);
|
||||
}
|
||||
else if (this.armorType == EntityEquipmentSlot.FEET)
|
||||
{
|
||||
this.bipedRightLeg.render(scale);
|
||||
this.bipedLeftLeg.render(scale);
|
||||
}
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
package com.legacy.aether.client.models.attachments;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelAetherWings extends ModelBiped
|
||||
{
|
||||
|
||||
public ModelRenderer wingLeft;
|
||||
|
||||
public ModelRenderer wingRight;
|
||||
|
||||
public float sinage;
|
||||
|
||||
public boolean gonRound;
|
||||
|
||||
public ModelAetherWings()
|
||||
{
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public ModelAetherWings(float f)
|
||||
{
|
||||
this(f, 0.0F);
|
||||
}
|
||||
|
||||
public ModelAetherWings(float f, float f1)
|
||||
{
|
||||
this.leftArmPose = ModelBiped.ArmPose.EMPTY;
|
||||
this.rightArmPose = ModelBiped.ArmPose.EMPTY;
|
||||
this.isSneak = false;
|
||||
|
||||
this.wingLeft = new ModelRenderer(this, 24, 31);
|
||||
this.wingLeft.addBox(0F, -7F, 1F, 20, 8, 0, f);
|
||||
this.wingLeft.setRotationPoint(0.5F, 5F + f1, 2.625F);
|
||||
|
||||
this.wingRight = new ModelRenderer(this, 24, 31);
|
||||
this.wingRight.mirror = true;
|
||||
this.wingRight.addBox(-19F, -7F, 1F, 20, 8, 0, f);
|
||||
this.wingRight.setRotationPoint(-0.5F, 5F + f1, 2.625F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity e, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, e);
|
||||
|
||||
this.wingLeft.renderWithRotation(f5);
|
||||
this.wingRight.renderWithRotation(f5);
|
||||
}
|
||||
|
||||
public void setWingSinage(float sinage)
|
||||
{
|
||||
this.sinage = sinage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
this.gonRound = entity.onGround;
|
||||
|
||||
this.wingLeft.rotateAngleY = -0.4F;
|
||||
this.wingRight.rotateAngleY = 0.4F;
|
||||
this.wingLeft.rotateAngleZ = -0.125F;
|
||||
this.wingRight.rotateAngleZ = 0.125F;
|
||||
|
||||
if (entity.isSneaking())
|
||||
{
|
||||
this.wingLeft.rotateAngleX = 0.45F;
|
||||
this.wingRight.rotateAngleX = 0.45F;
|
||||
this.wingLeft.offsetY = -0.17F;
|
||||
this.wingRight.offsetY = -0.17F;
|
||||
this.wingLeft.offsetZ = 0.112F;
|
||||
this.wingRight.offsetZ = 0.112F;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.wingLeft.rotateAngleX = this.wingLeft.offsetZ = this.wingLeft.offsetY =
|
||||
this.wingRight.rotateAngleX = this.wingRight.offsetZ = this.wingRight.offsetY = 0.0F;
|
||||
}
|
||||
|
||||
this.wingLeft.rotateAngleY += Math.sin(this.sinage) / 6F;
|
||||
this.wingRight.rotateAngleY -= Math.sin(this.sinage) / 6F;
|
||||
this.wingLeft.rotateAngleZ += Math.cos(this.sinage) / (this.gonRound ? 8F : 3F);
|
||||
this.wingRight.rotateAngleZ -= Math.cos(this.sinage) / (this.gonRound ? 8F : 3F);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.legacy.aether.client.models.attachments;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
public class ModelHalo extends ModelBase
|
||||
{
|
||||
|
||||
public ModelRenderer halo1, halo2, halo3, halo4;
|
||||
|
||||
public ModelHalo()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
halo1 = new ModelRenderer(this, 0, 0);
|
||||
halo1.addBox(-3F, 0F, -2F, 1, 1, 4);
|
||||
halo1.setTextureSize(64, 32);
|
||||
halo1.setRotationPoint(0.0F, 0F, 0F);
|
||||
halo2 = new ModelRenderer(this, 0, 0);
|
||||
halo2.addBox(2F, 0F, -2F, 1, 1, 4);
|
||||
halo2.setTextureSize(64, 32);
|
||||
halo3 = new ModelRenderer(this, 0, 0);
|
||||
halo3.addBox(-2F, 0F, 2F, 4, 1, 1);
|
||||
halo3.setTextureSize(64, 32);
|
||||
halo4 = new ModelRenderer(this, 0, 0);
|
||||
halo4.addBox(-2F, 0F, -3F, 4, 1, 1);
|
||||
halo4.setTextureSize(64, 32);
|
||||
halo4.setRotationPoint(0.0F, 0F, 0.0F);
|
||||
}
|
||||
|
||||
public void renderHalo(ModelRenderer renderer, float scale)
|
||||
{
|
||||
copyModelAngles(this.halo1, renderer);
|
||||
copyModelAngles(this.halo2, renderer);
|
||||
copyModelAngles(this.halo3, renderer);
|
||||
copyModelAngles(this.halo4, renderer);
|
||||
|
||||
this.halo1.render(scale);
|
||||
this.halo2.render(scale);
|
||||
this.halo3.render(scale);
|
||||
this.halo4.render(scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
boolean flag = entityIn instanceof EntityLivingBase && ((EntityLivingBase)entityIn).getTicksElytraFlying() > 4;
|
||||
|
||||
if (flag)
|
||||
{
|
||||
this.halo1.rotateAngleX = -((float)Math.PI / 4F);
|
||||
this.halo2.rotateAngleX = -((float)Math.PI / 4F);
|
||||
this.halo3.rotateAngleX = -((float)Math.PI / 4F);
|
||||
this.halo4.rotateAngleX = -((float)Math.PI / 4F);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.halo1.rotateAngleX = headPitch * 0.017453292F;
|
||||
this.halo2.rotateAngleX = headPitch * 0.017453292F;
|
||||
this.halo3.rotateAngleX = headPitch * 0.017453292F;
|
||||
this.halo4.rotateAngleX = headPitch * 0.017453292F;
|
||||
}
|
||||
|
||||
if (entityIn.isSneaking())
|
||||
{
|
||||
this.halo1.rotationPointY = 1.0F;
|
||||
this.halo2.rotationPointY = 1.0F;
|
||||
this.halo3.rotationPointY = 1.0F;
|
||||
this.halo4.rotationPointY = 1.0F;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.halo1.rotationPointY = 0.0F;
|
||||
this.halo2.rotationPointY = 0.0F;
|
||||
this.halo3.rotationPointY = 0.0F;
|
||||
this.halo4.rotationPointY = 0.0F;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,188 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class AechorPlantModel extends ModelBase
|
||||
{
|
||||
|
||||
private ModelRenderer petal[];
|
||||
|
||||
private ModelRenderer leaf[];
|
||||
|
||||
private ModelRenderer stamen[];
|
||||
|
||||
private ModelRenderer stamen2[];
|
||||
|
||||
private ModelRenderer thorn[];
|
||||
|
||||
private ModelRenderer stem;
|
||||
|
||||
private ModelRenderer head;
|
||||
|
||||
public float sinage;
|
||||
|
||||
public float sinage2;
|
||||
|
||||
public float size;
|
||||
|
||||
public AechorPlantModel()
|
||||
{
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public AechorPlantModel(float modelSize)
|
||||
{
|
||||
this(modelSize, 0.0F);
|
||||
}
|
||||
|
||||
public AechorPlantModel(float modelSize, float rotationPointY)
|
||||
{
|
||||
this.size = 1.0F;
|
||||
|
||||
this.petal = new ModelRenderer[10];
|
||||
this.leaf = new ModelRenderer[10];
|
||||
this.stamen = new ModelRenderer[3];
|
||||
this.stamen2 = new ModelRenderer[3];
|
||||
this.thorn = new ModelRenderer[4];
|
||||
|
||||
for(int i = 0; i < 10; i++)
|
||||
{
|
||||
this.petal[i] = new ModelRenderer(this, 0, 0);
|
||||
|
||||
if(i % 2 == 0)
|
||||
{
|
||||
this.petal[i] = new ModelRenderer(this, 29, 3);
|
||||
this.petal[i].addBox(-4F, -1F, -12F, 8, 1, 9, modelSize - 0.25F);
|
||||
this.petal[i].setRotationPoint(0.0F, 1.0F + rotationPointY, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.petal[i].addBox(-4F, -1F, -13F, 8, 1, 10, modelSize - 0.125F);
|
||||
this.petal[i].setRotationPoint(0.0F, 1.0F + rotationPointY, 0.0F);
|
||||
}
|
||||
|
||||
this.leaf[i] = new ModelRenderer(this, 38, 13);
|
||||
this.leaf[i].addBox(-2F, -1F, -9.5F, 4, 1, 8, modelSize - 0.15F);
|
||||
this.leaf[i].setRotationPoint(0.0F, 1.0F + rotationPointY, 0.0F);
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
this.stamen[i] = new ModelRenderer(this, 36, 13);
|
||||
this.stamen[i].addBox(0F, -9F, -1.5F, 1, 6, 1, modelSize - 0.25F);
|
||||
this.stamen[i].setRotationPoint(0.0F, 1.0F + rotationPointY, 0.0F);
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
this.stamen2[i] = new ModelRenderer(this, 32, 15);
|
||||
this.stamen2[i].addBox(0F, -10F, -1.5F, 1, 1, 1, modelSize + 0.125F);
|
||||
this.stamen2[i].setRotationPoint(0.0F, 1.0F + rotationPointY, 0.0F);
|
||||
}
|
||||
|
||||
this.head = new ModelRenderer(this, 0, 12);
|
||||
this.head.addBox(-3F, -3F, -3F, 6, 2, 6, modelSize + 0.75F);
|
||||
this.head.setRotationPoint(0.0F, 1.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.stem = new ModelRenderer(this, 24, 13);
|
||||
this.stem.addBox(-1F, 0F, -1F, 2, 6, 2, modelSize);
|
||||
this.stem.setRotationPoint(0.0F, 1.0F + rotationPointY, 0.0F);
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
this.thorn[i] = new ModelRenderer(this, 32, 13);
|
||||
this.thorn[i].setRotationPoint(0.0F, 1.0F + rotationPointY, 0.0F);
|
||||
}
|
||||
|
||||
this.thorn[0].addBox(-1.75F, 1.25F, -1F, 1, 1, 1, modelSize - 0.25F);
|
||||
this.thorn[1].addBox(-1F, 2.25F, 0.75F, 1, 1, 1, modelSize - 0.25F);
|
||||
this.thorn[2].addBox(0.75F, 1.25F, 0F, 1, 1, 1, modelSize - 0.25F);
|
||||
this.thorn[3].addBox(0F, 2.25F, -1.75F, 1, 1, 1, modelSize - 0.25F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.0F, 1.2F, 0.0F);
|
||||
GlStateManager.scale(this.size, this.size, this.size);
|
||||
|
||||
for(int i = 0; i < 10; i++)
|
||||
{
|
||||
this.petal[i].render(scale);
|
||||
this.leaf[i].render(scale);
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
this.stamen[i].render(scale);
|
||||
this.stamen2[i].render(scale);
|
||||
}
|
||||
|
||||
this.head.render(scale);
|
||||
this.stem.render(scale);
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
this.thorn[i].render(scale);
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
this.head.rotateAngleX = 0.0F;
|
||||
this.head.rotateAngleY = headPitch / 57.29578F;
|
||||
|
||||
float boff = this.sinage2;
|
||||
|
||||
this.stem.rotateAngleY = head.rotateAngleY;
|
||||
this.stem.rotationPointY = boff * 0.5F;
|
||||
|
||||
for(int i = 0; i < 10; i++)
|
||||
{
|
||||
if (i < 3)
|
||||
{
|
||||
this.stamen[i].rotateAngleX = 0.2F + ((float)i / 15F);
|
||||
this.stamen[i].rotateAngleY = head.rotateAngleY + 0.1F;
|
||||
this.stamen[i].rotateAngleY += ((Math.PI * 2) / (float)3) * (float)i;
|
||||
this.stamen[i].rotateAngleX += sinage * 0.4F;
|
||||
|
||||
this.stamen2[i].rotateAngleX = 0.2F + ((float)i / 15F);
|
||||
this.stamen2[i].rotateAngleY = head.rotateAngleY + 0.1F;
|
||||
this.stamen2[i].rotateAngleY += ((Math.PI * 2) / (float)3) * (float)i;
|
||||
this.stamen2[i].rotateAngleX += sinage * 0.4F;
|
||||
|
||||
this.stamen[i].rotationPointY = boff + ((sinage) * 2F);
|
||||
this.stamen2[i].rotationPointY = boff + ((sinage) * 2F);
|
||||
}
|
||||
|
||||
if (i < 4)
|
||||
{
|
||||
this.thorn[i].rotateAngleY = head.rotateAngleY;
|
||||
this.thorn[i].rotationPointY = boff * 0.5F;
|
||||
}
|
||||
|
||||
this.petal[i].rotateAngleX = ((i % 2 == 0) ? -0.25F : -0.4125F);
|
||||
this.petal[i].rotateAngleX += sinage;
|
||||
this.petal[i].rotateAngleY = head.rotateAngleY;
|
||||
this.petal[i].rotateAngleY += ((Math.PI * 2) / (float)10) * (float)i;
|
||||
|
||||
this.leaf[i].rotateAngleX = ((i % 2 == 0) ? 0.1F : 0.2F);
|
||||
this.leaf[i].rotateAngleX += sinage * 0.75F;
|
||||
this.leaf[i].rotateAngleY = (float) (head.rotateAngleY + ((Math.PI * 2) / (float)10 / 2F));
|
||||
this.leaf[i].rotateAngleY += ((Math.PI * 2) / (float)10) * (float)i;
|
||||
|
||||
this.petal[i].rotationPointY = boff;
|
||||
this.leaf[i].rotationPointY = boff;
|
||||
}
|
||||
|
||||
this.head.rotationPointY = boff + ((sinage) * 2F);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,140 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class AerbunnyModel extends ModelBase
|
||||
{
|
||||
|
||||
public ModelRenderer a;
|
||||
public ModelRenderer b;
|
||||
public ModelRenderer b2;
|
||||
public ModelRenderer b3;
|
||||
public ModelRenderer e1;
|
||||
public ModelRenderer e2;
|
||||
public ModelRenderer ff1;
|
||||
public ModelRenderer ff2;
|
||||
public ModelRenderer g;
|
||||
public ModelRenderer g2;
|
||||
public ModelRenderer h;
|
||||
public ModelRenderer h2;
|
||||
public float puffiness;
|
||||
|
||||
public AerbunnyModel()
|
||||
{
|
||||
byte byte0 = 16;
|
||||
this.a = new ModelRenderer(this, 0, 0);
|
||||
this.a.addBox(-2.0F, -1.0F, -4.0F, 4, 4, 6, 0.0F);
|
||||
this.a.setRotationPoint(0.0F, (float)(-1 + byte0), -4.0F);
|
||||
this.g = new ModelRenderer(this, 14, 0);
|
||||
this.g.addBox(-2.0F, -5.0F, -3.0F, 1, 4, 2, 0.0F);
|
||||
this.g.setRotationPoint(0.0F, (float)(-1 + byte0), -4.0F);
|
||||
this.g2 = new ModelRenderer(this, 14, 0);
|
||||
this.g2.addBox(1.0F, -5.0F, -3.0F, 1, 4, 2, 0.0F);
|
||||
this.g2.setRotationPoint(0.0F, (float)(-1 + byte0), -4.0F);
|
||||
this.h = new ModelRenderer(this, 20, 0);
|
||||
this.h.addBox(-4.0F, 0.0F, -3.0F, 2, 3, 2, 0.0F);
|
||||
this.h.setRotationPoint(0.0F, (float)(-1 + byte0), -4.0F);
|
||||
this.h2 = new ModelRenderer(this, 20, 0);
|
||||
this.h2.addBox(2.0F, 0.0F, -3.0F, 2, 3, 2, 0.0F);
|
||||
this.h2.setRotationPoint(0.0F, (float)(-1 + byte0), -4.0F);
|
||||
this.b = new ModelRenderer(this, 0, 10);
|
||||
this.b.addBox(-3.0F, -4.0F, -3.0F, 6, 8, 6, 0.0F);
|
||||
this.b.setRotationPoint(0.0F, (float)(0 + byte0), 0.0F);
|
||||
this.b2 = new ModelRenderer(this, 0, 24);
|
||||
this.b2.addBox(-2.0F, 4.0F, -2.0F, 4, 3, 4, 0.0F);
|
||||
this.b2.setRotationPoint(0.0F, (float)(0 + byte0), 0.0F);
|
||||
this.b3 = new ModelRenderer(this, 29, 0);
|
||||
this.b3.addBox(-3.5F, -3.5F, -3.5F, 7, 7, 7, 0.0F);
|
||||
this.b3.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.e1 = new ModelRenderer(this, 24, 16);
|
||||
this.e1.addBox(-2.0F, 0.0F, -1.0F, 2, 2, 2);
|
||||
this.e1.setRotationPoint(3.0F, (float)(3 + byte0), -3.0F);
|
||||
this.e2 = new ModelRenderer(this, 24, 16);
|
||||
this.e2.addBox(0.0F, 0.0F, -1.0F, 2, 2, 2);
|
||||
this.e2.setRotationPoint(-3.0F, (float)(3 + byte0), -3.0F);
|
||||
this.ff1 = new ModelRenderer(this, 16, 24);
|
||||
this.ff1.addBox(-2.0F, 0.0F, -4.0F, 2, 2, 4);
|
||||
this.ff1.setRotationPoint(3.0F, (float)(3 + byte0), 4.0F);
|
||||
this.ff2 = new ModelRenderer(this, 16, 24);
|
||||
this.ff2.addBox(0.0F, 0.0F, -4.0F, 2, 2, 4);
|
||||
this.ff2.setRotationPoint(-3.0F, (float)(3 + byte0), 4.0F);
|
||||
}
|
||||
|
||||
public void render(Entity e, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
float a;
|
||||
|
||||
if (this.isChild)
|
||||
{
|
||||
a = 2.0F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, f5, f5);
|
||||
this.a.render(f5);
|
||||
this.g.render(f5);
|
||||
this.g2.render(f5);
|
||||
this.h.render(f5);
|
||||
this.h2.render(f5);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glScalef(1.0F / a, 1.0F / a, 1.0F / a);
|
||||
GL11.glTranslatef(0.0F, 18.0F * f5, 0.0F);
|
||||
this.b.render(f5);
|
||||
this.b2.render(f5);
|
||||
this.e1.render(f5);
|
||||
this.e2.render(f5);
|
||||
this.ff1.render(f5);
|
||||
this.ff2.render(f5);
|
||||
float a1 = 1.0F + this.puffiness * 0.5F;
|
||||
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
GL11.glScalef(a1, a1, a1);
|
||||
this.b3.render(f5);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.a.render(f5);
|
||||
this.g.render(f5);
|
||||
this.g2.render(f5);
|
||||
this.h.render(f5);
|
||||
this.h2.render(f5);
|
||||
this.b.render(f5);
|
||||
this.b2.render(f5);
|
||||
GL11.glPushMatrix();
|
||||
a = 1.0F + this.puffiness * 0.5F;
|
||||
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
GL11.glScalef(a, a, a);
|
||||
this.b3.render(f5);
|
||||
GL11.glPopMatrix();
|
||||
this.e1.render(f5);
|
||||
this.e2.render(f5);
|
||||
this.ff1.render(f5);
|
||||
this.ff2.render(f5);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
this.a.rotateAngleX = -(f4 / (180F / (float)Math.PI));
|
||||
this.a.rotateAngleY = f3 / (180F / (float)Math.PI);
|
||||
this.g.rotateAngleX = this.a.rotateAngleX;
|
||||
this.g.rotateAngleY = this.a.rotateAngleY;
|
||||
this.g2.rotateAngleX = this.a.rotateAngleX;
|
||||
this.g2.rotateAngleY = this.a.rotateAngleY;
|
||||
this.h.rotateAngleX = this.a.rotateAngleX;
|
||||
this.h.rotateAngleY = this.a.rotateAngleY;
|
||||
this.h2.rotateAngleX = this.a.rotateAngleX;
|
||||
this.h2.rotateAngleY = this.a.rotateAngleY;
|
||||
this.b.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.b2.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.b3.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.e1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.0F * f1;
|
||||
this.ff1.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.2F * f1;
|
||||
this.e2.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.0F * f1;
|
||||
this.ff2.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.2F * f1;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,130 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class AerwhaleModel extends ModelBase
|
||||
{
|
||||
|
||||
public ModelRenderer FrontBody;
|
||||
public ModelRenderer RightFin;
|
||||
public ModelRenderer BottomPartHead;
|
||||
public ModelRenderer LeftFin;
|
||||
public ModelRenderer BottomPartMiddlebody;
|
||||
public ModelRenderer Head;
|
||||
public ModelRenderer MiddleFin;
|
||||
public ModelRenderer BackfinRight;
|
||||
public ModelRenderer BackBody;
|
||||
public ModelRenderer BackfinLeft;
|
||||
public ModelRenderer Middlebody;
|
||||
|
||||
public AerwhaleModel()
|
||||
{
|
||||
this.textureWidth = 512;
|
||||
this.textureHeight = 64;
|
||||
|
||||
this.FrontBody = new ModelRenderer(this, 0, 0);
|
||||
this.FrontBody.addBox(-11.5F, -1.0F, -0.5F, 19, 5, 21);
|
||||
this.FrontBody.setRotationPoint(2.0F, 6.0F, 38.0F);
|
||||
this.FrontBody.setTextureSize(512, 64);
|
||||
this.FrontBody.mirror = true;
|
||||
this.setRotation(this.FrontBody, -0.1047198F, 0.0F, 0.0F);
|
||||
|
||||
this.RightFin = new ModelRenderer(this, 446, 1);
|
||||
this.RightFin.addBox(-20.0F, -2.0F, -6.0F, 19, 3, 14);
|
||||
this.RightFin.setRotationPoint(-10.0F, 4.0F, 10.0F);
|
||||
this.RightFin.setTextureSize(512, 64);
|
||||
this.RightFin.mirror = true;
|
||||
this.setRotation(this.RightFin, -0.148353F, 0.2094395F, 0.0F);
|
||||
this.RightFin.mirror = false;
|
||||
|
||||
this.BottomPartHead = new ModelRenderer(this, 116, 28);
|
||||
this.BottomPartHead.addBox(-13.0F, 4.0F, -15.0F, 26, 6, 30);
|
||||
this.BottomPartHead.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.BottomPartHead.setTextureSize(512, 64);
|
||||
this.BottomPartHead.mirror = true;
|
||||
this.setRotation(this.BottomPartHead, 0.0F, 0.0F, 0.0F);
|
||||
|
||||
this.LeftFin = new ModelRenderer(this, 446, 1);
|
||||
this.LeftFin.addBox(1.0F, -2.0F, -6.0F, 19, 3, 14);
|
||||
this.LeftFin.setRotationPoint(10.0F, 4.0F, 10.0F);
|
||||
this.LeftFin.setTextureSize(512, 64);
|
||||
this.LeftFin.mirror = true;
|
||||
this.setRotation(this.LeftFin, -0.148353F, -0.2094395F, 0.0F);
|
||||
|
||||
this.BottomPartMiddlebody = new ModelRenderer(this, 16, 32);
|
||||
this.BottomPartMiddlebody.addBox(-12.0F, 5.0F, -1.0F, 24, 6, 26);
|
||||
this.BottomPartMiddlebody.setRotationPoint(0.0F, -1.0F, 14.0F);
|
||||
this.BottomPartMiddlebody.setTextureSize(512, 64);
|
||||
this.BottomPartMiddlebody.mirror = true;
|
||||
this.setRotation(this.BottomPartMiddlebody, 0.0F, 0.0F, 0.0F);
|
||||
|
||||
this.Head = new ModelRenderer(this, 408, 18);
|
||||
this.Head.addBox(-12.0F, -9.0F, -14.0F, 24, 18, 28);
|
||||
this.Head.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.Head.setTextureSize(512, 64);
|
||||
this.Head.mirror = true;
|
||||
this.setRotation(this.Head, 0.0F, 0.0F, 0.0F);
|
||||
|
||||
this.MiddleFin = new ModelRenderer(this, 318, 35);
|
||||
this.MiddleFin.addBox(-1.0F, -11.0F, 7.0F, 2, 7, 8);
|
||||
this.MiddleFin.setRotationPoint(0.0F, -1.0F, 14.0F);
|
||||
this.MiddleFin.setTextureSize(512, 64);
|
||||
this.MiddleFin.mirror = true;
|
||||
this.setRotation(this.MiddleFin, -0.1441704F, 0.0F, 0.0F);
|
||||
|
||||
this.BackfinRight = new ModelRenderer(this, 261, 5);
|
||||
this.BackfinRight.addBox(-11.0F, 0.0F, -6.0F, 15, 3, 24);
|
||||
this.BackfinRight.setRotationPoint(-4.0F, 5.0F, 59.0F);
|
||||
this.BackfinRight.setTextureSize(512, 64);
|
||||
this.BackfinRight.mirror = true;
|
||||
this.setRotation(this.BackfinRight, -0.1047198F, -0.7330383F, 0.0F);
|
||||
this.BackfinRight.mirror = false;
|
||||
|
||||
this.BackBody = new ModelRenderer(this, 228, 32);
|
||||
this.BackBody.addBox(-10.5F, -9.0F, -2.0F, 17, 10, 22);
|
||||
this.BackBody.setRotationPoint(2.0F, 5.0F, 38.0F);
|
||||
this.BackBody.setTextureSize(512, 64);
|
||||
this.BackBody.mirror = true;
|
||||
this.setRotation(this.BackBody, -0.1047198F, 0.0F, 0.0F);
|
||||
|
||||
this.BackfinLeft = new ModelRenderer(this, 261, 5);
|
||||
this.BackfinLeft.addBox(-4.0F, 0.0F, -6.0F, 13, 3, 24);
|
||||
this.BackfinLeft.setRotationPoint(5.0F, 5.0F, 59.0F);
|
||||
this.BackfinLeft.setTextureSize(512, 64);
|
||||
this.BackfinLeft.mirror = true;
|
||||
this.setRotation(this.BackfinLeft, -0.1047198F, 0.7330383F, 0.0F);
|
||||
|
||||
this.Middlebody = new ModelRenderer(this, 314, 25);
|
||||
this.Middlebody.addBox(-11.0F, -5.0F, -1.0F, 22, 14, 25);
|
||||
this.Middlebody.setRotationPoint(0.0F, -1.0F, 14.0F);
|
||||
this.Middlebody.setTextureSize(512, 64);
|
||||
this.Middlebody.mirror = true;
|
||||
this.setRotation(this.Middlebody, -0.0698132F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
this.FrontBody.render(scale);
|
||||
this.RightFin.render(scale);
|
||||
this.BottomPartHead.render(scale);
|
||||
this.LeftFin.render(scale);
|
||||
this.BottomPartMiddlebody.render(scale);
|
||||
this.Head.render(scale);
|
||||
this.MiddleFin.render(scale);
|
||||
this.BackfinRight.render(scale);
|
||||
this.BackBody.render(scale);
|
||||
this.BackfinLeft.render(scale);
|
||||
this.Middlebody.render(scale);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
public class CockatriceModel extends ModelBase
|
||||
{
|
||||
|
||||
public ModelRenderer head, body;
|
||||
|
||||
public ModelRenderer legs, legs2;
|
||||
|
||||
public ModelRenderer wings, wings2;
|
||||
|
||||
public ModelRenderer jaw, neck;
|
||||
|
||||
public ModelRenderer feather1, feather2, feather3;
|
||||
|
||||
public CockatriceModel()
|
||||
{
|
||||
this.head = new ModelRenderer(this, 0, 13);
|
||||
this.head.addBox(-2.0F, -4.0F, -6.0F, 4, 4, 8, 0.0F);
|
||||
this.head.setRotationPoint(0.0F, (float)(-8 + 16), -4.0F);
|
||||
|
||||
this.jaw = new ModelRenderer(this, 24, 13);
|
||||
this.jaw.addBox(-2.0F, -1.0F, -6.0F, 4, 1, 8, -0.1F);
|
||||
this.jaw.setRotationPoint(0.0F, (float)(-8 + 16), -4.0F);
|
||||
|
||||
this.body = new ModelRenderer(this, 0, 0);
|
||||
this.body.addBox(-3.0F, -3.0F, 0.0F, 6, 8, 5, 0.0F);
|
||||
this.body.setRotationPoint(0.0F, (float)(0 + 16), 0.0F);
|
||||
|
||||
this.legs = new ModelRenderer(this, 22, 0);
|
||||
this.legs.addBox(-1.0F, -1.0F, -1.0F, 2, 9, 2);
|
||||
this.legs.setRotationPoint(-2.0F, (float)(0 + 16), 1.0F);
|
||||
|
||||
this.legs2 = new ModelRenderer(this, 22, 0);
|
||||
this.legs2.addBox(-1.0F, -1.0F, -1.0F, 2, 9, 2);
|
||||
this.legs2.setRotationPoint(2.0F, (float)(0 + 16), 1.0F);
|
||||
|
||||
this.wings = new ModelRenderer(this, 52, 0);
|
||||
this.wings.addBox(-1.0F, -0.0F, -1.0F, 1, 8, 4);
|
||||
this.wings.setRotationPoint(-3.0F, (float)(16), 2.0F);
|
||||
|
||||
this.wings2 = new ModelRenderer(this, 52, 0);
|
||||
this.wings2.addBox(0.0F, -0.0F, -1.0F, 1, 8, 4);
|
||||
this.wings2.setRotationPoint(3.0F, (float)(-4 + 16), 0.0F);
|
||||
|
||||
this.neck = new ModelRenderer(this, 44, 0);
|
||||
this.neck.addBox(-1.0F, -6.0F, -1.0F, 2, 6, 2);
|
||||
this.neck.setRotationPoint(0.0F, (float)(-2 + 16), -4.0F);
|
||||
|
||||
this.feather1 = new ModelRenderer(this, 30, 0);
|
||||
this.feather1.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
|
||||
this.feather1.setRotationPoint(0.0F, (float)(1 + 16), 1.0F);
|
||||
this.feather2 = new ModelRenderer(this, 30, 0);
|
||||
this.feather2.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
|
||||
this.feather2.setRotationPoint(0.0F, (float)(1 + 16), 1.0F);
|
||||
this.feather3 = new ModelRenderer(this, 30, 0);
|
||||
this.feather3.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
|
||||
this.feather3.setRotationPoint(0.0F, (float)(1 + 16), 1.0F);
|
||||
this.feather1.rotationPointY += 0.5F;
|
||||
this.feather2.rotationPointY += 0.5F;
|
||||
this.feather3.rotationPointY += 0.5F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
this.head.render(scale);
|
||||
this.jaw.render(scale);
|
||||
this.body.render(scale);
|
||||
this.legs.render(scale);
|
||||
this.legs2.render(scale);
|
||||
this.wings.render(scale);
|
||||
this.wings2.render(scale);
|
||||
this.neck.render(scale);
|
||||
this.feather1.render(scale);
|
||||
this.feather2.render(scale);
|
||||
this.feather3.render(scale);
|
||||
}
|
||||
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
this.head.rotateAngleX = headPitch / 57.29578F;
|
||||
this.head.rotateAngleY = netHeadYaw / 57.29578F;
|
||||
|
||||
this.jaw.rotateAngleX = head.rotateAngleX;
|
||||
this.jaw.rotateAngleY = head.rotateAngleY;
|
||||
|
||||
this.body.rotateAngleX = 1.570796F;
|
||||
|
||||
this.legs.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount;
|
||||
this.legs2.rotateAngleX = MathHelper.cos((float) (limbSwing * 0.6662F + Math.PI)) * 1.4F * limbSwingAmount;
|
||||
|
||||
if(ageInTicks > 0.001F)
|
||||
{
|
||||
this.wings.rotationPointZ = -1F;
|
||||
this.wings2.rotationPointZ = -1F;
|
||||
this.wings.rotationPointY = 12F;
|
||||
this.wings2.rotationPointY = 12F;
|
||||
this.wings.rotateAngleX = 0.0F;
|
||||
this.wings2.rotateAngleX = 0.0F;
|
||||
this.wings.rotateAngleZ = ageInTicks;
|
||||
this.wings2.rotateAngleZ = -ageInTicks;
|
||||
this.legs.rotateAngleX = 0.6F;
|
||||
this.legs2.rotateAngleX = 0.6F;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.wings.rotationPointZ = -3F;
|
||||
this.wings2.rotationPointZ = -3F;
|
||||
this.wings.rotationPointY = 14F;
|
||||
this.wings2.rotationPointY = 14F;
|
||||
this.wings.rotateAngleX = (float) (Math.PI / 2.0F);
|
||||
this.wings2.rotateAngleX = (float) (Math.PI / 2.0F);
|
||||
this.wings.rotateAngleZ = 0.0F;
|
||||
this.wings2.rotateAngleZ = 0.0F;
|
||||
}
|
||||
|
||||
this.feather1.rotateAngleY = -0.375F;
|
||||
this.feather2.rotateAngleY = 0.0F;
|
||||
this.feather3.rotateAngleY = 0.375F;
|
||||
this.feather1.rotateAngleX = 0.25F;
|
||||
this.feather2.rotateAngleX = 0.25F;
|
||||
this.feather3.rotateAngleX = 0.25F;
|
||||
|
||||
this.neck.rotateAngleX = 0.0F;
|
||||
this.neck.rotateAngleY = head.rotateAngleY;
|
||||
this.jaw.rotateAngleX += 0.35F;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class CrystalModel extends ModelBase
|
||||
{
|
||||
|
||||
public ModelRenderer head[];
|
||||
|
||||
public float sinage[];
|
||||
|
||||
private static final float sponge = (180F / 3.141593F);
|
||||
|
||||
public CrystalModel()
|
||||
{
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public CrystalModel(float f)
|
||||
{
|
||||
this(f, 0.0F);
|
||||
}
|
||||
|
||||
public CrystalModel(float f, float f1)
|
||||
{
|
||||
sinage = new float[3];
|
||||
head = new ModelRenderer[3];
|
||||
head[0] = new ModelRenderer(this, 0, 0);
|
||||
head[1] = new ModelRenderer(this, 32, 0);
|
||||
head[2] = new ModelRenderer(this, 0, 16);
|
||||
|
||||
for(int i = 0; i < 3; i ++) {
|
||||
head[i].addBox(-4F, -4F, -4F, 8, 8, 8, f);
|
||||
head[i].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
GL11.glTranslatef(0F, 0.75F, 0F);
|
||||
|
||||
GL11.glEnable(2977 /*GL_NORMALIZE*/);
|
||||
GL11.glEnable(3042 /*GL_BLEND*/);
|
||||
GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(sinage[0] * sponge, 1F, 0F, 0F);
|
||||
head[0].render(scale);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(sinage[1] * sponge, 0F, 1F, 0F);
|
||||
head[1].render(scale);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(sinage[2] * sponge, 0F, 0F, 1F);
|
||||
head[2].render(scale);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
for(int i = 0; i < 3; i ++)
|
||||
{
|
||||
head[i].rotateAngleY = f3 / 57.29578F;
|
||||
head[i].rotateAngleX = f4 / 57.29578F;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelQuadruped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class FlyingCowModel extends ModelQuadruped
|
||||
{
|
||||
|
||||
ModelRenderer udders;
|
||||
ModelRenderer horn1;
|
||||
ModelRenderer horn2;
|
||||
|
||||
public FlyingCowModel()
|
||||
{
|
||||
super(12, 0.0F);
|
||||
this.head = new ModelRenderer(this, 0, 0);
|
||||
this.head.addBox(-4.0F, -4.0F, -6.0F, 8, 8, 6, 0.0F);
|
||||
this.head.setRotationPoint(0.0F, 4.0F, -8.0F);
|
||||
this.horn1 = new ModelRenderer(this, 22, 0);
|
||||
this.horn1.addBox(-4.0F, -5.0F, -4.0F, 1, 3, 1, 0.0F);
|
||||
this.horn1.setRotationPoint(0.0F, 3.0F, -7.0F);
|
||||
this.horn2 = new ModelRenderer(this, 22, 0);
|
||||
this.horn2.addBox(3.0F, -5.0F, -4.0F, 1, 3, 1, 0.0F);
|
||||
this.horn2.setRotationPoint(0.0F, 3.0F, -7.0F);
|
||||
this.udders = new ModelRenderer(this, 52, 0);
|
||||
this.udders.addBox(-2.0F, -3.0F, 0.0F, 4, 6, 2, 0.0F);
|
||||
this.udders.setRotationPoint(0.0F, 14.0F, 6.0F);
|
||||
this.udders.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.body = new ModelRenderer(this, 18, 4);
|
||||
this.body.addBox(-6.0F, -10.0F, -7.0F, 12, 18, 10, 0.0F);
|
||||
this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
|
||||
--this.leg1.rotationPointX;
|
||||
++this.leg2.rotationPointX;
|
||||
this.leg1.rotationPointZ += 0.0F;
|
||||
this.leg2.rotationPointZ += 0.0F;
|
||||
--this.leg3.rotationPointX;
|
||||
++this.leg4.rotationPointX;
|
||||
--this.leg3.rotationPointZ;
|
||||
--this.leg4.rotationPointZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
super.render(entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
|
||||
|
||||
if (this.isChild)
|
||||
{
|
||||
float f6 = 2.0F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6);
|
||||
GL11.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
this.horn1.render(scale);
|
||||
this.horn2.render(scale);
|
||||
this.udders.render(scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.horn1.render(scale);
|
||||
this.horn2.render(scale);
|
||||
this.udders.render(scale);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
|
||||
|
||||
this.horn1.rotateAngleY = this.head.rotateAngleY;
|
||||
this.horn1.rotateAngleX = this.head.rotateAngleX;
|
||||
this.horn2.rotateAngleY = this.head.rotateAngleY;
|
||||
this.horn2.rotateAngleX = this.head.rotateAngleX;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityFlyingCow;
|
||||
|
||||
public class FlyingCowWingModel extends ModelBase
|
||||
{
|
||||
|
||||
private ModelRenderer leftWingInner = new ModelRenderer(this, 0, 0);
|
||||
private ModelRenderer leftWingOuter = new ModelRenderer(this, 20, 0);
|
||||
private ModelRenderer rightWingInner = new ModelRenderer(this, 0, 0);
|
||||
private ModelRenderer rightWingOuter = new ModelRenderer(this, 40, 0);
|
||||
|
||||
public FlyingCowWingModel()
|
||||
{
|
||||
this.leftWingInner.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
|
||||
this.leftWingOuter.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
|
||||
this.rightWingInner.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
|
||||
this.rightWingOuter.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
|
||||
|
||||
this.rightWingOuter.rotateAngleY = (float)Math.PI;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
EntityFlyingCow flyingcow = ((EntityFlyingCow)entityIn);
|
||||
GlStateManager.translate(0.0F, -10.0F * scale, 0.0F);
|
||||
|
||||
float wingBend = -((float)Math.acos((double)flyingcow.wingFold));
|
||||
|
||||
float x = 32.0F * flyingcow.wingFold / 4.0F;
|
||||
float y = -32.0F * (float)Math.sqrt((double)(1.0F - flyingcow.wingFold * flyingcow.wingFold)) / 4.0F;
|
||||
|
||||
float x2 = x * (float)Math.cos((double)flyingcow.wingAngle) - y * (float)Math.sin((double)flyingcow.wingAngle);
|
||||
float y2 = x * (float)Math.sin((double)flyingcow.wingAngle) + y * (float)Math.cos((double)flyingcow.wingAngle);
|
||||
|
||||
this.leftWingInner.setRotationPoint(4.0F + x2, y2 + 12.0F, 0.0F);
|
||||
this.rightWingInner.setRotationPoint(-4.0F - x2, y2 + 12.0F, 0.0F);
|
||||
|
||||
x *= 3.0F;
|
||||
x2 = x * (float)Math.cos((double)flyingcow.wingAngle) - y * (float)Math.sin((double)flyingcow.wingAngle);
|
||||
y2 = x * (float)Math.sin((double)flyingcow.wingAngle) + y * (float)Math.cos((double)flyingcow.wingAngle);
|
||||
|
||||
this.leftWingOuter.setRotationPoint(4.0F + x2, y2 + 12.0F, 0.0F);
|
||||
this.rightWingOuter.setRotationPoint(-4.0F - x2, y2 + 12.0F, 0.0F);
|
||||
|
||||
this.leftWingInner.rotateAngleZ = flyingcow.wingAngle + wingBend + ((float)Math.PI / 2F);
|
||||
this.leftWingOuter.rotateAngleZ = flyingcow.wingAngle - wingBend + ((float)Math.PI / 2F);
|
||||
this.rightWingInner.rotateAngleZ = -(flyingcow.wingAngle + wingBend - ((float)Math.PI / 2F));
|
||||
this.rightWingOuter.rotateAngleZ = -(flyingcow.wingAngle - wingBend + ((float)Math.PI / 2F));
|
||||
|
||||
this.leftWingOuter.render(scale);
|
||||
this.leftWingInner.render(scale);
|
||||
this.rightWingOuter.render(scale);
|
||||
this.rightWingInner.render(scale);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) {}
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import com.legacy.aether.server.entities.hostile.EntityMimic;
|
||||
|
||||
public class MimicModel extends ModelBase
|
||||
{
|
||||
|
||||
ModelRenderer box, boxLid;
|
||||
|
||||
ModelRenderer leftLeg, rightLeg;
|
||||
|
||||
public MimicModel()
|
||||
{
|
||||
this.box = new ModelRenderer(this, 0, 0);
|
||||
this.box.addBox(-8F, 0F, -8F, 16, 10, 16);
|
||||
this.box.setRotationPoint(0F, -24F, 0F);
|
||||
|
||||
this.boxLid = new ModelRenderer(this, 16, 10);
|
||||
this.boxLid.addBox(0F, 0F, 0F, 16, 6, 16);
|
||||
this.boxLid.setRotationPoint(-8F, -24F, 8F);
|
||||
|
||||
this.leftLeg = new ModelRenderer(this, 0, 0);
|
||||
this.leftLeg.addBox(-3F, 0F, -3F, 6, 15, 6);
|
||||
this.leftLeg.setRotationPoint(-4F, -15F, 0F);
|
||||
|
||||
this.rightLeg = new ModelRenderer(this, 0, 0);
|
||||
this.rightLeg.addBox(-3F, 0F, -3F, 6, 15, 6);
|
||||
this.rightLeg.setRotationPoint(4F, -15F, 0F);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
EntityMimic mimic = (EntityMimic) entityIn;
|
||||
this.boxLid.rotateAngleX = 3.14159265F - mimic.mouth;
|
||||
this.rightLeg.rotateAngleX = mimic.legs;
|
||||
this.leftLeg.rotateAngleX = - mimic.legs;
|
||||
}
|
||||
|
||||
public void renderHead(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale, EntityMimic mimic)
|
||||
{
|
||||
this.box.render(scale);
|
||||
}
|
||||
|
||||
public void renderLegs(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale, EntityMimic mimic)
|
||||
{
|
||||
boxLid.render(scale);
|
||||
leftLeg.render(scale);
|
||||
rightLeg.render(scale);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class MiniCloudModel extends ModelBase
|
||||
{
|
||||
|
||||
public ModelRenderer head[];
|
||||
|
||||
public MiniCloudModel()
|
||||
{
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public MiniCloudModel(float modelSize)
|
||||
{
|
||||
this(modelSize, 0.0F);
|
||||
}
|
||||
|
||||
public MiniCloudModel(float modelSize, float rotationPointY)
|
||||
{
|
||||
this.head = new ModelRenderer[5];
|
||||
|
||||
this.head[0] = new ModelRenderer(this, 0, 0);
|
||||
this.head[1] = new ModelRenderer(this, 36, 0);
|
||||
this.head[2] = new ModelRenderer(this, 36, 0);
|
||||
this.head[3] = new ModelRenderer(this, 36, 8);
|
||||
this.head[4] = new ModelRenderer(this, 36, 8);
|
||||
|
||||
this.head[0].addBox(-4.5F, -4.5F, -4.5F, 9, 9, 9, modelSize);
|
||||
this.head[0].setRotationPoint(0.0F, 0.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.head[1].addBox(-3.5F, -3.5F, -5.5F, 7, 7, 1, modelSize);
|
||||
this.head[1].setRotationPoint(0.0F, 0.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.head[2].addBox(-3.5F, -3.5F, 4.5F, 7, 7, 1, modelSize);
|
||||
this.head[2].setRotationPoint(0.0F, 0.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.head[3].addBox(-5.5F, -3.5F, -3.5F, 1, 7, 7, modelSize);
|
||||
this.head[3].setRotationPoint(0.0F, 0.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.head[4].addBox(4.5F, -3.5F, -3.5F, 1, 7, 7, modelSize);
|
||||
this.head[4].setRotationPoint(0.0F, 0.0F + rotationPointY, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity e, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
for(int i = 0; i < 5; i ++)
|
||||
{
|
||||
this.head[i].render(f5);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
for(int i = 0; i < 5; i ++)
|
||||
{
|
||||
this.head[i].rotateAngleY = 0F;
|
||||
this.head[i].rotateAngleX = 0F;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
public class MoaModel extends ModelBase
|
||||
{
|
||||
|
||||
public ModelRenderer head, body;
|
||||
|
||||
public ModelRenderer legs, legs2;
|
||||
|
||||
public ModelRenderer wings, wings2;
|
||||
|
||||
public ModelRenderer jaw, neck;
|
||||
|
||||
public ModelRenderer feather1, feather2, feather3;
|
||||
|
||||
public MoaModel()
|
||||
{
|
||||
this.head = new ModelRenderer(this, 0, 13);
|
||||
this.head.addBox(-2.0F, -4.0F, -6.0F, 4, 4, 8, 0.0F);
|
||||
this.head.setRotationPoint(0.0F, (float)(-8 + 16), -4.0F);
|
||||
|
||||
this.jaw = new ModelRenderer(this, 24, 13);
|
||||
this.jaw.addBox(-2.0F, -1.0F, -6.0F, 4, 1, 8, -0.1F);
|
||||
this.jaw.setRotationPoint(0.0F, (float)(-8 + 16), -4.0F);
|
||||
|
||||
this.body = new ModelRenderer(this, 0, 0);
|
||||
this.body.addBox(-3.0F, -3.0F, 0.0F, 6, 8, 5, 0.0F);
|
||||
this.body.setRotationPoint(0.0F, (float)(0 + 16), 0.0F);
|
||||
|
||||
this.legs = new ModelRenderer(this, 22, 0);
|
||||
this.legs.addBox(-1.0F, -1.0F, -1.0F, 2, 9, 2);
|
||||
this.legs.setRotationPoint(-2.0F, (float)(0 + 16), 1.0F);
|
||||
|
||||
this.legs2 = new ModelRenderer(this, 22, 0);
|
||||
this.legs2.addBox(-1.0F, -1.0F, -1.0F, 2, 9, 2);
|
||||
this.legs2.setRotationPoint(2.0F, (float)(0 + 16), 1.0F);
|
||||
|
||||
this.wings = new ModelRenderer(this, 52, 0);
|
||||
this.wings.addBox(-1.0F, -0.0F, -1.0F, 1, 8, 4);
|
||||
this.wings.setRotationPoint(-3.0F, (float)(16), 2.0F);
|
||||
|
||||
this.wings2 = new ModelRenderer(this, 52, 0);
|
||||
this.wings2.addBox(0.0F, -0.0F, -1.0F, 1, 8, 4);
|
||||
this.wings2.setRotationPoint(3.0F, (float)(-4 + 16), 0.0F);
|
||||
|
||||
this.neck = new ModelRenderer(this, 44, 0);
|
||||
this.neck.addBox(-1.0F, -6.0F, -1.0F, 2, 6, 2);
|
||||
this.neck.setRotationPoint(0.0F, (float)(-2 + 16), -4.0F);
|
||||
|
||||
this.feather1 = new ModelRenderer(this, 30, 0);
|
||||
this.feather1.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
|
||||
this.feather1.setRotationPoint(0.0F, (float)(1 + 16), 1.0F);
|
||||
this.feather2 = new ModelRenderer(this, 30, 0);
|
||||
this.feather2.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
|
||||
this.feather2.setRotationPoint(0.0F, (float)(1 + 16), 1.0F);
|
||||
this.feather3 = new ModelRenderer(this, 30, 0);
|
||||
this.feather3.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
|
||||
this.feather3.setRotationPoint(0.0F, (float)(1 + 16), 1.0F);
|
||||
this.feather1.rotationPointY += 0.5F;
|
||||
this.feather2.rotationPointY += 0.5F;
|
||||
this.feather3.rotationPointY += 0.5F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
this.head.render(scale);
|
||||
this.jaw.render(scale);
|
||||
this.body.render(scale);
|
||||
this.legs.render(scale);
|
||||
this.legs2.render(scale);
|
||||
this.wings.render(scale);
|
||||
this.wings2.render(scale);
|
||||
this.neck.render(scale);
|
||||
this.feather1.render(scale);
|
||||
this.feather2.render(scale);
|
||||
this.feather3.render(scale);
|
||||
}
|
||||
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
this.head.rotateAngleX = headPitch / 57.29578F;
|
||||
this.head.rotateAngleY = netHeadYaw / 57.29578F;
|
||||
|
||||
this.jaw.rotateAngleX = head.rotateAngleX;
|
||||
this.jaw.rotateAngleY = head.rotateAngleY;
|
||||
|
||||
this.body.rotateAngleX = 1.570796F;
|
||||
|
||||
this.legs.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount;
|
||||
this.legs2.rotateAngleX = MathHelper.cos((float) (limbSwing * 0.6662F + Math.PI)) * 1.4F * limbSwingAmount;
|
||||
|
||||
if(ageInTicks > 0.001F)
|
||||
{
|
||||
this.wings.rotationPointZ = -1F;
|
||||
this.wings2.rotationPointZ = -1F;
|
||||
this.wings.rotationPointY = 12F;
|
||||
this.wings2.rotationPointY = 12F;
|
||||
this.wings.rotateAngleX = 0.0F;
|
||||
this.wings2.rotateAngleX = 0.0F;
|
||||
this.wings.rotateAngleZ = ageInTicks;
|
||||
this.wings2.rotateAngleZ = -ageInTicks;
|
||||
this.legs.rotateAngleX = 0.6F;
|
||||
this.legs2.rotateAngleX = 0.6F;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.wings.rotationPointZ = -3F;
|
||||
this.wings2.rotationPointZ = -3F;
|
||||
this.wings.rotationPointY = 14F;
|
||||
this.wings2.rotationPointY = 14F;
|
||||
this.wings.rotateAngleX = (float) (Math.PI / 2.0F);
|
||||
this.wings2.rotateAngleX = (float) (Math.PI / 2.0F);
|
||||
this.wings.rotateAngleZ = 0.0F;
|
||||
this.wings2.rotateAngleZ = 0.0F;
|
||||
}
|
||||
|
||||
this.feather1.rotateAngleY = -0.375F;
|
||||
this.feather2.rotateAngleY = 0.0F;
|
||||
this.feather3.rotateAngleY = 0.375F;
|
||||
this.feather1.rotateAngleX = 0.25F;
|
||||
this.feather2.rotateAngleX = 0.25F;
|
||||
this.feather3.rotateAngleX = 0.25F;
|
||||
|
||||
this.neck.rotateAngleX = 0.0F;
|
||||
this.neck.rotateAngleY = head.rotateAngleY;
|
||||
this.jaw.rotateAngleX += 0.35F;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityPhyg;
|
||||
|
||||
public class PhygWingModel extends ModelBase
|
||||
{
|
||||
|
||||
private ModelRenderer leftWingInner = new ModelRenderer(this, 0, 0);
|
||||
private ModelRenderer leftWingOuter = new ModelRenderer(this, 20, 0);
|
||||
private ModelRenderer rightWingInner = new ModelRenderer(this, 0, 0);
|
||||
private ModelRenderer rightWingOuter = new ModelRenderer(this, 40, 0);
|
||||
|
||||
public PhygWingModel()
|
||||
{
|
||||
this.leftWingInner.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
|
||||
this.leftWingOuter.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
|
||||
this.rightWingInner.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
|
||||
this.rightWingOuter.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
|
||||
|
||||
this.rightWingOuter.rotateAngleY = (float)Math.PI;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
EntityPhyg pig = ((EntityPhyg)entityIn);
|
||||
float wingBend;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float x2;
|
||||
float y2;
|
||||
|
||||
if (pig.isChild())
|
||||
{
|
||||
wingBend = -((float)Math.acos((double)pig.wingFold));
|
||||
GlStateManager.scale(1.0F / 2.0F, 1.0F / 2.0F, 1.0F / 2.0F);
|
||||
GlStateManager.translate(0.0F, 24.0F * scale, 0.0F);
|
||||
x = -((float)Math.acos((double)pig.wingFold));
|
||||
y = 32.0F * pig.wingFold / 4.0F;
|
||||
z = -32.0F * (float)Math.sqrt((double)(1.0F - pig.wingFold * pig.wingFold)) / 4.0F;
|
||||
x2 = 0.0F;
|
||||
y2 = y * (float)Math.cos((double)pig.wingAngle) - z * (float)Math.sin((double)pig.wingAngle);
|
||||
float y21 = y * (float)Math.sin((double)pig.wingAngle) + z * (float)Math.cos((double)pig.wingAngle);
|
||||
|
||||
this.leftWingInner.setRotationPoint(4.0F + y2, y21 + 12.0F, x2);
|
||||
this.rightWingInner.setRotationPoint(-4.0F - y2, y21 + 12.0F, x2);
|
||||
|
||||
y *= 3.0F;
|
||||
y2 = y * (float)Math.cos((double)pig.wingAngle) - z * (float)Math.sin((double)pig.wingAngle);
|
||||
y21 = y * (float)Math.sin((double)pig.wingAngle) + z * (float)Math.cos((double)pig.wingAngle);
|
||||
|
||||
this.leftWingOuter.setRotationPoint(4.0F + y2, y21 + 12.0F, x2);
|
||||
this.rightWingOuter.setRotationPoint(-4.0F - y2, y21 + 12.0F, x2);
|
||||
|
||||
this.leftWingInner.rotateAngleZ = pig.wingAngle + wingBend + ((float)Math.PI / 2F);
|
||||
this.leftWingOuter.rotateAngleZ = pig.wingAngle - wingBend + ((float)Math.PI / 2F);
|
||||
this.rightWingInner.rotateAngleZ = -(pig.wingAngle + wingBend - ((float)Math.PI / 2F));
|
||||
this.rightWingOuter.rotateAngleZ = -(pig.wingAngle - wingBend + ((float)Math.PI / 2F));
|
||||
|
||||
this.leftWingOuter.render(scale);
|
||||
this.leftWingInner.render(scale);
|
||||
this.rightWingOuter.render(scale);
|
||||
this.rightWingInner.render(scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
wingBend = -((float)Math.acos((double)pig.wingFold));
|
||||
x = 32.0F * pig.wingFold / 4.0F;
|
||||
y = -32.0F * (float)Math.sqrt((double)(1.0F - pig.wingFold * pig.wingFold)) / 4.0F;
|
||||
z = 0.0F;
|
||||
x2 = x * (float)Math.cos((double)pig.wingAngle) - y * (float)Math.sin((double)pig.wingAngle);
|
||||
y2 = x * (float)Math.sin((double)pig.wingAngle) + y * (float)Math.cos((double)pig.wingAngle);
|
||||
|
||||
this.leftWingInner.setRotationPoint(4.0F + x2, y2 + 12.0F, z);
|
||||
this.rightWingInner.setRotationPoint(-4.0F - x2, y2 + 12.0F, z);
|
||||
|
||||
x *= 3.0F;
|
||||
x2 = x * (float)Math.cos((double)pig.wingAngle) - y * (float)Math.sin((double)pig.wingAngle);
|
||||
y2 = x * (float)Math.sin((double)pig.wingAngle) + y * (float)Math.cos((double)pig.wingAngle);
|
||||
|
||||
this.leftWingOuter.setRotationPoint(4.0F + x2, y2 + 12.0F, z);
|
||||
this.rightWingOuter.setRotationPoint(-4.0F - x2, y2 + 12.0F, z);
|
||||
|
||||
this.leftWingInner.rotateAngleZ = pig.wingAngle + wingBend + ((float)Math.PI / 2F);
|
||||
this.leftWingOuter.rotateAngleZ = pig.wingAngle - wingBend + ((float)Math.PI / 2F);
|
||||
this.rightWingInner.rotateAngleZ = -(pig.wingAngle + wingBend - ((float)Math.PI / 2F));
|
||||
this.rightWingOuter.rotateAngleZ = -(pig.wingAngle - wingBend + ((float)Math.PI / 2F));
|
||||
|
||||
this.leftWingOuter.render(scale);
|
||||
this.leftWingInner.render(scale);
|
||||
this.rightWingOuter.render(scale);
|
||||
this.rightWingInner.render(scale);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) {}
|
||||
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelQuadruped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
import com.legacy.aether.server.entities.passive.EntitySheepuff;
|
||||
|
||||
public class SheepuffModel extends ModelQuadruped
|
||||
{
|
||||
|
||||
private float headRotationAngleX;
|
||||
|
||||
public SheepuffModel()
|
||||
{
|
||||
super(12, 0.0F);
|
||||
|
||||
this.head = new ModelRenderer(this, 0, 0);
|
||||
this.head.addBox(-3.0F, -4.0F, -4.0F, 6, 6, 6, 0.6F);
|
||||
this.head.setRotationPoint(0.0F, 6.0F, -8.0F);
|
||||
|
||||
this.body = new ModelRenderer(this, 28, 8);
|
||||
this.body.addBox(-4.0F, -8.0F, -7.0F, 8, 16, 6, 3.75F);
|
||||
this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
|
||||
|
||||
this.leg1 = new ModelRenderer(this, 0, 16);
|
||||
this.leg1.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F);
|
||||
this.leg1.setRotationPoint(-3.0F, 12.0F, 7.0F);
|
||||
|
||||
this.leg2 = new ModelRenderer(this, 0, 16);
|
||||
this.leg2.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F);
|
||||
this.leg2.setRotationPoint(3.0F, 12.0F, 7.0F);
|
||||
|
||||
this.leg3 = new ModelRenderer(this, 0, 16);
|
||||
this.leg3.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F);
|
||||
this.leg3.setRotationPoint(-3.0F, 12.0F, -5.0F);
|
||||
|
||||
this.leg4 = new ModelRenderer(this, 0, 16);
|
||||
this.leg4.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F);
|
||||
this.leg4.setRotationPoint(3.0F, 12.0F, -5.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float limbSwing, float prevLimbSwing, float partialTickTime)
|
||||
{
|
||||
super.setLivingAnimations(entitylivingbaseIn, limbSwing, prevLimbSwing, partialTickTime);
|
||||
|
||||
this.head.rotationPointY = 6.0F + ((EntitySheepuff)entitylivingbaseIn).getHeadRotationPointY(partialTickTime) * 9.0F;
|
||||
this.headRotationAngleX = ((EntitySheepuff)entitylivingbaseIn).getHeadRotationAngleX(partialTickTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
|
||||
|
||||
this.head.rotateAngleX = this.headRotationAngleX;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelQuadruped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
import com.legacy.aether.server.entities.passive.EntitySheepuff;
|
||||
|
||||
public class SheepuffWoolModel extends ModelQuadruped
|
||||
{
|
||||
private float headRotationAngleX;
|
||||
|
||||
public SheepuffWoolModel()
|
||||
{
|
||||
super(12, 0.0F);
|
||||
this.head = new ModelRenderer(this, 0, 0);
|
||||
this.head.addBox(-3.0F, -4.0F, -6.0F, 6, 6, 8, 0.0F);
|
||||
this.head.setRotationPoint(0.0F, 6.0F, -8.0F);
|
||||
this.body = new ModelRenderer(this, 28, 8);
|
||||
this.body.addBox(-4.0F, -10.0F, -7.0F, 8, 16, 6, 0.0F);
|
||||
this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float limbSwing, float prevLimbSwing, float partialTickTime)
|
||||
{
|
||||
super.setLivingAnimations(entitylivingbaseIn, limbSwing, prevLimbSwing, partialTickTime);
|
||||
|
||||
this.head.rotationPointY = 6.0F + ((EntitySheepuff)entitylivingbaseIn).getHeadRotationPointY(partialTickTime) * 9.0F;
|
||||
this.headRotationAngleX = ((EntitySheepuff)entitylivingbaseIn).getHeadRotationAngleX(partialTickTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
|
||||
|
||||
this.head.rotateAngleX = this.headRotationAngleX;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelQuadruped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
import com.legacy.aether.server.entities.passive.EntitySheepuff;
|
||||
|
||||
public class SheepuffedModel extends ModelQuadruped
|
||||
{
|
||||
|
||||
private float headRotationAngleX;
|
||||
|
||||
public SheepuffedModel()
|
||||
{
|
||||
super(12, 0.0F);
|
||||
|
||||
this.head = new ModelRenderer(this, 0, 0);
|
||||
this.head.addBox(-3.0F, -4.0F, -4.0F, 6, 6, 6, 0.6F);
|
||||
this.head.setRotationPoint(0.0F, 6.0F, -8.0F);
|
||||
|
||||
this.body = new ModelRenderer(this, 28, 8);
|
||||
this.body.addBox(-4.0F, -8.0F, -7.0F, 8, 16, 6, 3.75F);
|
||||
this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
|
||||
|
||||
this.leg1 = new ModelRenderer(this, 0, 16);
|
||||
this.leg1.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F);
|
||||
this.leg1.setRotationPoint(-3.0F, 12.0F, 7.0F);
|
||||
|
||||
this.leg2 = new ModelRenderer(this, 0, 16);
|
||||
this.leg2.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F);
|
||||
this.leg2.setRotationPoint(3.0F, 12.0F, 7.0F);
|
||||
|
||||
this.leg3 = new ModelRenderer(this, 0, 16);
|
||||
this.leg3.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F);
|
||||
this.leg3.setRotationPoint(-3.0F, 12.0F, -5.0F);
|
||||
|
||||
this.leg4 = new ModelRenderer(this, 0, 16);
|
||||
this.leg4.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, 0.5F);
|
||||
this.leg4.setRotationPoint(3.0F, 12.0F, -5.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float limbSwing, float prevLimbSwing, float partialTickTime)
|
||||
{
|
||||
super.setLivingAnimations(entitylivingbaseIn, limbSwing, prevLimbSwing, partialTickTime);
|
||||
|
||||
this.head.rotationPointY = 6.0F + ((EntitySheepuff)entitylivingbaseIn).getHeadRotationPointY(partialTickTime) * 9.0F;
|
||||
this.headRotationAngleX = ((EntitySheepuff)entitylivingbaseIn).getHeadRotationAngleX(partialTickTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
|
||||
|
||||
this.head.rotateAngleX = this.headRotationAngleX;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class SliderModel extends ModelBase
|
||||
{
|
||||
|
||||
public ModelRenderer head;
|
||||
|
||||
public float hurtAngle, hurtAngleX, hurtAngleZ;
|
||||
|
||||
public SliderModel()
|
||||
{
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public SliderModel(float modelSize)
|
||||
{
|
||||
this(modelSize, 0.0F);
|
||||
}
|
||||
|
||||
public SliderModel(float modelSize, float rotationPointY)
|
||||
{
|
||||
this.head = new ModelRenderer(this, 0, 0);
|
||||
this.head.addBox(-8F, -16F, -8F, 16, 16, 16, modelSize);
|
||||
this.head.setRotationPoint(0.0F, rotationPointY, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
this.head.rotateAngleY = this.head.rotateAngleY = 0.0F;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
GlStateManager.scale(2.0F, 2.0F, 2.0F);
|
||||
|
||||
if(this.hurtAngle > 0.01F)
|
||||
{
|
||||
GlStateManager.rotate(this.hurtAngle * -30F, this.hurtAngleX, 0F, this.hurtAngleZ);
|
||||
}
|
||||
|
||||
this.head.render(scale);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,172 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.legacy.aether.server.entities.bosses.sun_spirit.EntitySunSpirit;
|
||||
|
||||
public class SunSpiritModel extends ModelBiped
|
||||
{
|
||||
|
||||
public ModelRenderer bipedBody2;
|
||||
public ModelRenderer bipedBody3;
|
||||
public ModelRenderer bipedBody4;
|
||||
public ModelRenderer bipedRightArm2;
|
||||
public ModelRenderer bipedLeftArm2;
|
||||
public ModelRenderer bipedRightArm3;
|
||||
public ModelRenderer bipedLeftArm3;
|
||||
|
||||
public SunSpiritModel()
|
||||
{
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public SunSpiritModel(float modelSize)
|
||||
{
|
||||
this(modelSize, 0.0F);
|
||||
}
|
||||
|
||||
public SunSpiritModel(float modelSize, float rotationPointY)
|
||||
{
|
||||
this.leftArmPose = ModelBiped.ArmPose.EMPTY;
|
||||
this.rightArmPose = ModelBiped.ArmPose.EMPTY;
|
||||
this.isSneak = false;
|
||||
|
||||
this.bipedHead = new ModelRenderer(this, 0, 0);
|
||||
this.bipedHead.addBox(-4F, -8F, -3F, 8, 5, 7, modelSize);
|
||||
this.bipedHead.setRotationPoint(0.0F, 0.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.bipedHeadwear = new ModelRenderer(this, 32, 0);
|
||||
this.bipedHeadwear.addBox(-4F, -3F, -4F, 8, 3, 8, modelSize);
|
||||
this.bipedHeadwear.setRotationPoint(0.0F, 0.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.bipedBody = new ModelRenderer(this, 0, 12);
|
||||
this.bipedBody.addBox(-5F, 0.0F, -2.5F, 10, 6, 5, modelSize);
|
||||
this.bipedBody.setRotationPoint(0.0F, 0.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.bipedBody2 = new ModelRenderer(this, 0, 23);
|
||||
this.bipedBody2.addBox(-4.5F, 6.0F, -2F, 9, 5, 4, modelSize);
|
||||
this.bipedBody2.setRotationPoint(0.0F, 0.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.bipedBody3 = new ModelRenderer(this, 30, 27);
|
||||
this.bipedBody3.addBox(-4.5F, 11.0F, -2F, 5, 1, 4, modelSize + 0.5F);
|
||||
this.bipedBody3.setRotationPoint(0.0F, 0.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.bipedBody4 = new ModelRenderer(this, 30, 27);
|
||||
this.bipedBody4.addBox(-0.5F, 11.0F, -2F, 5, 1, 4, modelSize + 0.5F);
|
||||
this.bipedBody4.setRotationPoint(0.0F, 0.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.bipedRightArm = new ModelRenderer(this, 30, 11);
|
||||
this.bipedRightArm.addBox(-2.5F, -2.5F, -2.5F, 5, 5, 5, modelSize + 0.5F);
|
||||
this.bipedRightArm.setRotationPoint(-8F, 2.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.bipedRightArm2 = new ModelRenderer(this, 30, 11);
|
||||
this.bipedRightArm2.addBox(-2.5F, 2.5F, -2.5F, 5, 10, 5, modelSize);
|
||||
this.bipedRightArm2.setRotationPoint(-8F, 2.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.bipedRightArm3 = new ModelRenderer(this, 30, 26);
|
||||
this.bipedRightArm3.addBox(-2.5F, 7.5F, -2.5F, 5, 1, 5, modelSize + 0.25F);
|
||||
this.bipedRightArm3.setRotationPoint(-8F, 2.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.bipedLeftArm = new ModelRenderer(this, 30, 11);
|
||||
this.bipedLeftArm.mirror = true;
|
||||
this.bipedLeftArm.addBox(-2.5F, -2.5F, -2.5F, 5, 5, 5, modelSize + 0.5F);
|
||||
this.bipedLeftArm.setRotationPoint(8F, 2.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.bipedLeftArm2 = new ModelRenderer(this, 30, 11);
|
||||
this.bipedLeftArm2.mirror = true;
|
||||
this.bipedLeftArm2.addBox(-2.5F, 2.5F, -2.5F, 5, 10, 5, modelSize);
|
||||
this.bipedLeftArm2.setRotationPoint(8F, 2.0F + rotationPointY, 0.0F);
|
||||
|
||||
this.bipedLeftArm3 = new ModelRenderer(this, 30, 26);
|
||||
this.bipedLeftArm3.mirror = true;
|
||||
this.bipedLeftArm3.addBox(-2.5F, 7.5F, -2.5F, 5, 1, 5, modelSize + 0.25F);
|
||||
this.bipedLeftArm3.setRotationPoint(8F, 2.0F + rotationPointY, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
if (entityIn instanceof EntitySunSpirit)
|
||||
{
|
||||
GlStateManager.scale(2.25F, 2.25F, 2.25F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlStateManager.scale(1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
GlStateManager.translate(0F, -0.25F, 0F);
|
||||
|
||||
this.bipedHead.render(scale);
|
||||
this.bipedHeadwear.render(scale);
|
||||
this.bipedBody.render(scale);
|
||||
this.bipedBody2.render(scale);
|
||||
this.bipedBody3.render(scale);
|
||||
this.bipedBody4.render(scale);
|
||||
this.bipedRightArm.offsetX = 0.985F;
|
||||
this.bipedRightArm.render(scale);
|
||||
this.bipedRightArm2.render(scale);
|
||||
this.bipedRightArm3.render(scale);
|
||||
this.bipedLeftArm.offsetX = -0.985F;
|
||||
this.bipedLeftArm.render(scale);
|
||||
this.bipedLeftArm2.render(scale);
|
||||
this.bipedLeftArm3.render(scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
this.bipedHead.rotateAngleY = netHeadYaw / 57.29578F;
|
||||
this.bipedHead.rotateAngleX = headPitch / 57.29578F;
|
||||
this.bipedHeadwear.rotateAngleY = this.bipedHead.rotateAngleY;
|
||||
this.bipedHeadwear.rotateAngleX = this.bipedHead.rotateAngleX;
|
||||
this.bipedRightArm.rotateAngleX = 0.0F;
|
||||
this.bipedLeftArm.rotateAngleX = 0.0F;
|
||||
this.bipedRightArm.rotateAngleZ = 0.0F;
|
||||
this.bipedLeftArm.rotateAngleZ = 0.0F;
|
||||
|
||||
this.bipedRightArm.rotateAngleY = 0.0F;
|
||||
this.bipedLeftArm.rotateAngleY = 0.0F;
|
||||
|
||||
if(this.swingProgress > -9990F)
|
||||
{
|
||||
float f6 = this.swingProgress;
|
||||
this.bipedBody.rotateAngleY = MathHelper.sin(MathHelper.sqrt_float(f6) * 3.141593F * 2.0F) * 0.2F;
|
||||
this.bipedRightArm.rotateAngleY += this.bipedBody.rotateAngleY;
|
||||
this.bipedLeftArm.rotateAngleY += this.bipedBody.rotateAngleY;
|
||||
this.bipedLeftArm.rotateAngleX += this.bipedBody.rotateAngleY;
|
||||
f6 = 1.0F - this.swingProgress;
|
||||
f6 *= f6;
|
||||
f6 *= f6;
|
||||
f6 = 1.0F - f6;
|
||||
float f7 = MathHelper.sin(f6 * 3.141593F);
|
||||
float f8 = MathHelper.sin(this.swingProgress * 3.141593F) * -(this.bipedHead.rotateAngleX - 0.7F) * 0.75F;
|
||||
this.bipedRightArm.rotateAngleX -= (double)f7 * 1.2D + (double)f8;
|
||||
this.bipedRightArm.rotateAngleY += this.bipedBody.rotateAngleY * 2.0F;
|
||||
this.bipedRightArm.rotateAngleZ = MathHelper.sin(this.swingProgress * 3.141593F) * -0.4F;
|
||||
}
|
||||
|
||||
//this.bipedRightArm.rotateAngleZ += MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
|
||||
//this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
|
||||
//this.bipedRightArm.rotateAngleX += MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
|
||||
//this.bipedLeftArm.rotateAngleX -= MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
|
||||
|
||||
this.bipedBody4.rotateAngleX = this.bipedBody3.rotateAngleX = this.bipedBody2.rotateAngleX = this.bipedBody.rotateAngleX;
|
||||
this.bipedBody4.rotateAngleY = this.bipedBody3.rotateAngleY = this.bipedBody2.rotateAngleY = this.bipedBody.rotateAngleY;
|
||||
|
||||
this.bipedLeftArm3.rotateAngleX = this.bipedLeftArm2.rotateAngleX = this.bipedLeftArm.rotateAngleX;
|
||||
this.bipedLeftArm3.rotateAngleY = this.bipedLeftArm2.rotateAngleY = this.bipedLeftArm.rotateAngleY;
|
||||
this.bipedLeftArm3.rotateAngleZ = this.bipedLeftArm2.rotateAngleZ = this.bipedLeftArm.rotateAngleZ;
|
||||
|
||||
this.bipedRightArm3.rotateAngleX = this.bipedRightArm2.rotateAngleX = this.bipedRightArm.rotateAngleX;
|
||||
this.bipedRightArm3.rotateAngleY = this.bipedRightArm2.rotateAngleY = this.bipedRightArm.rotateAngleY;
|
||||
this.bipedRightArm3.rotateAngleZ = this.bipedRightArm2.rotateAngleZ = this.bipedRightArm.rotateAngleZ;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,386 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ValkyrieModel extends ModelBiped
|
||||
{
|
||||
|
||||
public ModelRenderer bipedBody2;
|
||||
public ModelRenderer bipedRightArm2;
|
||||
public ModelRenderer bipedLeftArm2;
|
||||
public ModelRenderer wingLeft;
|
||||
public ModelRenderer wingRight;
|
||||
public ModelRenderer skirt[];
|
||||
public ModelRenderer sword[];
|
||||
public ModelRenderer strand[];
|
||||
public ModelRenderer halo[];
|
||||
|
||||
public static final int swordParts = 5;
|
||||
public static final int skirtParts = 6;
|
||||
public static final int strandParts = 22;
|
||||
public static final int haloParts = 4;
|
||||
|
||||
public float sinage;
|
||||
public boolean gonRound, halow;
|
||||
|
||||
public ValkyrieModel()
|
||||
{
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public ValkyrieModel(float f)
|
||||
{
|
||||
this(f, 0.0F);
|
||||
}
|
||||
|
||||
public ValkyrieModel(float f, float f1)
|
||||
{
|
||||
this.leftArmPose = ModelBiped.ArmPose.EMPTY;
|
||||
this.rightArmPose = ModelBiped.ArmPose.EMPTY;
|
||||
this.isSneak = false;
|
||||
|
||||
this.bipedHead = new ModelRenderer(this, 0, 0);
|
||||
this.bipedHead.addBox(-4F, -8F, -4F, 8, 8, 8, f);
|
||||
this.bipedHead.setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.bipedBody = new ModelRenderer(this, 12, 16);
|
||||
this.bipedBody.addBox(-3F, 0.0F, -1.5F, 6, 12, 3, f);
|
||||
this.bipedBody.setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.bipedBody2 = new ModelRenderer(this, 12, 16);
|
||||
this.bipedBody2.addBox(-3F, 0.5F, -1.25F, 6, 5, 3, f + 0.75F);
|
||||
this.bipedBody2.setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.bipedRightArm = new ModelRenderer(this, 30, 16);
|
||||
this.bipedRightArm.addBox(-3F, -1.5F, -1.5F, 3, 12, 3, f);
|
||||
this.bipedRightArm.setRotationPoint(-4F, 1.5F + f1, 0.0F);
|
||||
|
||||
this.bipedLeftArm = new ModelRenderer(this, 30, 16);
|
||||
this.bipedLeftArm.mirror = true;
|
||||
this.bipedLeftArm.addBox(-1F, -1.5F, -1.5F, 3, 12, 3, f);
|
||||
this.bipedLeftArm.setRotationPoint(5F, 1.5F + f1, 0.0F);
|
||||
|
||||
this.bipedRightArm2 = new ModelRenderer(this, 30, 16);
|
||||
this.bipedRightArm2.addBox(-3F, -1.5F, -1.5F, 3, 3, 3, f + 0.75F);
|
||||
this.bipedRightArm2.setRotationPoint(-4F, 1.5F + f1, 0.0F);
|
||||
|
||||
this.bipedLeftArm2 = new ModelRenderer(this, 30, 16);
|
||||
this.bipedLeftArm2.mirror = true;
|
||||
this.bipedLeftArm2.addBox(-1F, -1.5F, -1.5F, 3, 3, 3, f + 0.75F);
|
||||
this.bipedLeftArm2.setRotationPoint(5F, 1.5F + f1, 0.0F);
|
||||
|
||||
this.bipedRightLeg = new ModelRenderer(this, 0, 16);
|
||||
this.bipedRightLeg.addBox(-2F, 0.0F, -1.5F, 3, 12, 3, f);
|
||||
this.bipedRightLeg.setRotationPoint(-1F, 12F + f1, 0.0F);
|
||||
|
||||
this.bipedLeftLeg = new ModelRenderer(this, 0, 16);
|
||||
this.bipedLeftLeg.mirror = true;
|
||||
this.bipedLeftLeg.addBox(-2F, 0.0F, -1.5F, 3, 12, 3, f);
|
||||
this.bipedLeftLeg.setRotationPoint(2.0F, 12F + f1, 0.0F);
|
||||
|
||||
this.sword = new ModelRenderer[swordParts];
|
||||
this.sword[0] = new ModelRenderer(this, 9, 16);
|
||||
this.sword[0].addBox(-2.5F, 8F, 1.5F, 2, 2, 1, f);
|
||||
this.sword[0].setRotationPoint(-4F, 1.5F + f1, 0.0F);
|
||||
|
||||
this.sword[1] = new ModelRenderer(this, 32, 10);
|
||||
this.sword[1].addBox(-3F, 6.5F, -2.75F, 3, 5, 1, f + 0.5F);
|
||||
this.sword[1].setRotationPoint(-4F, 1.5F + f1, 0.0F);
|
||||
|
||||
this.sword[2] = new ModelRenderer(this, 42, 18);
|
||||
this.sword[2].addBox(-2F, 7.5F, -12.5F, 1, 3, 10, f);
|
||||
this.sword[2].setRotationPoint(-4F, 1.5F + f1, 0.0F);
|
||||
|
||||
this.sword[3] = new ModelRenderer(this, 42, 18);
|
||||
this.sword[3].addBox(-2F, 7.5F, -22.5F, 1, 3, 10, f);
|
||||
this.sword[3].setRotationPoint(-4F, 1.5F + f1, 0.0F);
|
||||
|
||||
this.sword[4] = new ModelRenderer(this, 28, 17);
|
||||
this.sword[4].addBox(-2F, 8.5F, -23.5F, 1, 1, 1, f);
|
||||
this.sword[4].setRotationPoint(-4F, 1.5F + f1, 0.0F);
|
||||
|
||||
this.wingLeft = new ModelRenderer(this, 24, 31);
|
||||
this.wingLeft.addBox(0F, -4.5F, 0F, 19, 8, 1, f);
|
||||
this.wingLeft.setRotationPoint(0.5F, 4.5F + f1, 2.625F);
|
||||
|
||||
this.wingRight = new ModelRenderer(this, 24, 31);
|
||||
this.wingRight.mirror = true;
|
||||
this.wingRight.addBox(-19F, -4.5F, 0F, 19, 8, 1, f);
|
||||
this.wingRight.setRotationPoint(-0.5F, 4.5F + f1, 2.625F);
|
||||
|
||||
this.skirt = new ModelRenderer[skirtParts];
|
||||
this.skirt[0] = new ModelRenderer(this, 0, 0);
|
||||
this.skirt[0].addBox(0F, 0F, -1F, 3, 6, 1, f);
|
||||
this.skirt[0].setRotationPoint(-3F, 9F + f1, -1.5F);
|
||||
|
||||
this.skirt[1] = new ModelRenderer(this, 0, 0);
|
||||
this.skirt[1].addBox(0F, 0F, -1F, 3, 6, 1, f);
|
||||
this.skirt[1].setRotationPoint(0F, 9F + f1, -1.5F);
|
||||
|
||||
this.skirt[2] = new ModelRenderer(this, 0, 0);
|
||||
this.skirt[2].addBox(0F, 0F, 0F, 3, 6, 1, f);
|
||||
this.skirt[2].setRotationPoint(-3F, 9F + f1, 1.5F);
|
||||
|
||||
this.skirt[3] = new ModelRenderer(this, 0, 0);
|
||||
this.skirt[3].addBox(0F, 0F, 0F, 3, 6, 1, f);
|
||||
this.skirt[3].setRotationPoint(0F, 9F + f1, 1.5F);
|
||||
|
||||
this.skirt[4] = new ModelRenderer(this, 55, 19);
|
||||
this.skirt[4].addBox(-1F, 0F, 0F, 1, 6, 3, f);
|
||||
this.skirt[4].setRotationPoint(-3F, 9F + f1, -1.5F);
|
||||
|
||||
this.skirt[5] = new ModelRenderer(this, 55, 19);
|
||||
this.skirt[5].addBox(0F, 0F, 0F, 1, 6, 3, f);
|
||||
this.skirt[5].setRotationPoint(3F, 9F + f1, -1.5F);
|
||||
|
||||
this.strand = new ModelRenderer[strandParts];
|
||||
|
||||
for(int i = 0; i < strandParts; i++)
|
||||
{
|
||||
this.strand[i] = new ModelRenderer(this, 42 + (i % 7), 17);
|
||||
}
|
||||
|
||||
this.strand[0].addBox(-5F, -7F, -4F, 1, 3, 1, f);
|
||||
this.strand[0].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[1].addBox(4F, -7F, -4F, 1, 3, 1, f);
|
||||
this.strand[1].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[2].addBox(-5F, -7F, -3F, 1, 4, 1, f);
|
||||
this.strand[2].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[3].addBox(4F, -7F, -3F, 1, 4, 1, f);
|
||||
this.strand[3].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[4].addBox(-5F, -7F, -2F, 1, 4, 1, f);
|
||||
this.strand[4].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[5].addBox(4F, -7F, -2F, 1, 4, 1, f);
|
||||
this.strand[5].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[6].addBox(-5F, -7F, -1F, 1, 5, 1, f);
|
||||
this.strand[6].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[7].addBox(4F, -7F, -1F, 1, 5, 1, f);
|
||||
this.strand[7].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[8].addBox(-5F, -7F, 0.0F, 1, 5, 1, f);
|
||||
this.strand[8].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[9].addBox(4F, -7F, 0.0F, 1, 5, 1, f);
|
||||
this.strand[9].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[10].addBox(-5F, -7F, 1.0F, 1, 6, 1, f);
|
||||
this.strand[10].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[11].addBox(4F, -7F, 1.0F, 1, 6, 1, f);
|
||||
this.strand[11].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[12].addBox(-5F, -7F, 2.0F, 1, 7, 1, f);
|
||||
this.strand[12].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[13].addBox(4F, -7F, 2.0F, 1, 7, 1, f);
|
||||
this.strand[13].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[14].addBox(-5F, -7F, 3F, 1, 8, 1, f);
|
||||
this.strand[14].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[15].addBox(4F, -7F, 3F, 1, 8, 1, f);
|
||||
this.strand[15].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[16].addBox(-4F, -7F, 4F, 1, 9, 1, f);
|
||||
this.strand[16].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[17].addBox(3F, -7F, 4F, 1, 9, 1, f);
|
||||
this.strand[17].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[18] = new ModelRenderer(this, 42, 17);
|
||||
this.strand[18].addBox(-3F, -7F, 4F, 3, 10, 1, f);
|
||||
this.strand[18].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[19] = new ModelRenderer(this, 43, 17);
|
||||
this.strand[19].addBox(0.0F, -7F, 4F, 3, 10, 1, f);
|
||||
this.strand[19].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[20].addBox(-1F, -7F, -5F, 1, 2, 1, f);
|
||||
this.strand[20].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.strand[21].addBox(0.0F, -7F, -5F, 1, 3, 1, f);
|
||||
this.strand[21].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.halo = new ModelRenderer[haloParts];
|
||||
this.halo[0] = new ModelRenderer(this, 43, 9);
|
||||
this.halo[0].addBox(-2.5F, -11F, -3.5F, 5, 1, 1, f);
|
||||
this.halo[0].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.halo[1] = new ModelRenderer(this, 43, 9);
|
||||
this.halo[1].addBox(-2.5F, -11F, 2.5F, 5, 1, 1, f);
|
||||
this.halo[1].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.halo[2] = new ModelRenderer(this, 42, 11);
|
||||
this.halo[2].addBox(-3.5F, -11F, -2.5F, 1, 1, 5, f);
|
||||
this.halo[2].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
this.halo[3] = new ModelRenderer(this, 42, 11);
|
||||
this.halo[3].addBox(2.5F, -11F, -2.5F, 1, 1, 5, f);
|
||||
this.halo[3].setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
this.bipedHead.render(scale);
|
||||
this.bipedBody.render(scale);
|
||||
this.bipedRightArm.render(scale);
|
||||
this.bipedLeftArm.render(scale);
|
||||
this.bipedRightLeg.render(scale);
|
||||
this.bipedLeftLeg.render(scale);
|
||||
|
||||
this.bipedBody2.render(scale);
|
||||
this.bipedRightArm2.render(scale);
|
||||
this.bipedLeftArm2.render(scale);
|
||||
this.wingLeft.render(scale);
|
||||
this.wingRight.render(scale);
|
||||
|
||||
for(int i = 0; i < swordParts; i++)
|
||||
{
|
||||
this.sword[i].render(scale);
|
||||
}
|
||||
for(int i = 0; i < skirtParts; i++)
|
||||
{
|
||||
this.skirt[i].render(scale);
|
||||
}
|
||||
for(int i = 0; i < strandParts; i++)
|
||||
{
|
||||
this.strand[i].render(scale);
|
||||
}
|
||||
|
||||
if(halow)
|
||||
{
|
||||
GL11.glEnable(GL11.GL_NORMALIZE);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
|
||||
for(int i = 0; i < haloParts; i++)
|
||||
{
|
||||
this.halo[i].render(scale);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
this.bipedHead.rotateAngleY = netHeadYaw / 57.29578F;
|
||||
this.bipedHead.rotateAngleX = headPitch / 57.29578F;
|
||||
|
||||
this.bipedRightArm.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + 3.141593F) * 2.0F * limbSwingAmount * 0.5F;
|
||||
this.bipedLeftArm.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 2.0F * limbSwingAmount * 0.5F;
|
||||
this.bipedRightArm.rotateAngleZ = 0.05F;
|
||||
this.bipedLeftArm.rotateAngleZ = -0.05F;
|
||||
this.bipedRightLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount;
|
||||
this.bipedLeftLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + 3.141593F) * 1.4F * limbSwingAmount;
|
||||
this.bipedRightLeg.rotateAngleY = 0.0F;
|
||||
this.bipedLeftLeg.rotateAngleY = 0.0F;
|
||||
|
||||
for(int i = 0; i < strandParts; i++)
|
||||
{
|
||||
this.strand[i].rotateAngleY = this.bipedHead.rotateAngleY;
|
||||
this.strand[i].rotateAngleX = this.bipedHead.rotateAngleX;
|
||||
}
|
||||
|
||||
for(int i = 0; i < haloParts; i++)
|
||||
{
|
||||
this.halo[i].rotateAngleY = this.bipedHead.rotateAngleY;
|
||||
this.halo[i].rotateAngleX = this.bipedHead.rotateAngleX;
|
||||
}
|
||||
|
||||
if(this.isRiding)
|
||||
{
|
||||
this.bipedRightArm.rotateAngleX += -0.6283185F;
|
||||
this.bipedLeftArm.rotateAngleX += -0.6283185F;
|
||||
this.bipedRightLeg.rotateAngleX = -1.256637F;
|
||||
this.bipedLeftLeg.rotateAngleX = -1.256637F;
|
||||
this.bipedRightLeg.rotateAngleY = 0.3141593F;
|
||||
this.bipedLeftLeg.rotateAngleY = -0.3141593F;
|
||||
}
|
||||
|
||||
this.bipedRightArm.rotateAngleY = 0.0F;
|
||||
this.bipedLeftArm.rotateAngleY = 0.0F;
|
||||
|
||||
if(this.swingProgress > -9990F)
|
||||
{
|
||||
float f6 = swingProgress;
|
||||
this.bipedBody2.rotateAngleY = this.bipedBody.rotateAngleY = MathHelper.sin(MathHelper.sqrt_float(f6) * 3.141593F * 2.0F) * 0.2F;
|
||||
this.bipedRightArm.rotateAngleY += this.bipedBody.rotateAngleY;
|
||||
this.bipedLeftArm.rotateAngleY += this.bipedBody.rotateAngleY;
|
||||
this.bipedLeftArm.rotateAngleX += this.bipedBody.rotateAngleY;
|
||||
f6 = 1.0F - this.swingProgress;
|
||||
f6 *= f6;
|
||||
f6 *= f6;
|
||||
f6 = 1.0F - f6;
|
||||
float f7 = MathHelper.sin(f6 * 3.141593F);
|
||||
float f8 = MathHelper.sin(this.swingProgress * 3.141593F) * -(this.bipedHead.rotateAngleX - 0.7F) * 0.75F;
|
||||
this.bipedRightArm.rotateAngleX -= (double)f7 * 1.2D + (double)f8;
|
||||
this.bipedRightArm.rotateAngleY += this.bipedBody.rotateAngleY * 2.0F;
|
||||
this.bipedRightArm.rotateAngleZ = MathHelper.sin(this.swingProgress * 3.141593F) * -0.4F;
|
||||
}
|
||||
|
||||
this.bipedRightArm.rotateAngleZ += MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedRightArm.rotateAngleX += MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
|
||||
this.bipedLeftArm.rotateAngleX -= MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
|
||||
|
||||
for(int i = 0; i < swordParts; i++)
|
||||
{
|
||||
this.sword[i].rotateAngleZ = this.bipedRightArm.rotateAngleZ;
|
||||
this.sword[i].rotateAngleY = this.bipedRightArm.rotateAngleY;
|
||||
this.sword[i].rotateAngleX = this.bipedRightArm.rotateAngleX;
|
||||
}
|
||||
|
||||
this.bipedRightArm2.rotateAngleZ = this.bipedRightArm.rotateAngleZ;
|
||||
this.bipedRightArm2.rotateAngleY = this.bipedRightArm.rotateAngleY;
|
||||
this.bipedRightArm2.rotateAngleX = this.bipedRightArm.rotateAngleX;
|
||||
this.bipedLeftArm2.rotateAngleZ = this.bipedLeftArm.rotateAngleZ;
|
||||
this.bipedLeftArm2.rotateAngleX = this.bipedLeftArm.rotateAngleX;
|
||||
|
||||
this.wingLeft.rotateAngleY = -0.2F;
|
||||
this.wingRight.rotateAngleY = 0.2F;
|
||||
this.wingLeft.rotateAngleZ = -0.125F;
|
||||
this.wingRight.rotateAngleZ = 0.125F;
|
||||
|
||||
this.wingLeft.rotateAngleY += Math.sin(this.sinage) / 6F;
|
||||
this.wingRight.rotateAngleY -= Math.sin(this.sinage) / 6F;
|
||||
this.wingLeft.rotateAngleZ += Math.cos(this.sinage) / (this.gonRound ? 8F : 3F);
|
||||
this.wingRight.rotateAngleZ -= Math.cos(this.sinage) / (this.gonRound ? 8F : 3F);
|
||||
|
||||
this.skirt[0].rotateAngleX = -0.2F;
|
||||
this.skirt[1].rotateAngleX = -0.2F;
|
||||
this.skirt[2].rotateAngleX = 0.2F;
|
||||
this.skirt[3].rotateAngleX = 0.2F;
|
||||
this.skirt[4].rotateAngleZ = 0.2F;
|
||||
this.skirt[5].rotateAngleZ = -0.2F;
|
||||
|
||||
if(this.bipedLeftLeg.rotateAngleX < -0.3F)
|
||||
{
|
||||
this.skirt[1].rotateAngleX += (this.bipedLeftLeg.rotateAngleX + 0.3F);
|
||||
this.skirt[2].rotateAngleX -= (this.bipedLeftLeg.rotateAngleX + 0.3F);
|
||||
}
|
||||
|
||||
if(this.bipedLeftLeg.rotateAngleX > 0.3F)
|
||||
{
|
||||
this.skirt[3].rotateAngleX += (this.bipedLeftLeg.rotateAngleX - 0.3F);
|
||||
this.skirt[0].rotateAngleX -= (this.bipedLeftLeg.rotateAngleX - 0.3F);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,165 @@
|
|||
package com.legacy.aether.client.models.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ZephyrModel extends ModelBase
|
||||
{
|
||||
|
||||
ModelRenderer LeftFace;
|
||||
ModelRenderer BodyRightSide2;
|
||||
ModelRenderer Mouth;
|
||||
ModelRenderer CloudButt;
|
||||
ModelRenderer Tail3;
|
||||
ModelRenderer RightFace;
|
||||
ModelRenderer BodyLeftSide1;
|
||||
ModelRenderer BodyLeftSide2;
|
||||
ModelRenderer Body;
|
||||
ModelRenderer BodyRightSide1;
|
||||
ModelRenderer Tail1;
|
||||
ModelRenderer Tail2;
|
||||
|
||||
public ZephyrModel()
|
||||
{
|
||||
this.textureWidth = 128;
|
||||
this.textureHeight = 32;
|
||||
|
||||
this.setTextureOffset("Tail1.tail1", 96, 22);
|
||||
this.setTextureOffset("Tail2.tail2", 80, 24);
|
||||
this.setTextureOffset("Tail3.tail3", 84, 18);
|
||||
|
||||
this.Tail1 = new ModelRenderer(this, "Tail1");
|
||||
this.Tail1.setRotationPoint(0F, 0F, 12.4F);
|
||||
this.Tail1.addBox("tail1",-2.5F, -2.5F, -2.5F, 5, 5, 5);
|
||||
|
||||
this.Tail2 = new ModelRenderer(this, "Tail2");
|
||||
this.Tail2.setRotationPoint(0, 0, 6);
|
||||
this.Tail2.addBox("tail2", -2F, -2F, -1.966667F, 4, 4, 4);
|
||||
|
||||
this.Tail3 = new ModelRenderer(this, "Tail3");
|
||||
this.Tail3.setRotationPoint(0, 0, 5);
|
||||
this.Tail3.addBox(-1.5F, -1.5F, -1.5F, 3, 3, 3);
|
||||
|
||||
this.Tail1.addChild(Tail2);
|
||||
this.Tail2.addChild(Tail3);
|
||||
|
||||
this.LeftFace = new ModelRenderer(this, 67, 11);
|
||||
this.LeftFace.addBox(3F, -1F, -9F, 4, 6, 2);
|
||||
this.LeftFace.setRotationPoint(0F, 8F, 0F);
|
||||
this.LeftFace.setTextureSize(128, 32);
|
||||
this.LeftFace.mirror = true;
|
||||
this.setRotation(LeftFace, 0F, 0F, 0F);
|
||||
|
||||
this.BodyRightSide2 = new ModelRenderer(this, 25, 11);
|
||||
this.BodyRightSide2.addBox(-2F, -3.333333F, -2.5F, 2, 6, 6);
|
||||
this.BodyRightSide2.setRotationPoint(-5.5F, 9F, 2F);
|
||||
this.BodyRightSide2.setTextureSize(128, 32);
|
||||
this.BodyRightSide2.mirror = true;
|
||||
this.setRotation(BodyRightSide2, 0F, 0F, 0F);
|
||||
this.BodyRightSide2.mirror = false;
|
||||
|
||||
this.Mouth = new ModelRenderer(this, 66, 19);
|
||||
this.Mouth.addBox(-3F, 1F, -8F, 6, 3, 1);
|
||||
this.Mouth.setRotationPoint(0F, 8F, 0F);
|
||||
this.Mouth.setTextureSize(128, 32);
|
||||
this.Mouth.mirror = true;
|
||||
this.setRotation(Mouth, 0F, 0F, 0F);
|
||||
|
||||
this.CloudButt = new ModelRenderer(this, 0, 0);
|
||||
this.CloudButt.addBox(-6F, -3F, 0F, 8, 6, 2);
|
||||
this.CloudButt.setRotationPoint(2F, 8F, 7F);
|
||||
this.CloudButt.setTextureSize(128, 32);
|
||||
this.CloudButt.mirror = true;
|
||||
this.setRotation(CloudButt, 0F, 0F, 0F);
|
||||
|
||||
this.RightFace = new ModelRenderer(this, 67, 11);
|
||||
this.RightFace.addBox(-7F, -1F, -9F, 4, 6, 2);
|
||||
this.RightFace.setRotationPoint(0F, 8F, 0F);
|
||||
this.RightFace.setTextureSize(128, 32);
|
||||
this.RightFace.mirror = true;
|
||||
this.setRotation(RightFace, 0F, 0F, 0F);
|
||||
this.RightFace.mirror = false;
|
||||
|
||||
this.BodyLeftSide1 = new ModelRenderer(this, 0, 20);
|
||||
this.BodyLeftSide1.addBox(0F, -3F, -3F, 2, 6, 6);
|
||||
this.BodyLeftSide1.setRotationPoint(6F, 8F, -4F);
|
||||
this.BodyLeftSide1.setTextureSize(128, 32);
|
||||
this.BodyLeftSide1.mirror = true;
|
||||
this.setRotation(BodyLeftSide1, 0F, 0F, 0F);
|
||||
|
||||
this.BodyLeftSide2 = new ModelRenderer(this, 25, 11);
|
||||
this.BodyLeftSide2.addBox(0F, -3.333333F, -2.5F, 2, 6, 6);
|
||||
this.BodyLeftSide2.setRotationPoint(5.5F, 9F, 2F);
|
||||
this.BodyLeftSide2.setTextureSize(128, 32);
|
||||
this.BodyLeftSide2.mirror = true;
|
||||
this.setRotation(BodyLeftSide2, 0F, 0F, 0F);
|
||||
|
||||
this.Body = new ModelRenderer(this, 27, 9);
|
||||
this.Body.addBox(-6F, -4F, -7F, 12, 9, 14);
|
||||
this.Body.setRotationPoint(0F, 8F, 0F);
|
||||
this.Body.setTextureSize(128, 32);
|
||||
this.setRotation(Body, 0F, 0F, 0F);
|
||||
|
||||
this.BodyRightSide1 = new ModelRenderer(this, 0, 20);
|
||||
this.BodyRightSide1.addBox(-2F, -3F, -3F, 2, 6, 6);
|
||||
this.BodyRightSide1.setRotationPoint(-6F, 8F, -4F);
|
||||
this.BodyRightSide1.setTextureSize(128, 32);
|
||||
this.BodyRightSide1.mirror = true;
|
||||
this.setRotation(BodyRightSide1, 0F, 0F, 0F);
|
||||
this.BodyRightSide1.mirror = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
this.LeftFace.render(scale);
|
||||
this.BodyRightSide2.render(scale);
|
||||
this.Mouth.render(scale);
|
||||
this.CloudButt.render(scale);
|
||||
this.RightFace.render(scale);
|
||||
this.BodyLeftSide1.render(scale);
|
||||
this.BodyLeftSide2.render(scale);
|
||||
this.Body.render(scale);
|
||||
this.BodyRightSide1.render(scale);
|
||||
this.Tail1.render(scale);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
float motion = (float)(Math.sin(limbSwing * 20 / 57.2957795) * limbSwingAmount * .5F);
|
||||
|
||||
this.LeftFace.rotationPointY = motion + 8;
|
||||
this.LeftFace.rotationPointX = motion * 0.5F;
|
||||
|
||||
this.BodyLeftSide1.rotationPointY = 8 - motion * 0.5F;
|
||||
this.BodyLeftSide2.rotationPointY = 9 + motion * 0.5F;
|
||||
|
||||
this.RightFace.rotationPointY= 8 - motion;
|
||||
this.RightFace.rotationPointX = -motion * 0.5F;
|
||||
|
||||
this.BodyRightSide1.rotationPointY = 8 - motion * 0.5F;
|
||||
this.BodyRightSide2.rotationPointY = 9 + motion * 0.5F;
|
||||
|
||||
this.Tail1.rotationPointX = (float)(Math.sin(limbSwing * 20 / 57.2957795) * limbSwingAmount * 0.75F);
|
||||
|
||||
this.Tail1.rotateAngleY = (float)(Math.sin(limbSwing * 0.5F / 57.2957795) * limbSwingAmount * 0.75F);
|
||||
this.Tail1.rotationPointY = 8 - motion;
|
||||
|
||||
this.Tail2.rotationPointX = (float)(Math.sin(limbSwing * 15 / 57.2957795) * limbSwingAmount * 0.85F);
|
||||
this.Tail2.rotationPointY = motion * 1.25F;
|
||||
this.Tail2.rotateAngleY = this.Tail1.rotateAngleY + 0.25F;
|
||||
|
||||
this.Tail3.rotationPointX = (float)(Math.sin(limbSwing * 10 / 57.2957795) * limbSwingAmount * 0.95F);
|
||||
this.Tail3.rotationPointY =- motion;
|
||||
this.Tail3.rotateAngleY = this.Tail2.rotateAngleY + 0.35F;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,336 @@
|
|||
package com.legacy.aether.client.overlay;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.GlStateManager.DestFactor;
|
||||
import net.minecraft.client.renderer.GlStateManager.SourceFactor;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.server.blocks.BlocksAether;
|
||||
import com.legacy.aether.server.entities.bosses.slider.EntitySlider;
|
||||
import com.legacy.aether.server.entities.bosses.sun_spirit.EntitySunSpirit;
|
||||
import com.legacy.aether.server.entities.bosses.valkyrie_queen.EntityValkyrieQueen;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityMoa;
|
||||
import com.legacy.aether.server.items.ItemsAether;
|
||||
import com.legacy.aether.server.player.PlayerAether;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class AetherOverlay
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE_JUMPS = new ResourceLocation("aether_legacy", "textures/gui/jumps.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_COOLDOWN_BAR = new ResourceLocation("aether_legacy", "textures/gui/cooldown_bar.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_POISON_VIGNETTE = new ResourceLocation("aether_legacy", "textures/blur/poison_vignette.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_CURE_VIGNETTE = new ResourceLocation("aether_legacy", "textures/blur/cure_vignette.png");
|
||||
|
||||
public static void renderPoison(Minecraft mc)
|
||||
{
|
||||
PlayerAether playerAether = PlayerAether.get(mc.thePlayer);
|
||||
|
||||
if(playerAether.isPoisoned())
|
||||
{
|
||||
ScaledResolution scaledresolution = new ScaledResolution(mc);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer renderer = tessellator.getBuffer();
|
||||
|
||||
float alpha = getPoisonAlpha((float)(playerAether.poisonInstance().poisonTime % 50) / 50F);
|
||||
|
||||
int width = scaledresolution.getScaledWidth();
|
||||
int height = scaledresolution.getScaledHeight();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(0.5F, 0.5F, 0.5F, alpha);
|
||||
GlStateManager.disableAlpha();
|
||||
|
||||
mc.renderEngine.bindTexture(TEXTURE_POISON_VIGNETTE);
|
||||
|
||||
renderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
renderer.pos(0.0D, (double)height, -90.0D).tex(0.0D, 1.0D).endVertex();
|
||||
renderer.pos((double)width, (double)height, -90.0D).tex(1.0D, 1.0D).endVertex();
|
||||
renderer.pos((double)width, 0.0D, -90.0D).tex(1.0D, 0.0D).endVertex();
|
||||
renderer.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 0.0D).endVertex();
|
||||
tessellator.draw();
|
||||
|
||||
GlStateManager.depthMask(true);
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, alpha);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public static void renderCure(Minecraft mc)
|
||||
{
|
||||
PlayerAether playerAether = PlayerAether.get(mc.thePlayer);
|
||||
|
||||
if(playerAether.isCured())
|
||||
{
|
||||
ScaledResolution scaledresolution = new ScaledResolution(mc);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer renderer = tessellator.getBuffer();
|
||||
|
||||
float alpha = getCureAlpha((-(float)playerAether.poisonInstance().poisonTime % 50)) / 100.0F;
|
||||
int width = scaledresolution.getScaledWidth();
|
||||
int height = scaledresolution.getScaledHeight();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(0.5F, 0.5F, 0.5F, alpha);
|
||||
GlStateManager.disableAlpha();
|
||||
|
||||
mc.renderEngine.bindTexture(TEXTURE_CURE_VIGNETTE);
|
||||
|
||||
renderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
renderer.pos(0.0D, (double)height, -90.0D).tex(0.0D, 1.0D).endVertex();
|
||||
renderer.pos((double)width, (double)height, -90.0D).tex(1.0D, 1.0D).endVertex();
|
||||
renderer.pos((double)width, 0.0D, -90.0D).tex(1.0D, 0.0D).endVertex();
|
||||
renderer.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 0.0D).endVertex();
|
||||
tessellator.draw();
|
||||
|
||||
GlStateManager.depthMask(true);
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, alpha);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public static void renderIronBubble(Minecraft mc)
|
||||
{
|
||||
ScaledResolution scaledresolution = new ScaledResolution(mc);
|
||||
|
||||
int width = scaledresolution.getScaledWidth();
|
||||
int height = scaledresolution.getScaledHeight();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.disableAlpha();
|
||||
|
||||
mc.renderEngine.bindTexture(Gui.ICONS);
|
||||
|
||||
int bubbleAmount = PlayerAether.get(mc.thePlayer).getAccessoryCount(ItemsAether.iron_bubble);
|
||||
|
||||
if (mc.playerController.shouldDrawHUD() && mc.thePlayer.isInWater() && mc.thePlayer.isInsideOfMaterial(Material.WATER))
|
||||
{
|
||||
for (int i = 0; i < bubbleAmount; ++i)
|
||||
{
|
||||
drawTexturedModalRect((width / 2 - 8 * i) + 81, height - 49, 16, 18, 9, 9);
|
||||
}
|
||||
}
|
||||
|
||||
GlStateManager.depthMask(true);
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public static void renderCooldown(Minecraft mc)
|
||||
{
|
||||
PlayerAether playerInfo = PlayerAether.get(mc.thePlayer);
|
||||
|
||||
if (playerInfo.getCooldown() != 0)
|
||||
{
|
||||
ScaledResolution scaledresolution = new ScaledResolution(mc);
|
||||
|
||||
int cooldownRemaining = (int) ((float) (playerInfo.getCooldown()) / (float) (playerInfo.getCooldownMax()) * 128F);
|
||||
int width = scaledresolution.getScaledWidth();
|
||||
|
||||
mc.fontRendererObj.drawStringWithShadow(playerInfo.getCooldownName() + " Cooldown", (width / 2) - (mc.fontRendererObj.getStringWidth(playerInfo.getCooldownName() + " Cooldown") / 2), 32, 0xffffffff);
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.disableAlpha();
|
||||
|
||||
mc.renderEngine.bindTexture(TEXTURE_COOLDOWN_BAR);
|
||||
|
||||
drawTexturedModalRect(width / 2 - 64, 42, 0, 8, 128, 8);
|
||||
|
||||
drawTexturedModalRect(width / 2 - 64, 42, 0, 0, cooldownRemaining, 8);
|
||||
|
||||
GlStateManager.depthMask(true);
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public static void renderJumps(Minecraft mc)
|
||||
{
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
|
||||
if (player == null || player.getRidingEntity() == null || !(player.getRidingEntity() instanceof EntityMoa))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ScaledResolution scaledresolution = new ScaledResolution(mc);
|
||||
|
||||
EntityMoa moa = (EntityMoa) (player.getRidingEntity());
|
||||
|
||||
int width = scaledresolution.getScaledWidth();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
mc.renderEngine.bindTexture(TEXTURE_JUMPS);
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
for (int jump = 0; jump < moa.getMaxJumps(); jump++)
|
||||
{
|
||||
int yPos = 18;
|
||||
int xPos = ((width / 2) + (jump * 8)) - (moa.getMaxJumps() * 8) / 2;
|
||||
|
||||
if (jump < moa.getRemainingJumps())
|
||||
{
|
||||
drawTexturedModalRect(xPos, yPos, 0, 0, 9, 11);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawTexturedModalRect(xPos, yPos, 10, 0, 9, 11);
|
||||
}
|
||||
}
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public static void renderPortal(float portalTime, int scaledWidth, int scaledHeight)
|
||||
{
|
||||
if (portalTime < 1.0F)
|
||||
{
|
||||
portalTime *= portalTime;
|
||||
portalTime *= portalTime;
|
||||
portalTime = portalTime * 0.8F + 0.2F;
|
||||
}
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_CONSTANT_ALPHA);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, portalTime);
|
||||
IBlockState portal = BlocksAether.aether_portal.getDefaultState();
|
||||
TextureAtlasSprite sprite = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture(portal);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("aether_legacy", "textures/blocks/aether_portal.png"));
|
||||
float f1 = sprite.getMinU();
|
||||
float f2 = sprite.getMinV();
|
||||
float f3 = sprite.getMaxU();
|
||||
float f4 = sprite.getMaxV();
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer renderer = tessellator.getBuffer();
|
||||
renderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
renderer.pos(0.0D, scaledHeight, -90.0D).tex(f1, f4).endVertex();
|
||||
renderer.pos(scaledWidth, scaledHeight, -90.0D).tex(f3, f4).endVertex();
|
||||
renderer.pos(scaledWidth, 0.0D, -90.0D).tex(f3, f2).endVertex();
|
||||
renderer.pos(0.0D, 0.0D, -90.0D).tex(f1, f2).endVertex();
|
||||
tessellator.draw();
|
||||
GlStateManager.depthMask(true);
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public static void renderBossHP(Minecraft mc)
|
||||
{
|
||||
PlayerAether player = PlayerAether.get(mc.thePlayer);
|
||||
|
||||
EntityLiving boss = (EntityLiving) player.getCurrentBoss();
|
||||
|
||||
if (player.getCurrentBoss() != null)
|
||||
{
|
||||
String bossTitle = "";
|
||||
ScaledResolution scaledresolution = new ScaledResolution(mc);
|
||||
|
||||
int healthRemaining = (int) (boss.getHealth() / boss.getMaxHealth() * 256F);
|
||||
int width = scaledresolution.getScaledWidth();
|
||||
|
||||
if (boss instanceof EntitySlider)
|
||||
{ bossTitle = ((EntitySlider)boss).getBossTitle(); }
|
||||
else if (boss instanceof EntityValkyrieQueen)
|
||||
{ bossTitle = ((EntityValkyrieQueen)boss).getBossTitle(); }
|
||||
else
|
||||
{ bossTitle = ((EntitySunSpirit)boss).getBossTitle(); }
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
mc.fontRendererObj.drawStringWithShadow(bossTitle, width / 2 - (mc.fontRendererObj.getStringWidth(bossTitle) / 2), 2, 0xffffffff);
|
||||
|
||||
mc.renderEngine.bindTexture(new ResourceLocation("aether_legacy", "textures/gui/boss_bar.png"));
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
drawTexturedModalRect(width / 2 - 128, 12, 0, 16, 256, 32);
|
||||
|
||||
drawTexturedModalRect(width/ 2 - 128, 12, 0, 0, healthRemaining, 16);
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public static void drawTexturedModalRect(float x, float y, float u, float v, float width, float height)
|
||||
{
|
||||
float zLevel = -90.0F;
|
||||
|
||||
float var7 = 0.00390625F;
|
||||
float var8 = 0.00390625F;
|
||||
Tessellator var9 = Tessellator.getInstance();
|
||||
VertexBuffer renderer = var9.getBuffer();
|
||||
renderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
renderer.pos((double) (x + 0), (double) (y + height), (double) zLevel).tex((double) ((float) (u + 0) * var7), (double) ((float) (v + height) * var8)).endVertex();
|
||||
renderer.pos((double) (x + width), (double) (y + height), (double) zLevel).tex((double) ((float) (u + width) * var7), (double) ((float) (v + height) * var8)).endVertex();
|
||||
renderer.pos((double) (x + width), (double) (y + 0), (double) zLevel).tex((double) ((float) (u + width) * var7), (double) ((float) (v + 0) * var8)).endVertex();
|
||||
renderer.pos((double) (x + 0), (double) (y + 0), (double) zLevel).tex((double) ((float) (u + 0) * var7), (double) ((float) (v + 0) * var8)).endVertex();
|
||||
var9.draw();
|
||||
}
|
||||
|
||||
public static float getPoisonAlpha(float f)
|
||||
{
|
||||
return f * f / 5.0F + 0.4F;
|
||||
}
|
||||
|
||||
public static float getCureAlpha(float f)
|
||||
{
|
||||
return f * f / 10.0F + 0.4F;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,153 @@
|
|||
package com.legacy.aether.client.renders;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelPlayer;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.factory.AechorPlantFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.AerbunnyFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.AerwhaleFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.CockatriceFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.DartFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.FireBallFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.FireMinionFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.FloatingBlockFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.FlyingCowFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.HammerProjectileFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.IceyBallFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.LightningKnifeFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.MimicFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.MiniCloudFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.MoaFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.ParachuteFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.PhoenixArrowFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.PhygFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.SentryFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.SheepuffFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.SliderFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.SunSpiritFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.SwetFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.TNTPresentFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.ThunderBallFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.ValkyrieFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.ValkyrieQueenFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.ZephyrFactory;
|
||||
import com.legacy.aether.client.renders.entities.factory.ZephyrSnowballFactory;
|
||||
import com.legacy.aether.client.renders.entities.layer.AccessoriesLayer;
|
||||
import com.legacy.aether.server.blocks.BlocksAether;
|
||||
import com.legacy.aether.server.entities.block.EntityFloatingBlock;
|
||||
import com.legacy.aether.server.entities.block.EntityTNTPresent;
|
||||
import com.legacy.aether.server.entities.bosses.EntityFireMinion;
|
||||
import com.legacy.aether.server.entities.bosses.EntityValkyrie;
|
||||
import com.legacy.aether.server.entities.bosses.slider.EntitySlider;
|
||||
import com.legacy.aether.server.entities.bosses.sun_spirit.EntitySunSpirit;
|
||||
import com.legacy.aether.server.entities.bosses.valkyrie_queen.EntityValkyrieQueen;
|
||||
import com.legacy.aether.server.entities.hostile.EntityAechorPlant;
|
||||
import com.legacy.aether.server.entities.hostile.EntityCockatrice;
|
||||
import com.legacy.aether.server.entities.hostile.EntityMimic;
|
||||
import com.legacy.aether.server.entities.hostile.EntitySentry;
|
||||
import com.legacy.aether.server.entities.hostile.EntityZephyr;
|
||||
import com.legacy.aether.server.entities.passive.EntityAerwhale;
|
||||
import com.legacy.aether.server.entities.passive.EntityMiniCloud;
|
||||
import com.legacy.aether.server.entities.passive.EntitySheepuff;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityAerbunny;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityFlyingCow;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityMoa;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityParachute;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityPhyg;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntitySwet;
|
||||
import com.legacy.aether.server.entities.projectile.EntityHammerProjectile;
|
||||
import com.legacy.aether.server.entities.projectile.EntityLightningKnife;
|
||||
import com.legacy.aether.server.entities.projectile.EntityPhoenixArrow;
|
||||
import com.legacy.aether.server.entities.projectile.EntityPoisonNeedle;
|
||||
import com.legacy.aether.server.entities.projectile.EntityZephyrSnowball;
|
||||
import com.legacy.aether.server.entities.projectile.crystals.EntityFireBall;
|
||||
import com.legacy.aether.server.entities.projectile.crystals.EntityIceyBall;
|
||||
import com.legacy.aether.server.entities.projectile.crystals.EntityThunderBall;
|
||||
import com.legacy.aether.server.entities.projectile.darts.EntityDartEnchanted;
|
||||
import com.legacy.aether.server.entities.projectile.darts.EntityDartGolden;
|
||||
import com.legacy.aether.server.entities.projectile.darts.EntityDartPoison;
|
||||
import com.legacy.aether.server.tile_entities.TileEntityChestMimic;
|
||||
import com.legacy.aether.server.tile_entities.TileEntityTreasureChest;
|
||||
|
||||
public class AetherEntityRenderingRegistry
|
||||
{
|
||||
|
||||
public static void initialize()
|
||||
{
|
||||
/* Misc */
|
||||
register(EntityHammerProjectile.class, new HammerProjectileFactory());
|
||||
register(EntityFloatingBlock.class, new FloatingBlockFactory());
|
||||
register(EntityParachute.class, new ParachuteFactory());
|
||||
register(EntityZephyrSnowball.class, new ZephyrSnowballFactory());
|
||||
register(EntityPhoenixArrow.class, new PhoenixArrowFactory());
|
||||
register(EntityLightningKnife.class, new LightningKnifeFactory());
|
||||
|
||||
/* Darts */
|
||||
register(EntityDartEnchanted.class, new DartFactory<EntityDartEnchanted>());
|
||||
register(EntityPoisonNeedle.class, new DartFactory<EntityPoisonNeedle>());
|
||||
register(EntityDartGolden.class, new DartFactory<EntityDartGolden>());
|
||||
register(EntityDartPoison.class, new DartFactory<EntityDartPoison>());
|
||||
|
||||
/* Crystals */
|
||||
register(EntityFireBall.class, new FireBallFactory());
|
||||
register(EntityIceyBall.class, new IceyBallFactory());
|
||||
register(EntityThunderBall.class, new ThunderBallFactory());
|
||||
|
||||
/* Bosses */
|
||||
register(EntitySlider.class, new SliderFactory());
|
||||
register(EntityValkyrieQueen.class, new ValkyrieQueenFactory());
|
||||
register(EntitySunSpirit.class, new SunSpiritFactory());
|
||||
|
||||
/* Hostile */
|
||||
register(EntityMimic.class, new MimicFactory());
|
||||
register(EntitySentry.class, new SentryFactory());
|
||||
register(EntityAechorPlant.class, new AechorPlantFactory());
|
||||
register(EntityFireMinion.class, new FireMinionFactory());
|
||||
register(EntityZephyr.class, new ZephyrFactory());
|
||||
register(EntityValkyrie.class, new ValkyrieFactory());
|
||||
register(EntityCockatrice.class, new CockatriceFactory());
|
||||
|
||||
/* Passive */
|
||||
register(EntityMoa.class, new MoaFactory());
|
||||
register(EntityPhyg.class, new PhygFactory());
|
||||
register(EntityFlyingCow.class, new FlyingCowFactory());
|
||||
register(EntitySheepuff.class, new SheepuffFactory());
|
||||
register(EntityAerwhale.class, new AerwhaleFactory());
|
||||
register(EntityAerbunny.class, new AerbunnyFactory());
|
||||
register(EntitySwet.class, new SwetFactory());
|
||||
register(EntityMiniCloud.class, new MiniCloudFactory());
|
||||
register(EntityTNTPresent.class, new TNTPresentFactory());
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void registerTileEntities()
|
||||
{
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTreasureChest.class, new TreasureChestRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChestMimic.class, new ChestMimicRenderer());
|
||||
|
||||
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlocksAether.treasure_chest), 0, TileEntityTreasureChest.class);
|
||||
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlocksAether.chest_mimic), 0, TileEntityChestMimic.class);
|
||||
}
|
||||
|
||||
public static void initializePlayerLayers()
|
||||
{
|
||||
RenderPlayer slim_render = Minecraft.getMinecraft().getRenderManager().getSkinMap().get("slim");
|
||||
slim_render.addLayer(new AccessoriesLayer(true, (ModelPlayer) slim_render.getMainModel()));
|
||||
|
||||
RenderPlayer default_render = Minecraft.getMinecraft().getRenderManager().getSkinMap().get("default");
|
||||
default_render.addLayer(new AccessoriesLayer(false, (ModelPlayer) default_render.getMainModel()));
|
||||
}
|
||||
|
||||
public static <ENTITY extends Entity> void register(Class<ENTITY> classes, IRenderFactory<? super ENTITY> factory)
|
||||
{
|
||||
RenderingRegistry.registerEntityRenderingHandler(classes, factory);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.legacy.aether.client.renders;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityChestRenderer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
|
||||
import com.legacy.aether.server.tile_entities.TileEntityChestMimic;
|
||||
|
||||
public class ChestMimicRenderer extends TileEntityChestRenderer
|
||||
{
|
||||
|
||||
public void renderTileEntityAt(TileEntityChest te, double x, double y, double z, float partialTicks, int destroyStage)
|
||||
{
|
||||
if (te == null)
|
||||
{
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileEntityChestMimic(), 0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
super.renderTileEntityAt(te, x, y, z, partialTicks, destroyStage);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
package com.legacy.aether.client.renders;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.model.ModelChest;
|
||||
import net.minecraft.client.model.ModelLargeChest;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.legacy.aether.server.blocks.dungeon.BlockTreasureChest;
|
||||
import com.legacy.aether.server.tile_entities.TileEntityTreasureChest;
|
||||
|
||||
public class TreasureChestRenderer extends TileEntitySpecialRenderer<TileEntityTreasureChest>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE_DOUBLE = new ResourceLocation("aether_legacy", "textures/tile_entities/treasure_chest_large.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_SINGLE = new ResourceLocation("aether_legacy", "textures/tile_entities/treasure_chest.png");
|
||||
|
||||
private final ModelChest chestModel = new ModelChest();
|
||||
|
||||
private final ModelChest largeChestModel = new ModelLargeChest();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(@Nullable TileEntityTreasureChest par1TileEntityChest, double posX, double posZ, double par7, float par8, int p_180535_9_)
|
||||
{
|
||||
int var9;
|
||||
|
||||
if (par1TileEntityChest == null)
|
||||
{
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileEntityTreasureChest(), 0.0, 0.0, 0.0, 0f);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!par1TileEntityChest.hasWorldObj())
|
||||
{
|
||||
var9 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Block var10 = par1TileEntityChest.getBlockType();
|
||||
var9 = par1TileEntityChest.getBlockMetadata();
|
||||
|
||||
if (var10 != null && var10 instanceof BlockTreasureChest)
|
||||
{
|
||||
((BlockTreasureChest) var10).checkForSurroundingChests(par1TileEntityChest.getWorld(), par1TileEntityChest.getPos(), par1TileEntityChest.getWorld().getBlockState(par1TileEntityChest.getPos()));
|
||||
var9 = par1TileEntityChest.getBlockMetadata();
|
||||
}
|
||||
|
||||
par1TileEntityChest.checkForAdjacentChests();
|
||||
}
|
||||
|
||||
if (par1TileEntityChest.adjacentChestZNeg == null && par1TileEntityChest.adjacentChestXNeg == null)
|
||||
{
|
||||
ModelChest var14;
|
||||
|
||||
if (par1TileEntityChest.adjacentChestXPos == null && par1TileEntityChest.adjacentChestZPos == null)
|
||||
{
|
||||
var14 = this.chestModel;
|
||||
this.bindTexture(TEXTURE_SINGLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
var14 = this.largeChestModel;
|
||||
this.bindTexture(TEXTURE_DOUBLE);
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glTranslatef((float) posX, (float) posZ + 1.0F, (float) par7 + 1.0F);
|
||||
GL11.glScalef(1.0F, -1.0F, -1.0F);
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
short var11 = 0;
|
||||
|
||||
if (var9 == 2)
|
||||
{
|
||||
var11 = 180;
|
||||
}
|
||||
|
||||
if (var9 == 3)
|
||||
{
|
||||
var11 = 0;
|
||||
}
|
||||
|
||||
if (var9 == 4)
|
||||
{
|
||||
var11 = 90;
|
||||
}
|
||||
|
||||
if (var9 == 5)
|
||||
{
|
||||
var11 = -90;
|
||||
}
|
||||
|
||||
if (var9 == 2 && par1TileEntityChest.adjacentChestXPos != null)
|
||||
{
|
||||
GL11.glTranslatef(1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (var9 == 5 && par1TileEntityChest.adjacentChestZPos != null)
|
||||
{
|
||||
GL11.glTranslatef(0.0F, 0.0F, -1.0F);
|
||||
}
|
||||
|
||||
GL11.glRotatef(var11, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
float var12 = par1TileEntityChest.prevLidAngle + (par1TileEntityChest.lidAngle - par1TileEntityChest.prevLidAngle) * par8;
|
||||
float var13;
|
||||
|
||||
if (par1TileEntityChest.adjacentChestZNeg != null)
|
||||
{
|
||||
var13 = par1TileEntityChest.adjacentChestZNeg.prevLidAngle + (par1TileEntityChest.adjacentChestZNeg.lidAngle - par1TileEntityChest.adjacentChestZNeg.prevLidAngle) * par8;
|
||||
|
||||
if (var13 > var12)
|
||||
{
|
||||
var12 = var13;
|
||||
}
|
||||
}
|
||||
|
||||
if (par1TileEntityChest.adjacentChestXNeg != null)
|
||||
{
|
||||
var13 = par1TileEntityChest.adjacentChestXNeg.prevLidAngle + (par1TileEntityChest.adjacentChestXNeg.lidAngle - par1TileEntityChest.adjacentChestXNeg.prevLidAngle) * par8;
|
||||
|
||||
if (var13 > var12)
|
||||
{
|
||||
var12 = var13;
|
||||
}
|
||||
}
|
||||
|
||||
var12 = 1.0F - var12;
|
||||
var12 = 1.0F - var12 * var12 * var12;
|
||||
var14.chestLid.rotateAngleX = -(var12 * (float) Math.PI / 2.0F);
|
||||
var14.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,159 @@
|
|||
package com.legacy.aether.client.renders.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.renders.AetherEntityRenderingRegistry;
|
||||
import com.legacy.aether.server.Aether;
|
||||
import com.legacy.aether.server.blocks.BlocksAether;
|
||||
import com.legacy.aether.server.blocks.util.EnumCloudType;
|
||||
import com.legacy.aether.server.blocks.util.EnumCrystalType;
|
||||
import com.legacy.aether.server.blocks.util.EnumHolidayType;
|
||||
import com.legacy.aether.server.blocks.util.EnumLeafType;
|
||||
import com.legacy.aether.server.blocks.util.EnumLogType;
|
||||
import com.legacy.aether.server.blocks.util.EnumStoneType;
|
||||
|
||||
public class BlockRendering
|
||||
{
|
||||
|
||||
public static void initialize()
|
||||
{
|
||||
register(BlocksAether.aether_grass, "aether_grass");
|
||||
register(BlocksAether.aether_dirt, "aether_dirt");
|
||||
register(BlocksAether.holystone, "holystone");
|
||||
register(BlocksAether.mossy_holystone, "mossy_holystone");
|
||||
register(BlocksAether.quicksoil, "quicksoil");
|
||||
register(BlocksAether.ambrosium_ore, "ambrosium_ore");
|
||||
register(BlocksAether.enchanted_aether_grass, "enchanted_aether_grass");
|
||||
register(BlocksAether.holystone_brick, "holystone_brick");
|
||||
register(BlocksAether.icestone, "icestone");
|
||||
register(BlocksAether.zanite_ore, "zanite_ore");
|
||||
register(BlocksAether.gravitite_ore, "gravitite_ore");
|
||||
register(BlocksAether.skyroot_plank, "skyroot_plank");
|
||||
register(BlocksAether.quicksoil_glass, "quicksoil_glass");
|
||||
register(BlocksAether.aerogel, "aerogel");
|
||||
register(BlocksAether.enchanted_gravitite, "enchanted_gravitite");
|
||||
register(BlocksAether.zanite_block, "zanite_block");
|
||||
register(BlocksAether.enchanter, "enchanter");
|
||||
register(BlocksAether.freezer, "freezer");
|
||||
register(BlocksAether.incubator, "incubator");
|
||||
register(BlocksAether.aether_portal, "aether_portal");
|
||||
register(BlocksAether.ambrosium_torch, "ambrosium_torch");
|
||||
register(BlocksAether.berry_bush, "berry_bush");
|
||||
register(BlocksAether.berry_bush_stem, "berry_bush_stem");
|
||||
register(BlocksAether.white_flower, "white_flower");
|
||||
register(BlocksAether.purple_flower, "purple_flower");
|
||||
register(BlocksAether.skyroot_sapling, "skyroot_sapling");
|
||||
register(BlocksAether.golden_oak_sapling, "golden_oak_sapling");
|
||||
register(BlocksAether.treasure_chest, "treasure_chest");
|
||||
register(BlocksAether.chest_mimic, "chest_mimic");
|
||||
register(BlocksAether.present, "present");
|
||||
register(BlocksAether.pillar, "pillar");
|
||||
register(BlocksAether.pillar_top, "pillar_top");
|
||||
|
||||
register(BlocksAether.skyroot_fence, "skyroot_fence");
|
||||
register(BlocksAether.skyroot_fence_gate, "skyroot_fence_gate");
|
||||
|
||||
register(BlocksAether.carved_wall, "carved_wall");
|
||||
register(BlocksAether.angelic_wall, "angelic_wall");
|
||||
register(BlocksAether.hellfire_wall, "hellfire_wall");
|
||||
register(BlocksAether.holystone_brick_wall, "holystone_brick_wall");
|
||||
register(BlocksAether.mossy_holystone_wall, "mossy_holystone_wall");
|
||||
register(BlocksAether.holystone_wall, "holystone_wall");
|
||||
|
||||
register(BlocksAether.skyroot_stairs, "skyroot_stairs");
|
||||
register(BlocksAether.carved_stairs, "carved_stairs");
|
||||
register(BlocksAether.angelic_stairs, "angelic_stairs");
|
||||
register(BlocksAether.hellfire_stairs, "hellfire_stairs");
|
||||
register(BlocksAether.holystone_brick_stairs, "holystone_brick_stairs");
|
||||
register(BlocksAether.holystone_stairs, "holystone_stairs");
|
||||
register(BlocksAether.mossy_holystone_stairs, "mossy_holystone_stairs");
|
||||
|
||||
register(BlocksAether.skyroot_double_slab, "skyroot_double_slab");
|
||||
register(BlocksAether.carved_double_slab, "carved_double_slab");
|
||||
register(BlocksAether.angelic_double_slab, "angelic_double_slab");
|
||||
register(BlocksAether.hellfire_double_slab, "hellfire_double_slab");
|
||||
register(BlocksAether.holystone_double_slab, "holystone_double_slab");
|
||||
register(BlocksAether.mossy_holystone_double_slab, "mossy_holystone_double_slab");
|
||||
register(BlocksAether.holystone_brick_double_slab, "holystone_brick_double_slab");
|
||||
|
||||
register(BlocksAether.skyroot_slab, "skyroot_slab");
|
||||
register(BlocksAether.carved_slab, "carved_slab");
|
||||
register(BlocksAether.angelic_slab, "angelic_slab");
|
||||
register(BlocksAether.hellfire_slab, "hellfire_slab");
|
||||
register(BlocksAether.holystone_slab, "holystone_slab");
|
||||
register(BlocksAether.mossy_holystone_slab, "mossy_holystone_slab");
|
||||
register(BlocksAether.holystone_brick_slab, "holystone_brick_slab");
|
||||
|
||||
for (int meta = 0; meta < EnumCloudType.values().length; ++meta)
|
||||
{
|
||||
register(BlocksAether.aercloud, meta, EnumCloudType.getType(meta).getName());
|
||||
}
|
||||
|
||||
for (int meta = 0; meta < EnumLeafType.values().length; ++meta)
|
||||
{
|
||||
register(BlocksAether.aether_leaves, meta, EnumLeafType.getType(meta).getName());
|
||||
}
|
||||
|
||||
for (int meta = 0; meta < EnumCrystalType.values().length; ++meta)
|
||||
{
|
||||
register(BlocksAether.crystal_leaves, meta, EnumCrystalType.getType(meta).getName());
|
||||
}
|
||||
|
||||
for (int meta = 0; meta < EnumCrystalType.values().length; ++meta)
|
||||
{
|
||||
register(BlocksAether.holiday_leaves, meta, EnumHolidayType.getType(meta).getName());
|
||||
}
|
||||
|
||||
for (int meta = 0; meta < EnumLogType.values().length; ++meta)
|
||||
{
|
||||
register(BlocksAether.aether_log, meta, EnumLogType.getType(meta).getName());
|
||||
}
|
||||
|
||||
for (int meta = 0; meta < EnumStoneType.values().length; ++meta)
|
||||
{
|
||||
String name = EnumStoneType.getType(meta).getName();
|
||||
|
||||
register(BlocksAether.dungeon_block, meta, name);
|
||||
register(BlocksAether.locked_dungeon_block, meta, name);
|
||||
register(BlocksAether.dungeon_trap, meta, name);
|
||||
}
|
||||
|
||||
registerMetadata(BlocksAether.aercloud, Aether.locate("cold_aercloud"), Aether.locate("blue_aercloud"), Aether.locate("golden_aercloud"), Aether.locate("pink_aercloud"));
|
||||
registerMetadata(BlocksAether.aether_leaves, Aether.locate("green_leaves"), Aether.locate("golden_oak_leaves"));
|
||||
registerMetadata(BlocksAether.holiday_leaves, Aether.locate("holiday_leaves"), Aether.locate("decorated_holiday_leaves"));
|
||||
registerMetadata(BlocksAether.crystal_leaves, Aether.locate("crystal_leaves"), Aether.locate("crystal_fruit_leaves"));
|
||||
registerMetadata(BlocksAether.aether_log, Aether.locate("skyroot_log"), Aether.locate("golden_oak_log"));
|
||||
registerMetadata(BlocksAether.dungeon_block, Aether.locate("carved_stone"), Aether.locate("sentry_stone"), Aether.locate("angelic_stone"), Aether.locate("light_angelic_stone"), Aether.locate("hellfire_stone"), Aether.locate("light_hellfire_stone"));
|
||||
registerMetadata(BlocksAether.locked_dungeon_block, Aether.locate("carved_stone"), Aether.locate("sentry_stone"), Aether.locate("angelic_stone"), Aether.locate("light_angelic_stone"), Aether.locate("hellfire_stone"), Aether.locate("light_hellfire_stone"));
|
||||
registerMetadata(BlocksAether.dungeon_trap, Aether.locate("carved_stone"), Aether.locate("sentry_stone"), Aether.locate("angelic_stone"), Aether.locate("light_angelic_stone"), Aether.locate("hellfire_stone"), Aether.locate("light_hellfire_stone"));
|
||||
|
||||
AetherEntityRenderingRegistry.registerTileEntities();
|
||||
}
|
||||
|
||||
public static void register(Block block, String model)
|
||||
{
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(Aether.modAddress() + model, "inventory"));
|
||||
}
|
||||
|
||||
public static void register(Block block, ItemMeshDefinition definition)
|
||||
{
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), definition);
|
||||
}
|
||||
|
||||
public static void register(Block block, int meta, String model)
|
||||
{
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), meta, new ModelResourceLocation(Aether.modAddress() + model, "inventory"));
|
||||
}
|
||||
|
||||
public static void registerMetadata(Block block, ResourceLocation... model)
|
||||
{
|
||||
ModelBakery.registerItemVariants(Item.getItemFromBlock(block), model);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.client.models.entities.AechorPlantModel;
|
||||
import com.legacy.aether.server.entities.hostile.EntityAechorPlant;
|
||||
|
||||
public class AechorPlantRenderer extends RenderLiving<EntityAechorPlant>
|
||||
{
|
||||
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/entities/aechor_plant/aechor_plant.png");
|
||||
|
||||
public AechorPlantModel mode;
|
||||
|
||||
public AechorPlantRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager, new AechorPlantModel(), 0.3F);
|
||||
this.mode = (AechorPlantModel) this.mainModel;
|
||||
}
|
||||
|
||||
protected void preRenderCallback(EntityAechorPlant b1, float f)
|
||||
{
|
||||
float f1 = (float)Math.sin((double)b1.sinage);
|
||||
float f3;
|
||||
|
||||
if (b1.hurtTime > 0)
|
||||
{
|
||||
f1 *= 0.45F;
|
||||
f1 -= 0.125F;
|
||||
f3 = 1.75F + (float)Math.sin((double)(b1.sinage + 2.0F)) * 1.5F;
|
||||
}
|
||||
else
|
||||
{
|
||||
f1 *= 0.125F;
|
||||
f3 = 1.75F;
|
||||
}
|
||||
|
||||
this.mode.sinage = f1;
|
||||
this.mode.sinage2 = f3;
|
||||
float f2 = 0.625F + (float)b1.size / 6.0F;
|
||||
this.mode.size = f2;
|
||||
this.shadowSize = f2 - 0.25F;
|
||||
}
|
||||
|
||||
protected int a(EntityAechorPlant entityaechorplant, int i, float f)
|
||||
{
|
||||
if (i != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.325F);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
protected int shouldRenderPass(EntityAechorPlant entityliving, int i, float f)
|
||||
{
|
||||
return this.a(entityliving, i, f);
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(EntityAechorPlant entity)
|
||||
{
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.client.models.entities.AerbunnyModel;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityAerbunny;
|
||||
|
||||
public class AerbunnyRenderer extends RenderLiving<EntityAerbunny>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/entities/aerbunny/aerbunny.png");
|
||||
|
||||
public AerbunnyModel model;
|
||||
|
||||
public AerbunnyRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager, new AerbunnyModel(), 0.3F);
|
||||
this.model = (AerbunnyModel) this.getMainModel();
|
||||
}
|
||||
|
||||
protected void rotateAerbunny(EntityAerbunny entitybunny)
|
||||
{
|
||||
if (!entitybunny.onGround)
|
||||
{
|
||||
if (entitybunny.motionY > 0.5D)
|
||||
{
|
||||
GL11.glRotatef(15.0F, -1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
else if (entitybunny.motionY < -0.5D)
|
||||
{
|
||||
GL11.glRotatef(-15.0F, -1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glRotatef((float)(entitybunny.motionY * 30.0D), -1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
this.model.puffiness = (float)entitybunny.getPuffiness() / 10.0F;
|
||||
}
|
||||
|
||||
protected void preRenderCallback(EntityAerbunny entitybunny, float f)
|
||||
{
|
||||
this.rotateAerbunny(entitybunny);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityAerbunny entity)
|
||||
{
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.AerwhaleModel;
|
||||
import com.legacy.aether.server.entities.passive.EntityAerwhale;
|
||||
|
||||
public class AerwhaleRenderer extends Render<EntityAerwhale>
|
||||
{
|
||||
|
||||
private static final ResourceLocation AERWHALE_TEXTURE = new ResourceLocation("aether_legacy", "textures/entities/aerwhale/aerwhale.png");
|
||||
|
||||
private ModelBase model = new AerwhaleModel();
|
||||
|
||||
public AerwhaleRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(EntityAerwhale aerwhale, double x, double y, double z, float entityYaw, float partialTicks)
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
this.renderManager.renderEngine.bindTexture(AERWHALE_TEXTURE);
|
||||
GlStateManager.translate(x, y + 2.0D, z);
|
||||
GlStateManager.rotate(90.0F - aerwhale.rotationYaw, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(180.0F - aerwhale.rotationPitch, 1.0F, 0.0F, 0.0F);
|
||||
GlStateManager.scale(2.0F, 2.0F, 2.0F);
|
||||
this.model.render(aerwhale, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityAerwhale aerwhale)
|
||||
{
|
||||
return AERWHALE_TEXTURE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.client.models.entities.CockatriceModel;
|
||||
import com.legacy.aether.server.entities.hostile.EntityCockatrice;
|
||||
|
||||
public class CockatriceRenderer extends RenderLiving<EntityCockatrice>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/entities/cockatrice/cockatrice.png");
|
||||
|
||||
public CockatriceRenderer(RenderManager rendermanagerIn)
|
||||
{
|
||||
super(rendermanagerIn, new CockatriceModel(), 1.0F);
|
||||
}
|
||||
|
||||
protected float getWingRotation(EntityCockatrice cockatrice, float f)
|
||||
{
|
||||
float f1 = cockatrice.prevWingRotation + (cockatrice.wingRotation - cockatrice.prevWingRotation) * f;
|
||||
float f2 = cockatrice.prevDestPos + (cockatrice.destPos - cockatrice.prevDestPos) * f;
|
||||
|
||||
return (MathHelper.sin(f1) + 1.0F) * f2;
|
||||
}
|
||||
|
||||
protected float handleRotationFloat(EntityCockatrice cockatrice, float f)
|
||||
{
|
||||
return this.getWingRotation(cockatrice, f);
|
||||
}
|
||||
|
||||
protected void preRenderCallback(EntityCockatrice cockatrice, float f)
|
||||
{
|
||||
GL11.glScalef(1.8F, 1.8F, 1.8F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityCockatrice cockatrice)
|
||||
{
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderBiped;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.SunSpiritModel;
|
||||
import com.legacy.aether.server.entities.bosses.EntityFireMinion;
|
||||
|
||||
public class FireMinionRenderer extends RenderBiped<EntityFireMinion>
|
||||
{
|
||||
|
||||
private static final ResourceLocation SPIRIT = new ResourceLocation("aether_legacy", "textures/bosses/sun_spirit/sun_spirit.png");
|
||||
|
||||
public FireMinionRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager, new SunSpiritModel(0.0F, 0.0F), 0.4F);
|
||||
this.shadowSize = 0.8F;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityFireMinion entity)
|
||||
{
|
||||
return SPIRIT;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.legacy.aether.server.entities.block.EntityFloatingBlock;
|
||||
|
||||
public class FloatingBlockRenderer extends Render<EntityFloatingBlock>
|
||||
{
|
||||
|
||||
public FloatingBlockRenderer(RenderManager manager)
|
||||
{
|
||||
super(manager);
|
||||
this.shadowSize = 0.5F;
|
||||
}
|
||||
|
||||
public void renderFloatingBlock(EntityFloatingBlock entityFloatingBlock, double d, double d1, double d2, float f, float f1)
|
||||
{
|
||||
if (entityFloatingBlock.getBlockState() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
IBlockState iblockstate = entityFloatingBlock.getBlockState();
|
||||
BlockPos blockpos = new BlockPos(entityFloatingBlock);
|
||||
World world = entityFloatingBlock.worldObj;
|
||||
|
||||
if (iblockstate != world.getBlockState(blockpos) && iblockstate.getRenderType() != EnumBlockRenderType.INVISIBLE)
|
||||
{
|
||||
if (iblockstate.getRenderType() == EnumBlockRenderType.MODEL)
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float)d, (float)d1, (float)d2);
|
||||
GlStateManager.disableLighting();
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer worldrenderer = tessellator.getBuffer();
|
||||
worldrenderer.begin(7, DefaultVertexFormats.BLOCK);
|
||||
int i = blockpos.getX();
|
||||
int j = blockpos.getY();
|
||||
int k = blockpos.getZ();
|
||||
worldrenderer.setTranslation((double)((float)(-i) - 0.5F), (double)(-j), (double)((float)(-k) - 0.5F));
|
||||
Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModel
|
||||
(world, Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState(iblockstate),
|
||||
iblockstate, blockpos, worldrenderer, false);
|
||||
worldrenderer.setTranslation(0.0D, 0.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
super.doRender(entityFloatingBlock, d, d1, d2, f, f1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void doRender(EntityFloatingBlock entity, double d, double d1, double d2, float f, float f1)
|
||||
{
|
||||
this.renderFloatingBlock((EntityFloatingBlock)entity, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityFloatingBlock entity)
|
||||
{
|
||||
return TextureMap.LOCATION_BLOCKS_TEXTURE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.FlyingCowModel;
|
||||
import com.legacy.aether.client.renders.entities.layer.FlyingCowWingLayer;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityFlyingCow;
|
||||
|
||||
public class FlyingCowRenderer extends RenderLiving<EntityFlyingCow>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/entities/flying_cow/flying_cow.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_SADDLED = new ResourceLocation("aether_legacy", "textures/entities/flying_cow/saddle.png");
|
||||
|
||||
public FlyingCowRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager, new FlyingCowModel(), 0.7F);
|
||||
this.addLayer(new FlyingCowWingLayer(renderManager));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityFlyingCow entity)
|
||||
{
|
||||
return entity.getSaddled() ? TEXTURE_SADDLED : TEXTURE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.MimicModel;
|
||||
import com.legacy.aether.server.entities.hostile.EntityMimic;
|
||||
|
||||
public class MimicRenderer extends RenderLiving<EntityMimic>
|
||||
{
|
||||
|
||||
private MimicModel modelbase;
|
||||
|
||||
public MimicRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager, new MimicModel(), 0.0F);
|
||||
|
||||
this.modelbase = (MimicModel) this.mainModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(EntityMimic mimic, double x, double y, double z, float pitch, float yaw)
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float)x, (float)y, (float)z);
|
||||
GlStateManager.rotate(180F - pitch, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.scale(-1F, -1F, 1.0F);
|
||||
this.modelbase.setRotationAngles(0,0F, 0.0F, 0.0F, 0.0F, 0.0F, mimic);
|
||||
this.renderManager.renderEngine.bindTexture(new ResourceLocation("aether_legacy", "textures/entities/mimic/mimic_head.png"));
|
||||
this.modelbase.renderHead(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, mimic);
|
||||
this.renderManager.renderEngine.bindTexture(new ResourceLocation("aether_legacy", "textures/entities/mimic/mimic_legs.png"));
|
||||
this.modelbase.renderLegs(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, mimic);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(EntityMimic entity)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.MiniCloudModel;
|
||||
import com.legacy.aether.server.entities.passive.EntityMiniCloud;
|
||||
|
||||
public class MiniCloudRenderer extends RenderLiving<EntityMiniCloud>
|
||||
{
|
||||
|
||||
public MiniCloudRenderer(RenderManager rendermanagerIn)
|
||||
{
|
||||
super(rendermanagerIn, new MiniCloudModel(), 0.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityMiniCloud entity)
|
||||
{
|
||||
return new ResourceLocation("aether_legacy", "textures/entities/mini_cloud/mini_cloud.png");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.client.models.entities.MoaModel;
|
||||
import com.legacy.aether.client.renders.entities.layer.MoaDonatorLayer;
|
||||
import com.legacy.aether.client.renders.entities.layer.MoaLayer;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityMoa;
|
||||
import com.legacy.aether.server.player.PlayerAether;
|
||||
|
||||
public class MoaRenderer extends RenderLiving<EntityMoa>
|
||||
{
|
||||
|
||||
public MoaRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager, new MoaModel(), 1.0F);
|
||||
this.addLayer(new MoaLayer(renderManager, (MoaModel) this.getMainModel()));
|
||||
this.addLayer(new MoaDonatorLayer(renderManager, (MoaModel) this.getMainModel()));
|
||||
}
|
||||
|
||||
protected float getWingRotation(EntityMoa moa, float f)
|
||||
{
|
||||
float f1 = moa.prevWingRotation + (moa.wingRotation - moa.prevWingRotation) * f;
|
||||
float f2 = moa.prevDestPos + (moa.destPos - moa.prevDestPos) * f;
|
||||
|
||||
return (MathHelper.sin(f1) + 1.0F) * f2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float handleRotationFloat(EntityMoa entityliving, float f)
|
||||
{
|
||||
return this.getWingRotation(entityliving, f);
|
||||
}
|
||||
|
||||
protected void scaleMoa(EntityMoa entityMoa)
|
||||
{
|
||||
float moaScale = entityMoa.isChild() ? 1.0f : 1.8f;
|
||||
|
||||
GL11.glScalef(moaScale, moaScale, moaScale);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void preRenderCallback(EntityMoa entityliving, float f)
|
||||
{
|
||||
this.scaleMoa(entityliving);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityMoa entity)
|
||||
{
|
||||
EntityMoa moa = (EntityMoa)entity;
|
||||
|
||||
if (!moa.getPassengers().isEmpty() && moa.getPassengers().get(0) instanceof EntityPlayer)
|
||||
{
|
||||
PlayerAether player = PlayerAether.get((EntityPlayer) moa.getPassengers().get(0));
|
||||
|
||||
if (player != null && !player.donatorMoaSkin.shouldUseDefualt())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return moa.getColor().getTexture(moa.getSaddled());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.server.blocks.BlocksAether;
|
||||
import com.legacy.aether.server.blocks.natural.BlockAercloud;
|
||||
import com.legacy.aether.server.blocks.util.EnumCloudType;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityParachute;
|
||||
|
||||
public class ParachuteRenderer extends Render<EntityParachute>
|
||||
{
|
||||
|
||||
public ParachuteRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager);
|
||||
}
|
||||
|
||||
public void renderParachute(EntityParachute entityParachute, double d, double d1, double d2, float f, float f1)
|
||||
{
|
||||
this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
|
||||
int meta = entityParachute.isGoldenParachute ? 2 : 0;
|
||||
IBlockState state = BlocksAether.aercloud.getDefaultState().withProperty(BlockAercloud.cloud_type, EnumCloudType.getType(meta));
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float)d - 0.5F, (float)d1 - 0.5F, (float)d2 + 0.5F);
|
||||
Minecraft.getMinecraft().getBlockRendererDispatcher().renderBlockBrightness(state, entityParachute.getBrightness(f1));
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
super.doRender(entityParachute, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
public void doRender(EntityParachute entity, double d, double d1, double d2, float f, float f1)
|
||||
{
|
||||
this.renderParachute(entity, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityParachute entity)
|
||||
{
|
||||
return TextureMap.LOCATION_BLOCKS_TEXTURE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelPig;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.layer.PhygWingLayer;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityPhyg;
|
||||
|
||||
public class PhygRenderer extends RenderLiving<EntityPhyg>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/entities/phyg/phyg.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_SADDLED = new ResourceLocation("aether_legacy", "textures/entities/phyg/saddle.png");
|
||||
|
||||
public PhygRenderer(RenderManager rendermanagerIn)
|
||||
{
|
||||
super(rendermanagerIn, new ModelPig(), 0.7F);
|
||||
this.addLayer(new PhygWingLayer(rendermanagerIn));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityPhyg entity)
|
||||
{
|
||||
return ((EntityPhyg) entity).getSaddled() ? TEXTURE_SADDLED : TEXTURE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelSlime;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.layer.SentryLayer;
|
||||
import com.legacy.aether.server.entities.hostile.EntitySentry;
|
||||
|
||||
public class SentryRenderer extends RenderLiving<EntitySentry>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/entities/sentry/sentry.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_LIT = new ResourceLocation("aether_legacy", "textures/entities/sentry/sentry_lit.png");
|
||||
|
||||
public SentryRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager, new ModelSlime(0), 0.3F);
|
||||
this.addLayer(new SentryLayer());
|
||||
}
|
||||
|
||||
protected void preRenderCallback(EntitySentry entityliving, float f)
|
||||
{
|
||||
float f1 = 1.75F;
|
||||
GL11.glScalef(f1, f1, f1);
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(EntitySentry entity)
|
||||
{
|
||||
return entity.getAttackTarget() == null ? TEXTURE : TEXTURE_LIT;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.SheepuffWoolModel;
|
||||
import com.legacy.aether.client.renders.entities.layer.SheepuffCoatLayer;
|
||||
import com.legacy.aether.server.entities.passive.EntitySheepuff;
|
||||
|
||||
public class SheepuffRenderer extends RenderLiving<EntitySheepuff>
|
||||
{
|
||||
|
||||
public SheepuffRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager, new SheepuffWoolModel(), 0.7F);
|
||||
this.addLayer(new SheepuffCoatLayer(renderManager, this));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntitySheepuff entity)
|
||||
{
|
||||
return new ResourceLocation("aether_legacy", "textures/entities/sheepuff/sheepuff.png");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.SliderModel;
|
||||
import com.legacy.aether.client.renders.entities.layer.SliderLayer;
|
||||
import com.legacy.aether.server.entities.bosses.slider.EntitySlider;
|
||||
|
||||
public class SliderRenderer extends RenderLiving<EntitySlider>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE_AWAKE_RED = new ResourceLocation("aether_legacy", "textures/bosses/slider/slider_awake_critical.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_AWAKE = new ResourceLocation("aether_legacy", "textures/bosses/slider/slider_awake.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_SLEEP = new ResourceLocation("aether_legacy", "textures/bosses/slider/slider_asleep.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_SLEEP_RED = new ResourceLocation("aether_legacy", "textures/bosses/slider/slider_asleep_critical.png");
|
||||
|
||||
public SliderRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager, new SliderModel(0.0F, 12.0F), 1.5F);
|
||||
this.addLayer(new SliderLayer());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void preRenderCallback(EntitySlider slider, float f)
|
||||
{
|
||||
((SliderModel)this.mainModel).hurtAngle = slider.hurtAngle;
|
||||
((SliderModel)this.mainModel).hurtAngleX = slider.hurtAngleX;
|
||||
((SliderModel)this.mainModel).hurtAngleZ = slider.hurtAngleZ;
|
||||
}
|
||||
|
||||
protected void renderLivingAt(EntitySlider slider, double x, double y, double z)
|
||||
{
|
||||
super.renderLivingAt(slider, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntitySlider slider)
|
||||
{
|
||||
if (slider.isAwake())
|
||||
{
|
||||
return slider.criticalCondition() ? TEXTURE_AWAKE_RED : TEXTURE_AWAKE;
|
||||
}
|
||||
|
||||
return slider.criticalCondition() ? TEXTURE_SLEEP_RED : TEXTURE_SLEEP;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderBiped;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.SunSpiritModel;
|
||||
import com.legacy.aether.server.entities.bosses.sun_spirit.EntitySunSpirit;
|
||||
|
||||
public class SunSpiritRenderer extends RenderBiped<EntitySunSpirit>
|
||||
{
|
||||
|
||||
private static final ResourceLocation SPIRIT = new ResourceLocation("aether_legacy", "textures/bosses/sun_spirit/sun_spirit.png");
|
||||
private static final ResourceLocation SPIRIT_FROZE = new ResourceLocation("aether_legacy", "textures/bosses/sun_spirit/frozen_sun_spirit.png");
|
||||
|
||||
public SunSpiritRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager, new SunSpiritModel(0.0F, 0.0F), 1.0F);
|
||||
this.shadowSize = 0.8F;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntitySunSpirit entity)
|
||||
{
|
||||
return entity.isFreezing() ? SPIRIT_FROZE : SPIRIT;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.model.ModelSlime;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.layer.SwetLayer;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntitySwet;
|
||||
|
||||
public class SwetRenderer extends RenderLiving<EntitySwet>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE_BLUE = new ResourceLocation("aether_legacy", "textures/entities/swet/swet_blue.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_GOLDEN = new ResourceLocation("aether_legacy", "textures/entities/swet/swet_golden.png");
|
||||
|
||||
public SwetRenderer(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager, new ModelSlime(16), 0.3F);
|
||||
this.addLayer(new SwetLayer(renderManager, this));
|
||||
}
|
||||
|
||||
protected void setupAnimation(EntitySwet entityswets, float f)
|
||||
{
|
||||
float f2 = 1.0F;
|
||||
float f1 = 1.0F;
|
||||
float f3 = 1.5F;
|
||||
|
||||
if (!entityswets.onGround)
|
||||
{
|
||||
if (entityswets.getPassengers().isEmpty())
|
||||
{
|
||||
if (entityswets.motionY > 0.8500000238418579D)
|
||||
{
|
||||
f1 = 1.425F;
|
||||
f2 = 0.575F;
|
||||
}
|
||||
else if (entityswets.motionY < -0.8500000238418579D)
|
||||
{
|
||||
f1 = 0.575F;
|
||||
f2 = 1.425F;
|
||||
}
|
||||
else
|
||||
{
|
||||
float f4 = (float)entityswets.motionY * 0.5F;
|
||||
f1 += f4;
|
||||
f2 -= f4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (entityswets.getPassengers().size() > 0)
|
||||
{
|
||||
f3 = 1.5F + (entityswets.getPassengers().get(0).width + entityswets.getPassengers().get(0).height) * 0.75F;
|
||||
}
|
||||
|
||||
GL11.glScalef(f2 * f3, f1 * f3, f2 * f3);
|
||||
}
|
||||
|
||||
protected void preRenderCallback(EntitySwet swet, float f)
|
||||
{
|
||||
this.setupAnimation(swet, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getEntityTexture(EntitySwet swet)
|
||||
{
|
||||
return swet.getType() == 1 ? TEXTURE_BLUE : TEXTURE_GOLDEN;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.BlockRendererDispatcher;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.legacy.aether.server.blocks.BlocksAether;
|
||||
import com.legacy.aether.server.entities.block.EntityTNTPresent;
|
||||
|
||||
public class TNTPresentRenderer extends Render<EntityTNTPresent>
|
||||
{
|
||||
|
||||
public TNTPresentRenderer(RenderManager renderManagerIn)
|
||||
{
|
||||
super(renderManagerIn);
|
||||
this.shadowSize = 0.5F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(EntityTNTPresent entity, double x, double y, double z, float entityYaw, float partialTicks)
|
||||
{
|
||||
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float)x, (float)y + 0.5F, (float)z);
|
||||
|
||||
if ((float)entity.fuse - partialTicks + 1.0F < 10.0F)
|
||||
{
|
||||
float f = 1.0F - ((float)entity.fuse - partialTicks + 1.0F) / 10.0F;
|
||||
f = MathHelper.clamp_float(f, 0.0F, 1.0F);
|
||||
f = f * f;
|
||||
f = f * f;
|
||||
float f1 = 1.0F + f * 0.3F;
|
||||
GlStateManager.scale(f1, f1, f1);
|
||||
}
|
||||
|
||||
float f2 = (1.0F - ((float)entity.fuse - partialTicks + 1.0F) / 100.0F) * 0.8F;
|
||||
this.bindEntityTexture(entity);
|
||||
GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
|
||||
blockrendererdispatcher.renderBlockBrightness(BlocksAether.present.getDefaultState(), entity.getBrightness(partialTicks));
|
||||
GlStateManager.translate(0.0F, 0.0F, 1.0F);
|
||||
|
||||
if (this.renderOutlines)
|
||||
{
|
||||
GlStateManager.enableColorMaterial();
|
||||
GlStateManager.enableOutlineMode(this.getTeamColor(entity));
|
||||
blockrendererdispatcher.renderBlockBrightness(BlocksAether.present.getDefaultState(), 1.0F);
|
||||
GlStateManager.disableOutlineMode();
|
||||
GlStateManager.disableColorMaterial();
|
||||
}
|
||||
else if (entity.fuse / 5 % 2 == 0)
|
||||
{
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.DST_ALPHA);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, f2);
|
||||
GlStateManager.doPolygonOffset(-3.0F, -3.0F);
|
||||
GlStateManager.enablePolygonOffset();
|
||||
blockrendererdispatcher.renderBlockBrightness(BlocksAether.present.getDefaultState(), 1.0F);
|
||||
GlStateManager.doPolygonOffset(0.0F, 0.0F);
|
||||
GlStateManager.disablePolygonOffset();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableTexture2D();
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
super.doRender(entity, x, y, z, entityYaw, partialTicks);
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(EntityTNTPresent entity)
|
||||
{
|
||||
return TextureMap.LOCATION_BLOCKS_TEXTURE;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.ValkyrieModel;
|
||||
import com.legacy.aether.server.entities.bosses.valkyrie_queen.EntityValkyrieQueen;
|
||||
|
||||
public class ValkyrieQueenRenderer extends RenderLiving<EntityValkyrieQueen>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/bosses/valkyrie_queen/valkyrie_queen.png");
|
||||
|
||||
public ValkyrieQueenRenderer(RenderManager rendermanagerIn)
|
||||
{
|
||||
super(rendermanagerIn, new ValkyrieModel(), 0.3F);
|
||||
}
|
||||
|
||||
protected void preRenderCallback(EntityValkyrieQueen valkyrie, float partialTickTime)
|
||||
{
|
||||
((ValkyrieModel)this.getMainModel()).sinage = valkyrie.sinage;
|
||||
((ValkyrieModel)this.getMainModel()).gonRound = valkyrie.onGround;
|
||||
((ValkyrieModel)this.getMainModel()).halow = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityValkyrieQueen entity)
|
||||
{
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.ValkyrieModel;
|
||||
import com.legacy.aether.server.entities.bosses.EntityValkyrie;
|
||||
|
||||
public class ValkyrieRenderer extends RenderLiving<EntityValkyrie>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/entities/valkyrie/valkyrie.png");
|
||||
|
||||
public ValkyrieRenderer(RenderManager rendermanagerIn)
|
||||
{
|
||||
super(rendermanagerIn, new ValkyrieModel(), 0.3F);
|
||||
}
|
||||
|
||||
protected void preRenderCallback(EntityValkyrie valkyrie, float partialTickTime)
|
||||
{
|
||||
((ValkyrieModel)this.getMainModel()).sinage = valkyrie.sinage;
|
||||
((ValkyrieModel)this.getMainModel()).gonRound = valkyrie.onGround;
|
||||
((ValkyrieModel)this.getMainModel()).halow = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityValkyrie entity)
|
||||
{
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.legacy.aether.client.renders.entities;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.ZephyrModel;
|
||||
import com.legacy.aether.server.entities.hostile.EntityZephyr;
|
||||
|
||||
public class ZephyrRenderer extends RenderLiving<EntityZephyr>
|
||||
{
|
||||
|
||||
private static final ResourceLocation ZEPHYR_TEXTURE = new ResourceLocation("aether_legacy", "textures/entities/zephyr/zephyr.png");
|
||||
|
||||
public ZephyrRenderer(RenderManager rendermanagerIn)
|
||||
{
|
||||
super(rendermanagerIn, new ZephyrModel(), 0.5F);
|
||||
}
|
||||
|
||||
protected void renderZephyrMovement(EntityZephyr zephyr, float partialTickTime)
|
||||
{
|
||||
float f1 = ((float)zephyr.shootingAI.prevAttackCounter + (float)(zephyr.shootingAI.attackCounter - zephyr.shootingAI.prevAttackCounter) * partialTickTime) / 20.0F;
|
||||
|
||||
if (f1 < 0.0F)
|
||||
{
|
||||
f1 = 0.0F;
|
||||
}
|
||||
|
||||
f1 = 1.0F / (f1 * f1 * f1 * f1 * f1 * 2.0F + 1.0F);
|
||||
|
||||
float f2 = (8.0F + f1) / 2.0F;
|
||||
float f3 = (8.0F + 1.0F / f1) / 2.0F;
|
||||
|
||||
GlStateManager.scale(f3, f2, f3);
|
||||
GlStateManager.translate(0, 0.5D, 0);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void preRenderCallback(EntityZephyr zephyr, float partialTickTime)
|
||||
{
|
||||
this.renderZephyrMovement(zephyr, partialTickTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityZephyr zephyr)
|
||||
{
|
||||
return ZEPHYR_TEXTURE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.AechorPlantRenderer;
|
||||
import com.legacy.aether.server.entities.hostile.EntityAechorPlant;
|
||||
|
||||
public class AechorPlantFactory implements IRenderFactory<EntityAechorPlant>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityAechorPlant> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new AechorPlantRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.AerbunnyRenderer;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityAerbunny;
|
||||
|
||||
public class AerbunnyFactory implements IRenderFactory<EntityAerbunny>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityAerbunny> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new AerbunnyRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.AerwhaleRenderer;
|
||||
import com.legacy.aether.server.entities.passive.EntityAerwhale;
|
||||
|
||||
public class AerwhaleFactory implements IRenderFactory<EntityAerwhale>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityAerwhale> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new AerwhaleRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.CockatriceRenderer;
|
||||
import com.legacy.aether.server.entities.hostile.EntityCockatrice;
|
||||
|
||||
public class CockatriceFactory implements IRenderFactory<EntityCockatrice>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<? super EntityCockatrice> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new CockatriceRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.projectile.DartBaseRenderer;
|
||||
import com.legacy.aether.server.entities.projectile.darts.EntityDartBase;
|
||||
|
||||
public class DartFactory<ENTITY extends EntityDartBase> implements IRenderFactory<ENTITY>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<ENTITY> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new DartBaseRenderer<ENTITY>(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.projectile.FireBallRenderer;
|
||||
import com.legacy.aether.server.entities.projectile.crystals.EntityFireBall;
|
||||
|
||||
public class FireBallFactory implements IRenderFactory<EntityFireBall>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityFireBall> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new FireBallRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.FireMinionRenderer;
|
||||
import com.legacy.aether.server.entities.bosses.EntityFireMinion;
|
||||
|
||||
public class FireMinionFactory implements IRenderFactory<EntityFireMinion>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityFireMinion> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new FireMinionRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.FloatingBlockRenderer;
|
||||
import com.legacy.aether.server.entities.block.EntityFloatingBlock;
|
||||
|
||||
public class FloatingBlockFactory implements IRenderFactory<EntityFloatingBlock>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityFloatingBlock> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new FloatingBlockRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.FlyingCowRenderer;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityFlyingCow;
|
||||
|
||||
public class FlyingCowFactory implements IRenderFactory<EntityFlyingCow>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityFlyingCow> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new FlyingCowRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.projectile.HammerProjectileRenderer;
|
||||
import com.legacy.aether.server.entities.projectile.EntityHammerProjectile;
|
||||
|
||||
public class HammerProjectileFactory implements IRenderFactory<EntityHammerProjectile>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityHammerProjectile> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new HammerProjectileRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.projectile.IceyBallRenderer;
|
||||
import com.legacy.aether.server.entities.projectile.crystals.EntityIceyBall;
|
||||
|
||||
public class IceyBallFactory implements IRenderFactory<EntityIceyBall>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityIceyBall> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new IceyBallRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.projectile.LightningKnifeRenderer;
|
||||
import com.legacy.aether.server.entities.projectile.EntityLightningKnife;
|
||||
|
||||
public class LightningKnifeFactory implements IRenderFactory<EntityLightningKnife>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityLightningKnife> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new LightningKnifeRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.MimicRenderer;
|
||||
import com.legacy.aether.server.entities.hostile.EntityMimic;
|
||||
|
||||
public class MimicFactory implements IRenderFactory<EntityMimic>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityMimic> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new MimicRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.MiniCloudRenderer;
|
||||
import com.legacy.aether.server.entities.passive.EntityMiniCloud;
|
||||
|
||||
public class MiniCloudFactory implements IRenderFactory<EntityMiniCloud>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityMiniCloud> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new MiniCloudRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.MoaRenderer;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityMoa;
|
||||
|
||||
public class MoaFactory implements IRenderFactory<EntityMoa>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityMoa> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new MoaRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.ParachuteRenderer;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityParachute;
|
||||
|
||||
public class ParachuteFactory implements IRenderFactory<EntityParachute>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityParachute> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new ParachuteRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.projectile.PhoenixArrowRenderer;
|
||||
import com.legacy.aether.server.entities.projectile.EntityPhoenixArrow;
|
||||
|
||||
public class PhoenixArrowFactory implements IRenderFactory<EntityPhoenixArrow>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityPhoenixArrow> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new PhoenixArrowRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.PhygRenderer;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityPhyg;
|
||||
|
||||
public class PhygFactory implements IRenderFactory<EntityPhyg>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityPhyg> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new PhygRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.SentryRenderer;
|
||||
import com.legacy.aether.server.entities.hostile.EntitySentry;
|
||||
|
||||
public class SentryFactory implements IRenderFactory<EntitySentry>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntitySentry> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new SentryRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.SheepuffRenderer;
|
||||
import com.legacy.aether.server.entities.passive.EntitySheepuff;
|
||||
|
||||
public class SheepuffFactory implements IRenderFactory<EntitySheepuff>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntitySheepuff> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new SheepuffRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.SliderRenderer;
|
||||
import com.legacy.aether.server.entities.bosses.slider.EntitySlider;
|
||||
|
||||
public class SliderFactory implements IRenderFactory<EntitySlider>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntitySlider> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new SliderRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.SunSpiritRenderer;
|
||||
import com.legacy.aether.server.entities.bosses.sun_spirit.EntitySunSpirit;
|
||||
|
||||
public class SunSpiritFactory implements IRenderFactory<EntitySunSpirit>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntitySunSpirit> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new SunSpiritRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.SwetRenderer;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntitySwet;
|
||||
|
||||
public class SwetFactory implements IRenderFactory<EntitySwet>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntitySwet> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new SwetRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.TNTPresentRenderer;
|
||||
import com.legacy.aether.server.entities.block.EntityTNTPresent;
|
||||
|
||||
public class TNTPresentFactory implements IRenderFactory<EntityTNTPresent>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityTNTPresent> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new TNTPresentRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.projectile.ThunderBallRenderer;
|
||||
import com.legacy.aether.server.entities.projectile.crystals.EntityThunderBall;
|
||||
|
||||
public class ThunderBallFactory implements IRenderFactory<EntityThunderBall>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityThunderBall> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new ThunderBallRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.ValkyrieRenderer;
|
||||
import com.legacy.aether.server.entities.bosses.EntityValkyrie;
|
||||
|
||||
public class ValkyrieFactory implements IRenderFactory<EntityValkyrie>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityValkyrie> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new ValkyrieRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.ValkyrieQueenRenderer;
|
||||
import com.legacy.aether.server.entities.bosses.valkyrie_queen.EntityValkyrieQueen;
|
||||
|
||||
public class ValkyrieQueenFactory implements IRenderFactory<EntityValkyrieQueen>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityValkyrieQueen> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new ValkyrieQueenRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.ZephyrRenderer;
|
||||
import com.legacy.aether.server.entities.hostile.EntityZephyr;
|
||||
|
||||
public class ZephyrFactory implements IRenderFactory<EntityZephyr>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityZephyr> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new ZephyrRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.legacy.aether.client.renders.entities.factory;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
|
||||
import com.legacy.aether.client.renders.entities.projectile.ZephyrSnowballRenderer;
|
||||
import com.legacy.aether.server.entities.projectile.EntityZephyrSnowball;
|
||||
|
||||
public class ZephyrSnowballFactory implements IRenderFactory<EntityZephyrSnowball>
|
||||
{
|
||||
|
||||
@Override
|
||||
public Render<EntityZephyrSnowball> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new ZephyrSnowballRenderer(manager);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,278 @@
|
|||
package com.legacy.aether.client.renders.entities.layer;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelPlayer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.legacy.aether.client.models.attachments.ModelAetherWings;
|
||||
import com.legacy.aether.client.models.attachments.ModelHalo;
|
||||
import com.legacy.aether.server.containers.inventory.InventoryAccessories;
|
||||
import com.legacy.aether.server.items.ItemsAether;
|
||||
import com.legacy.aether.server.items.accessories.ItemAccessory;
|
||||
import com.legacy.aether.server.player.PlayerAether;
|
||||
import com.legacy.aether.server.player.perks.AetherRankings;
|
||||
|
||||
public class AccessoriesLayer implements LayerRenderer<AbstractClientPlayer>
|
||||
{
|
||||
|
||||
private final RenderManager manager = Minecraft.getMinecraft().getRenderManager();
|
||||
|
||||
private final ResourceLocation TEXTURE_VALKYRIE = new ResourceLocation("aether_legacy", "textures/entities/valkyrie/valkyrie.png");
|
||||
|
||||
private final ResourceLocation TEXTURE_HALO = new ResourceLocation("aether_legacy", "textures/other/halo.png");
|
||||
|
||||
private boolean slimFit;
|
||||
|
||||
private ModelHalo modelHalo;
|
||||
|
||||
public ModelBiped modelMisc;
|
||||
|
||||
public ModelPlayer modelPlayer;
|
||||
|
||||
private ModelAetherWings modelWings;
|
||||
|
||||
public AccessoriesLayer(boolean slimFit, ModelPlayer modelPlayer)
|
||||
{
|
||||
this.modelPlayer = modelPlayer;
|
||||
this.slimFit = slimFit;
|
||||
this.modelWings = new ModelAetherWings(1.0F);
|
||||
this.modelMisc = new ModelBiped(1.0F);
|
||||
this.modelHalo = new ModelHalo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRenderLayer(AbstractClientPlayer player, float limbSwing, float prevLimbSwing, float partialTicks, float rotation, float interpolateRotation, float prevRotationPitch, float scale)
|
||||
{
|
||||
PlayerAether playerAether = PlayerAether.get(player);
|
||||
InventoryAccessories accessories = playerAether.accessories;
|
||||
|
||||
if (accessories == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
this.modelMisc.setModelAttributes(this.modelPlayer);
|
||||
this.modelWings.setModelAttributes(this.modelPlayer);
|
||||
|
||||
this.modelMisc.setLivingAnimations(player, prevLimbSwing, rotation, partialTicks);
|
||||
this.modelWings.setLivingAnimations(player, prevLimbSwing, rotation, partialTicks);
|
||||
|
||||
GlStateManager.scale(0.9375F, 0.9375F, 0.9375F);
|
||||
|
||||
if (this.slimFit)
|
||||
{
|
||||
GlStateManager.translate(0.0D, 0.024D, 0.0D);
|
||||
}
|
||||
|
||||
GlStateManager.enableAlpha();
|
||||
|
||||
GlStateManager.translate(0, player.isSneaking() ? 0.25D : 0, 0);
|
||||
|
||||
this.modelMisc.setRotationAngles(limbSwing, prevLimbSwing, rotation, interpolateRotation, prevRotationPitch, scale, player);
|
||||
this.modelWings.setRotationAngles(limbSwing, prevLimbSwing, rotation, interpolateRotation, prevRotationPitch, scale, player);
|
||||
this.modelHalo.setRotationAngles(limbSwing, prevLimbSwing, rotation, interpolateRotation, prevRotationPitch, scale, player);
|
||||
|
||||
if (accessories.stacks[0] != null)
|
||||
{
|
||||
ItemAccessory pendant = ((ItemAccessory) (accessories.stacks[0].getItem()));
|
||||
manager.renderEngine.bindTexture(pendant.texture);
|
||||
int colour = pendant.getColorFromItemStack(new ItemStack(pendant, 1, 0), 1);
|
||||
float red = ((colour >> 16) & 0xff) / 255F;
|
||||
float green = ((colour >> 8) & 0xff) / 255F;
|
||||
float blue = (colour & 0xff) / 255F;
|
||||
|
||||
if (player.hurtTime > 0)
|
||||
{
|
||||
GlStateManager.color(1.0F, 0.5F, 0.5F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlStateManager.color(red, green, blue);
|
||||
}
|
||||
|
||||
this.modelMisc.bipedBody.render(scale);
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (accessories.stacks[1] != null && accessories.stacks[1].getItem() != ItemsAether.invisibility_cape)
|
||||
{
|
||||
ItemAccessory cape = ((ItemAccessory) (accessories.stacks[1].getItem()));
|
||||
|
||||
if (player.hasPlayerInfo() && !player.isInvisible())
|
||||
{
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.0F, 0.0F, 0.125F);
|
||||
double d0 = player.prevChasingPosX + (player.chasingPosX - player.prevChasingPosX) * (double)partialTicks - (player.prevPosX + (player.posX - player.prevPosX) * (double)partialTicks);
|
||||
double d1 = player.prevChasingPosY + (player.chasingPosY - player.prevChasingPosY) * (double)partialTicks - (player.prevPosY + (player.posY - player.prevPosY) * (double)partialTicks);
|
||||
double d2 = player.prevChasingPosZ + (player.chasingPosZ - player.prevChasingPosZ) * (double)partialTicks - (player.prevPosZ + (player.posZ - player.prevPosZ) * (double)partialTicks);
|
||||
float f = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * partialTicks;
|
||||
double d3 = (double)MathHelper.sin(f * (float)Math.PI / 180.0F);
|
||||
double d4 = (double)(-MathHelper.cos(f * (float)Math.PI / 180.0F));
|
||||
float f1 = (float)d1 * 10.0F;
|
||||
f1 = MathHelper.clamp_float(f1, -6.0F, 32.0F);
|
||||
float f2 = (float)(d0 * d3 + d2 * d4) * 100.0F;
|
||||
float f3 = (float)(d0 * d4 - d2 * d3) * 100.0F;
|
||||
|
||||
if (f2 < 0.0F)
|
||||
{
|
||||
f2 = 0.0F;
|
||||
}
|
||||
|
||||
float f4 = player.prevCameraYaw + (player.cameraYaw - player.prevCameraYaw) * partialTicks;
|
||||
f1 = f1 + MathHelper.sin((player.prevDistanceWalkedModified + (player.distanceWalkedModified - player.prevDistanceWalkedModified) * partialTicks) * 6.0F) * 32.0F * f4;
|
||||
|
||||
if (player.isSneaking())
|
||||
{
|
||||
f1 += 25.0F;
|
||||
}
|
||||
|
||||
GlStateManager.rotate(6.0F + f2 / 2.0F + f1, 1.0F, 0.0F, 0.0F);
|
||||
GlStateManager.rotate(f3 / 2.0F, 0.0F, 0.0F, 1.0F);
|
||||
GlStateManager.rotate(-f3 / 2.0F, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
int colour = cape.getColorFromItemStack(accessories.stacks[1], 0);
|
||||
|
||||
float red = ((colour >> 16) & 0xff) / 255F;
|
||||
float green = ((colour >> 8) & 0xff) / 255F;
|
||||
float blue = (colour & 0xff) / 255F;
|
||||
|
||||
if (player.hurtTime > 0)
|
||||
{
|
||||
GlStateManager.color(1.0F, 0.5F, 0.5F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlStateManager.color(red, green, blue);
|
||||
}
|
||||
|
||||
manager.renderEngine.bindTexture(cape.texture);
|
||||
this.modelPlayer.renderCape(scale);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
if (accessories.stacks[6] != null)
|
||||
{
|
||||
ItemAccessory gloves = (ItemAccessory) accessories.stacks[6].getItem();
|
||||
this.manager.renderEngine.bindTexture(gloves.texture);
|
||||
|
||||
int colour = gloves.getColorFromItemStack(accessories.stacks[6], 0);
|
||||
|
||||
float red = ((colour >> 16) & 0xff) / 255F;
|
||||
float green = ((colour >> 8) & 0xff) / 255F;
|
||||
float blue = (colour & 0xff) / 255F;
|
||||
|
||||
if (player.hurtTime > 0)
|
||||
{
|
||||
GlStateManager.color(1.0F, 0.5F, 0.5F);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gloves != ItemsAether.phoenix_gloves)
|
||||
{
|
||||
GlStateManager.color(red, green, blue);
|
||||
}
|
||||
}
|
||||
|
||||
this.modelMisc.bipedLeftArm.render(scale);
|
||||
this.modelMisc.bipedRightArm.render(scale);
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (accessories.stacks[2] != null)
|
||||
{
|
||||
ItemAccessory shield = (ItemAccessory) accessories.stacks[2].getItem();
|
||||
|
||||
this.manager.renderEngine.bindTexture(shield.texture);
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.scale(1.1, 1.1, 1.1);
|
||||
if (player.hurtTime > 0)
|
||||
{
|
||||
GlStateManager.color(1.0F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
this.modelMisc.bipedHead.render(scale);
|
||||
this.modelMisc.bipedBody.render(scale);
|
||||
this.modelMisc.bipedLeftArm.render(scale);
|
||||
this.modelMisc.bipedRightArm.render(scale);
|
||||
this.modelMisc.bipedLeftLeg.render(scale);
|
||||
this.modelMisc.bipedRightLeg.render(scale);
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if (playerAether.isWearingValkyrieSet())
|
||||
{
|
||||
manager.renderEngine.bindTexture(TEXTURE_VALKYRIE);
|
||||
|
||||
this.modelWings.setWingSinage(playerAether.wingSinage);
|
||||
this.modelWings.wingLeft.render(scale);
|
||||
this.modelWings.wingRight.render(scale);
|
||||
|
||||
if (player.hurtResistantTime > 0)
|
||||
{
|
||||
GlStateManager.color(1.0F, 0.5F, 0.5F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
if (AetherRankings.isRankedPlayer(player.getUniqueID()) && PlayerAether.get(player).shouldRenderHalo)
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float var4 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) + partialTicks - (player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) + partialTicks);
|
||||
float var5 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * partialTicks;
|
||||
|
||||
GlStateManager.rotate(var4, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(var5, 1.0F, 0.0F, 0.0F);
|
||||
GlStateManager.translate(0.0F, -0.8F, 0.0F);
|
||||
|
||||
this.manager.renderEngine.bindTexture(TEXTURE_HALO);
|
||||
|
||||
this.modelHalo.halo1.rotateAngleX = 6.25F;
|
||||
this.modelHalo.halo2.rotateAngleX = 6.25F;
|
||||
this.modelHalo.halo3.rotateAngleX = 6.25F;
|
||||
this.modelHalo.halo4.rotateAngleX = 6.25F;
|
||||
|
||||
this.modelHalo.renderHalo(this.modelPlayer.bipedHead, scale);
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableRescaleNormal();
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCombineTextures()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.legacy.aether.client.renders.entities.layer;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.FlyingCowWingModel;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityFlyingCow;
|
||||
|
||||
public class FlyingCowWingLayer implements LayerRenderer<EntityFlyingCow>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE_WINGS = new ResourceLocation("aether_legacy", "textures/entities/flying_cow/wings.png");
|
||||
|
||||
private RenderManager renderManager;
|
||||
|
||||
private FlyingCowWingModel model;
|
||||
|
||||
public FlyingCowWingLayer(RenderManager manager)
|
||||
{
|
||||
this.renderManager = manager;
|
||||
this.model = new FlyingCowWingModel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRenderLayer(EntityFlyingCow cow, float limbSwing, float prevLimbSwing, float partialTicks, float rotation, float interpolateRotation, float prevRotationPitch, float scale)
|
||||
{
|
||||
this.renderManager.renderEngine.bindTexture(TEXTURE_WINGS);
|
||||
this.model.render(cow, limbSwing, prevLimbSwing, rotation, interpolateRotation, prevRotationPitch, scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCombineTextures()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
package com.legacy.aether.client.renders.entities.layer;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.MoaModel;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityMoa;
|
||||
import com.legacy.aether.server.player.PlayerAether;
|
||||
import com.legacy.aether.server.player.perks.util.DonatorMoaSkin;
|
||||
|
||||
public class MoaDonatorLayer implements LayerRenderer<EntityMoa>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE_OUTSIDE = new ResourceLocation("aether_legacy", "textures/entities/moa/canvas/moa_outside.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_EYE = new ResourceLocation("aether_legacy", "textures/entities/moa/canvas/moa_eye.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_BODY = new ResourceLocation("aether_legacy", "textures/entities/moa/canvas/moa_body.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_MARKINGS = new ResourceLocation("aether_legacy", "textures/entities/moa/canvas/moa_markings.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_WING = new ResourceLocation("aether_legacy", "textures/entities/moa/canvas/moa_wing.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_WING_MARKINGS = new ResourceLocation("aether_legacy", "textures/entities/moa/canvas/moa_wing_markings.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_UNCHANGED = new ResourceLocation("aether_legacy", "textures/entities/moa/canvas/moa_unchanged.png");
|
||||
|
||||
private RenderManager renderManager;
|
||||
|
||||
private MoaModel model;
|
||||
|
||||
public MoaDonatorLayer(RenderManager renderManager, MoaModel model)
|
||||
{
|
||||
this.renderManager = renderManager;
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRenderLayer(EntityMoa moa, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
if (!moa.getPassengers().isEmpty() && moa.getPassengers().get(0) instanceof EntityPlayer)
|
||||
{
|
||||
PlayerAether player = PlayerAether.get((EntityPlayer) moa.getPassengers().get(0));
|
||||
|
||||
if (player != null)
|
||||
{
|
||||
DonatorMoaSkin moaSkin = player.donatorMoaSkin;
|
||||
|
||||
if (moaSkin != null && !moaSkin.shouldUseDefualt())
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
this.renderManager.renderEngine.bindTexture(TEXTURE_UNCHANGED);
|
||||
|
||||
this.model.render(moa, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
float red = ((moaSkin.getWingMarkingColor() >> 16) & 0xff) / 255F;
|
||||
float green = ((moaSkin.getWingMarkingColor() >> 8) & 0xff) / 255F;
|
||||
float blue = (moaSkin.getWingMarkingColor() & 0xff) / 255F;
|
||||
|
||||
this.renderManager.renderEngine.bindTexture(TEXTURE_WING_MARKINGS);
|
||||
|
||||
GlStateManager.color(red, green, blue);
|
||||
|
||||
this.model.render(moa, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
red = ((moaSkin.getWingColor() >> 16) & 0xff) / 255F;
|
||||
green = ((moaSkin.getWingColor() >> 8) & 0xff) / 255F;
|
||||
blue = (moaSkin.getWingColor() & 0xff) / 255F;
|
||||
|
||||
this.renderManager.renderEngine.bindTexture(TEXTURE_WING);
|
||||
|
||||
GlStateManager.color(red, green, blue);
|
||||
|
||||
this.model.render(moa, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
red = ((moaSkin.getMarkingColor() >> 16) & 0xff) / 255F;
|
||||
green = ((moaSkin.getMarkingColor() >> 8) & 0xff) / 255F;
|
||||
blue = (moaSkin.getMarkingColor() & 0xff) / 255F;
|
||||
|
||||
this.renderManager.renderEngine.bindTexture(TEXTURE_MARKINGS);
|
||||
|
||||
GlStateManager.color(red, green, blue);
|
||||
|
||||
this.model.render(moa, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
red = ((moaSkin.getBodyColor() >> 16) & 0xff) / 255F;
|
||||
green = ((moaSkin.getBodyColor() >> 8) & 0xff) / 255F;
|
||||
blue = (moaSkin.getBodyColor() & 0xff) / 255F;
|
||||
|
||||
this.renderManager.renderEngine.bindTexture(TEXTURE_BODY);
|
||||
|
||||
GlStateManager.color(red, green, blue);
|
||||
|
||||
this.model.render(moa, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
red = ((moaSkin.getEyeColor() >> 16) & 0xff) / 255F;
|
||||
green = ((moaSkin.getEyeColor() >> 8) & 0xff) / 255F;
|
||||
blue = (moaSkin.getEyeColor() & 0xff) / 255F;
|
||||
|
||||
this.renderManager.renderEngine.bindTexture(TEXTURE_EYE);
|
||||
|
||||
GlStateManager.color(red, green, blue);
|
||||
|
||||
this.model.render(moa, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
red = ((moaSkin.getOutsideColor() >> 16) & 0xff) / 255F;
|
||||
green = ((moaSkin.getOutsideColor() >> 8) & 0xff) / 255F;
|
||||
blue = (moaSkin.getOutsideColor() & 0xff) / 255F;
|
||||
|
||||
this.renderManager.renderEngine.bindTexture(TEXTURE_OUTSIDE);
|
||||
|
||||
GlStateManager.color(red, green, blue);
|
||||
|
||||
this.model.render(moa, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCombineTextures()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.legacy.aether.client.renders.entities.layer;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.MoaModel;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityMoa;
|
||||
|
||||
public class MoaLayer implements LayerRenderer<EntityMoa>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE_BRACE = new ResourceLocation("aether_legacy", "textures/entities/moa/moa_brace.png");
|
||||
|
||||
private RenderManager renderManager;
|
||||
|
||||
private MoaModel moaModel;
|
||||
|
||||
public MoaLayer(RenderManager manager, MoaModel moaModel)
|
||||
{
|
||||
this.renderManager = manager;
|
||||
this.moaModel = moaModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRenderLayer(EntityMoa moa, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
if (moa.shouldStay())
|
||||
{
|
||||
this.renderManager.renderEngine.bindTexture(TEXTURE_BRACE);
|
||||
this.moaModel.render(moa, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCombineTextures()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.legacy.aether.client.renders.entities.layer;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.PhygWingModel;
|
||||
import com.legacy.aether.server.entities.passive.mountable.EntityPhyg;
|
||||
|
||||
public class PhygWingLayer implements LayerRenderer<EntityPhyg>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE_WINGS = new ResourceLocation("aether_legacy", "textures/entities/phyg/wings.png");
|
||||
|
||||
private RenderManager renderManager;
|
||||
|
||||
private PhygWingModel model;
|
||||
|
||||
public PhygWingLayer(RenderManager manager)
|
||||
{
|
||||
this.renderManager = manager;
|
||||
this.model = new PhygWingModel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRenderLayer(EntityPhyg phyg, float limbSwing, float prevLimbSwing, float partialTicks, float rotation, float interpolateRotation, float prevRotationPitch, float scale)
|
||||
{
|
||||
this.renderManager.renderEngine.bindTexture(TEXTURE_WINGS);
|
||||
|
||||
this.model.render(phyg, limbSwing, prevLimbSwing, rotation, interpolateRotation, prevRotationPitch, scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCombineTextures()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.legacy.aether.client.renders.entities.layer;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.server.entities.hostile.EntitySentry;
|
||||
|
||||
public class SentryLayer implements LayerRenderer<EntitySentry>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE_EYE = new ResourceLocation("aether_legacy", "textures/entities/sentry/eye.png");
|
||||
|
||||
@Override
|
||||
public void doRenderLayer(EntitySentry sentry, float p_177141_2_, float p_177141_3_, float p_177141_4_, float p_177141_5_, float p_177141_6_, float p_177141_7_, float p_177141_8_)
|
||||
{
|
||||
if (sentry.getAttackTarget() != null)
|
||||
{
|
||||
Minecraft.getMinecraft().getRenderManager().renderEngine.bindTexture(TEXTURE_EYE);
|
||||
float f1 = 1.0F;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
char j = 61680;
|
||||
int k = j % 65536;
|
||||
int l = j / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)k / 1.0F, (float)l / 1.0F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, f1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCombineTextures()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package com.legacy.aether.client.renders.entities.layer;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.legacy.aether.client.models.entities.SheepuffModel;
|
||||
import com.legacy.aether.client.models.entities.SheepuffedModel;
|
||||
import com.legacy.aether.client.renders.entities.SheepuffRenderer;
|
||||
import com.legacy.aether.server.entities.passive.EntitySheepuff;
|
||||
|
||||
public class SheepuffCoatLayer implements LayerRenderer<EntitySheepuff>
|
||||
{
|
||||
|
||||
private final ResourceLocation TEXTURE_FUR = new ResourceLocation("aether_legacy", "textures/entities/sheepuff/fur.png");
|
||||
|
||||
private RenderManager renderManager;
|
||||
|
||||
private SheepuffModel woolModel;
|
||||
|
||||
private SheepuffedModel puffedModel;
|
||||
|
||||
private SheepuffRenderer render;
|
||||
|
||||
public SheepuffCoatLayer(RenderManager manager, SheepuffRenderer render)
|
||||
{
|
||||
this.renderManager = manager;
|
||||
this.render = render;
|
||||
this.woolModel = new SheepuffModel();
|
||||
this.puffedModel = new SheepuffedModel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRenderLayer(EntitySheepuff sheepuff, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
|
||||
{
|
||||
if (!sheepuff.getSheared() && !sheepuff.isInvisible())
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
this.renderManager.renderEngine.bindTexture(TEXTURE_FUR);
|
||||
int j = sheepuff.getFleeceColor();
|
||||
float[] dye = EntitySheep.getDyeRgb(EnumDyeColor.byMetadata(j));
|
||||
GlStateManager.color(dye[0], dye[1], dye[2]);
|
||||
|
||||
if (sheepuff.hasCustomName() && "jeb_".equals(sheepuff.getCustomNameTag()))
|
||||
{
|
||||
int i = sheepuff.ticksExisted / 25 + sheepuff.getEntityId();
|
||||
int j1 = EnumDyeColor.values().length;
|
||||
int k = i % j1;
|
||||
int l = (i + 1) % j1;
|
||||
float f = ((float)(sheepuff.ticksExisted % 25) + partialTicks) / 25.0F;
|
||||
float[] afloat1 = EntitySheep.getDyeRgb(EnumDyeColor.byMetadata(k));
|
||||
float[] afloat2 = EntitySheep.getDyeRgb(EnumDyeColor.byMetadata(l));
|
||||
GlStateManager.color(afloat1[0] * (1.0F - f) + afloat2[0] * f, afloat1[1] * (1.0F - f) + afloat2[1] * f, afloat1[2] * (1.0F - f) + afloat2[2] * f);
|
||||
}
|
||||
|
||||
if (sheepuff.getPuffed())
|
||||
{
|
||||
this.puffedModel.setModelAttributes(this.render.getMainModel());
|
||||
this.puffedModel.setLivingAnimations(sheepuff, p_177141_2_, p_177141_3_, partialTicks);
|
||||
this.puffedModel.render(sheepuff, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.woolModel.setModelAttributes(this.render.getMainModel());
|
||||
this.woolModel.setLivingAnimations(sheepuff, p_177141_2_, p_177141_3_, partialTicks);
|
||||
this.woolModel.render(sheepuff, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCombineTextures()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.legacy.aether.client.renders.entities.layer;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.legacy.aether.server.entities.bosses.slider.EntitySlider;
|
||||
|
||||
public class SliderLayer implements LayerRenderer<EntitySlider>
|
||||
{
|
||||
|
||||
private static final ResourceLocation TEXTURE_GLOW = new ResourceLocation("aether_legacy", "textures/bosses/slider/slider_awake_glow.png");
|
||||
|
||||
private static final ResourceLocation TEXTURE_GLOW_RED = new ResourceLocation("aether_legacy", "textures/bosses/slider/slider_awake_critical_glow.png");
|
||||
|
||||
@Override
|
||||
public void doRenderLayer(EntitySlider slider, float x, float y, float z, float p_177141_5_, float p_177141_6_, float p_177141_7_, float yaw)
|
||||
{
|
||||
RenderManager renderManager = Minecraft.getMinecraft().getRenderManager();
|
||||
|
||||
if (slider.isAwake())
|
||||
{
|
||||
if (slider.criticalCondition())
|
||||
{
|
||||
renderManager.renderEngine.bindTexture(TEXTURE_GLOW_RED);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderManager.renderEngine.bindTexture(TEXTURE_GLOW);
|
||||
}
|
||||
|
||||
float f1 = 1.0F;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
int j = 61680;
|
||||
int k = j % 0x10000;
|
||||
int l = j / 0x10000;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) k / 1.0F, (float) l / 1.0F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, f1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCombineTextures()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue