Skip to content

Commit

Permalink
Clean ups
Browse files Browse the repository at this point in the history
  • Loading branch information
legobmw99 committed Jan 30, 2024
1 parent dfe333f commit 2412eea
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public static void registerParticle(final RegisterParticleProvidersEvent event)
}

public static void clientInit(final FMLClientSetupEvent e) {
e.enqueueWork(() -> {
NeoForge.EVENT_BUS.register(ClientEventHandler.class);
});
e.enqueueWork(() -> NeoForge.EVENT_BUS.register(ClientEventHandler.class));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public static PoseStack prepareToDrawLines(PoseStack start, float partialTicks)

start.pushPose();
Vec3 view = Minecraft.getInstance().cameraEntity.getEyePosition(partialTicks);
// TODO figure out if I can cancel effect of view bobbing
start.translate(-view.x, -view.y, -view.z);
RenderSystem.applyModelViewMatrix();
return start;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public void tick() {

// Add metal blobs to metal list
if (this.blobFuture == null || this.blobFuture.isDone()) {
// TODO cache chunks? https://github.com/TelepathicGrunt/Bumblezone/blob/c8ca66e62e102d512393bec7186e3764e13434bf/common/src/main/java/com/telepathicgrunt/the_bumblezone/items/essence/LifeEssence.java#L150-L192
this.blobFuture = Util.backgroundExecutor().submit(() -> {
this.seen.clear();
BlockPos
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/legobmw99/allomancy/util/SyncList.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void forEach(Consumer<T> f) {
* a swapAndClearOld is completed.
*/
public void add(T t) {
if (this.AorB.get() % 2 == 1) {
if (this.AorB.get() % 2 != 0) {
this.list_a.add(t);
} else {
this.list_b.add(t);
Expand All @@ -68,7 +68,7 @@ public void swapAndClearOld() {
this.swapLock.lock();
int newAB = this.AorB.incrementAndGet();
this.swapLock.unlock();
if (newAB % 2 == 1) {
if (newAB % 2 != 0) {
this.list_a.clear();
} else {
this.list_b.clear();
Expand Down

0 comments on commit 2412eea

Please sign in to comment.