mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-29 18:28:34 +01:00
Made everything super smooth
This commit is contained in:
parent
c22ab90fdb
commit
dc35992d7d
2 changed files with 11 additions and 11 deletions
|
@ -46,18 +46,18 @@ public class RenderSmileyCloud extends RenderTileEntity{
|
||||||
theCloud.flyHeight = tile.getWorldObj().rand.nextInt(30)+30;
|
theCloud.flyHeight = tile.getWorldObj().rand.nextInt(30)+30;
|
||||||
}
|
}
|
||||||
int bobHeight = theCloud.flyHeight;
|
int bobHeight = theCloud.flyHeight;
|
||||||
long theTime = Minecraft.getSystemTime();
|
double theTime = Minecraft.getSystemTime();
|
||||||
long time = theTime/50;
|
double time = theTime/50;
|
||||||
|
|
||||||
if(time-bobHeight >= theCloud.lastFlyHeight){
|
if(time-bobHeight >= theCloud.lastFlyHeight){
|
||||||
theCloud.lastFlyHeight = time;
|
theCloud.lastFlyHeight = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(time-(bobHeight/2) >= theCloud.lastFlyHeight){
|
if(time-(bobHeight/2) >= theCloud.lastFlyHeight){
|
||||||
GL11.glTranslated(0, ((double)time-theCloud.lastFlyHeight)/300, 0);
|
GL11.glTranslated(0, (time-theCloud.lastFlyHeight)/300, 0);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
GL11.glTranslated(0, -((double)time-theCloud.lastFlyHeight)/300+(double)bobHeight/300, 0);
|
GL11.glTranslated(0, -(time-theCloud.lastFlyHeight)/300+(double)bobHeight/300, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glTranslatef((float)x+0.5F, (float)y-0.5F, (float)z+0.5F);
|
GL11.glTranslatef((float)x+0.5F, (float)y-0.5F, (float)z+0.5F);
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class RenderSpecial{
|
||||||
|
|
||||||
boolean isBlock = this.theThingToRender.getItem() instanceof ItemBlock;
|
boolean isBlock = this.theThingToRender.getItem() instanceof ItemBlock;
|
||||||
float size = isBlock ? 0.3F : 0.4F;
|
float size = isBlock ? 0.3F : 0.4F;
|
||||||
float offsetUp = isBlock ? 0F : 0.2F;
|
double offsetUp = isBlock ? 0F : 0.2F;
|
||||||
|
|
||||||
if(ClientProxy.pumpkinBlurPumpkinBlur){
|
if(ClientProxy.pumpkinBlurPumpkinBlur){
|
||||||
this.theThingToRender = new ItemStack(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)%2 == 0 ? Blocks.lit_pumpkin : Blocks.pumpkin);
|
this.theThingToRender = new ItemStack(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)%2 == 0 ? Blocks.lit_pumpkin : Blocks.pumpkin);
|
||||||
|
@ -46,9 +46,9 @@ public class RenderSpecial{
|
||||||
offsetUp = 0;
|
offsetUp = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bobHeight = 70;
|
double bobHeight = 70;
|
||||||
long theTime = Minecraft.getSystemTime();
|
double theTime = Minecraft.getSystemTime();
|
||||||
long time = theTime/50;
|
double time = theTime/50;
|
||||||
|
|
||||||
if(time-bobHeight >= lastTimeForBobbing){
|
if(time-bobHeight >= lastTimeForBobbing){
|
||||||
this.lastTimeForBobbing = time;
|
this.lastTimeForBobbing = time;
|
||||||
|
@ -60,13 +60,13 @@ public class RenderSpecial{
|
||||||
GL11.glScalef(size, size, size);
|
GL11.glScalef(size, size, size);
|
||||||
|
|
||||||
if(time-(bobHeight/2) >= lastTimeForBobbing){
|
if(time-(bobHeight/2) >= lastTimeForBobbing){
|
||||||
GL11.glTranslated(0, ((double)time-this.lastTimeForBobbing)/100, 0);
|
GL11.glTranslated(0, (time-this.lastTimeForBobbing)/100, 0);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
GL11.glTranslated(0, -((double)time-lastTimeForBobbing)/100+(double)bobHeight/100, 0);
|
GL11.glTranslated(0, -(time-lastTimeForBobbing)/100+bobHeight/100, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glRotated((double)theTime/20, 0, 1, 0);
|
GL11.glRotated(theTime/20, 0, 1, 0);
|
||||||
|
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
if(this.theThingToRender != null){
|
if(this.theThingToRender != null){
|
||||||
|
|
Loading…
Reference in a new issue