Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3fdc1da
Initial cleanups & optimizations
tal5 Jul 12, 2025
b4b8006
Remove unnecessary `try`
tal5 Jul 12, 2025
78306a0
Cleanup reflection
tal5 Jul 12, 2025
06d6df9
Initial work on fake block light levels
tal5 Jul 17, 2025
d23b772
Minor optimization to `max` handling
tal5 Jul 17, 2025
0a660df
Pass in NMS world
tal5 Jul 17, 2025
a561830
Account for sky darkness
tal5 Jul 17, 2025
9bf7492
Set both block and sky light for smoother visuals
tal5 Jul 17, 2025
515940f
No need for ambient darkness
tal5 Jul 17, 2025
86c96cd
Merge remote-tracking branch 'upstream/dev' into fake_blocks_rewritin…
tal5 Jul 18, 2025
f211000
Bring back some short-circuiting
tal5 Jul 18, 2025
15d8371
Handle all semi-transparent blocks' lighting
tal5 Jul 24, 2025
47c2988
Naming, comments
tal5 Jul 27, 2025
54b908c
Skip lighting if the existing state isn't solid
tal5 Jul 27, 2025
97e44bc
Split up fake block packet handlers
tal5 Jul 28, 2025
2024dbf
Cleanup fake block handlers
tal5 Jul 28, 2025
365d4b6
Don't make new section blocks packet unless needed
tal5 Jul 28, 2025
ca77b2a
Merge remote-tracking branch 'upstream/dev' into fake_blocks_rewritin…
tal5 Jul 28, 2025
19c450b
Section block packets: use `MethodHandle`s
tal5 Jul 28, 2025
4d00a6e
Minor change
tal5 Jul 29, 2025
34d4e1d
Merge remote-tracking branch 'upstream/dev' into fake_blocks_rewritin…
tal5 Sep 23, 2025
29b3a87
Reflection fixup
tal5 Sep 23, 2025
6acdb14
Persist light through fake blocks between sections
tal5 Sep 27, 2025
46fedf5
No `EnumMap`
tal5 Sep 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ public static List<FakeBlock> getFakeBlocksFor(UUID id, ChunkCoordinate chunkCoo
public final ChunkCoordinate chunkCoord;
public MaterialTag material;
public BukkitTask currentTask = null;
public int lastBlockLight = -1;
public int lastSkyLight = -1;

private FakeBlock(PlayerTag player, LocationTag location) {
this.player = player;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ public class ReflectionMappingsInfo {
// net.minecraft.network.protocol.game.ClientboundSetPassengersPacket
public static String ClientboundSetPassengersPacket_passengers = "c";

// net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData
public static String ClientboundLevelChunkPacketData_buffer = "d";
public static String ClientboundLevelChunkPacketData_blockEntitiesData = "e";

// net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData$BlockEntityInfo
public static String ClientboundLevelChunkPacketDataBlockEntityInfo_create_method = "a";
public static String ClientboundLevelChunkPacketDataBlockEntityInfo_packedXZ = "c";
public static String ClientboundLevelChunkPacketDataBlockEntityInfo_y = "d";

Expand All @@ -111,12 +116,6 @@ public class ReflectionMappingsInfo {
// net.minecraft.tags.TagNetworkSerialization$NetworkPayload
public static String TagNetworkSerializationNetworkPayload_tags = "b";

// net.minecraft.core.HolderSet$Named
public static String HolderSetNamed_bind_method = "b";

// net.minecraft.core.Holder$Reference
public static String HolderReference_bindTags_method = "a";

// net.minecraft.server.level.ServerLevel
public static String ServerLevel_sleepStatus = "R";

Expand All @@ -125,4 +124,7 @@ public class ReflectionMappingsInfo {

// net.minecraft.stats.ServerRecipeBook
public static String ServerRecipeBook_addHighlight_method = "e";

// net.minecraft.world.level.block.entity.BlockEntityType
public static String BlockEntityType_validBlocks = "Y";
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static <T extends Packet<?>> T copyPacket(T original, StreamCodec<? super

@FunctionalInterface
public interface PacketHandler<T extends Packet<ClientGamePacketListener>> {
Packet<ClientGamePacketListener> handlePacket(DenizenNetworkManagerImpl networkManager, T packet) throws Exception;
Packet<ClientGamePacketListener> handlePacket(DenizenNetworkManagerImpl networkManager, T packet) throws Throwable;
}

public static final Map<Class<? extends Packet<ClientGamePacketListener>>, List<PacketHandler<?>>> packetHandlers = new HashMap<>();
Expand Down Expand Up @@ -376,7 +376,7 @@ public Packet<ClientGamePacketListener> processPacketHandlersFor(Packet<ClientGa
try {
processed = packetHandler.handlePacket(this, packet);
}
catch (Exception ex) {
catch (Throwable ex) {
Debug.echoError("Packet handler for " + packet.getClass().getCanonicalName() + " threw an exception:");
Debug.echoError(ex);
continue;
Expand Down
Loading