Skip to content

Commit

Permalink
fix: fix crash when breaking and bad maths for directional bits
Browse files Browse the repository at this point in the history
  • Loading branch information
Rushmead committed May 9, 2024
1 parent bfbe54e commit f0c22c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package dev.imabad.theatrical.blockentities.interfaces;

import com.mojang.util.UUIDTypeAdapter;
import com.mojang.util.UndashedUuid;
import dev.imabad.theatrical.TheatricalClient;
import dev.imabad.theatrical.blockentities.BlockEntities;
import dev.imabad.theatrical.blockentities.ClientSyncBlockEntity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ public static Vec3 rayTraceDir(BaseLightBlockEntity be){
tilt = -tilt;
}
float pan = (direction.toYRot() - be.getPan());
if(direction.getAxis() == Direction.WEST.getAxis()){
pan -= 180;
}
if(be instanceof FresnelBlockEntity){
pan *= -1;
}
Expand Down Expand Up @@ -357,6 +360,7 @@ public double doRayTrace() {
@Override
public void setRemoved() {
if(emissionBlock != null){
this.setDynamicLightEnabled(false);
emissionBlock = null;
}
super.setRemoved();
Expand Down

0 comments on commit f0c22c4

Please sign in to comment.