Skip to content

Commit

Permalink
Fixed wrong time calculation for gettingSundamage #release
Browse files Browse the repository at this point in the history
  • Loading branch information
maxanier committed May 25, 2015
1 parent 33f5065 commit 03366d7
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -625,14 +625,16 @@ public void onToggleAutoFillBlood() {
}

public boolean gettingSundamage() {
if (player.worldObj != null
&& player.worldObj.canBlockSeeTheSky(

if (player.worldObj != null){
int time=(int) (player.worldObj.getWorldTime()%24000);
if(player.worldObj.canBlockSeeTheSky(
MathHelper.floor_double(player.posX),
MathHelper.floor_double(player.posY),
MathHelper.floor_double(player.posZ))
&& (player.worldObj.getWorldTime() > 1000 && player.worldObj
.getWorldTime() < 12000)) {
&& (time> 1000 && time < 12000)) {
return true;
}
}
return false;
}
Expand Down

0 comments on commit 03366d7

Please sign in to comment.