Skip to content

Commit

Permalink
Compiles & runs! Collisions & block highlight works, terrain renderin…
Browse files Browse the repository at this point in the history
…g does not (yet)
  • Loading branch information
Cadiboo committed Sep 11, 2023
1 parent 2583542 commit 4ea414f
Show file tree
Hide file tree
Showing 25 changed files with 436 additions and 559 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.github.cadiboo.nocubes;

import io.github.cadiboo.nocubes.network.NoCubesNetwork;
import io.github.cadiboo.nocubes.network.S2CSyncConfig;
import io.github.cadiboo.nocubes.repackage.net.minecraftforge.network.ConfigSync;
import io.github.cadiboo.nocubes.world.ModWorldEventListener;
Expand Down Expand Up @@ -42,7 +43,7 @@ public static void onPlayerLoggedInEvent(final PlayerEvent.PlayerLoggedInEvent e
return;
}
final EntityPlayerMP playerMP = (EntityPlayerMP) player;
final SimpleNetworkWrapper network = NoCubes.CHANNEL;
final SimpleNetworkWrapper network = NoCubesNetwork.CHANNEL;
for (final Pair<String, S2CSyncConfig> pair : ConfigSync.INSTANCE.syncConfigs(false)) {
network.sendTo(pair.getValue(), playerMP);
}
Expand Down
44 changes: 22 additions & 22 deletions src/main/java/io/github/cadiboo/nocubes/client/ClientCacheUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@
*/
public final class ClientCacheUtil {

public static LightCache generateLazyPackedLightCache(
// from position
final int fromX, final int fromY, final int fromZ,
// to position
final int toX, final int toY, final int toZ,
// the difference between the chunkRenderPosition and from position. Always positive
final int startPaddingX, final int startPaddingY, final int startPaddingZ,
final int renderChunkPosX, final int renderChunkPosY, final int renderChunkPosZ,
@Nonnull final StateCache stateCache,
@Nonnull final IBlockAccess cache
) {
final int cacheSizeX = Math.abs(toX - fromX);
final int cacheSizeY = Math.abs(toY - fromY);
final int cacheSizeZ = Math.abs(toZ - fromZ);
return LightCache.retain(
startPaddingX, startPaddingY, startPaddingZ,
cacheSizeX, cacheSizeY, cacheSizeZ,
cache,
stateCache,
renderChunkPosX, renderChunkPosY, renderChunkPosZ
);
}
// public static LightCache generateLazyPackedLightCache(
// // from position
// final int fromX, final int fromY, final int fromZ,
// // to position
// final int toX, final int toY, final int toZ,
// // the difference between the chunkRenderPosition and from position. Always positive
// final int startPaddingX, final int startPaddingY, final int startPaddingZ,
// final int renderChunkPosX, final int renderChunkPosY, final int renderChunkPosZ,
// @Nonnull final StateCache stateCache,
// @Nonnull final IBlockAccess cache
// ) {
// final int cacheSizeX = Math.abs(toX - fromX);
// final int cacheSizeY = Math.abs(toY - fromY);
// final int cacheSizeZ = Math.abs(toZ - fromZ);
// return LightCache.retain(
// startPaddingX, startPaddingY, startPaddingZ,
// cacheSizeX, cacheSizeY, cacheSizeZ,
// cache,
// stateCache,
// renderChunkPosX, renderChunkPosY, renderChunkPosZ
// );
// }

public static LazyBlockColorCache generateLazyBlockColorCache(
// from position
Expand Down
Loading

0 comments on commit 4ea414f

Please sign in to comment.