Merge pull request #200 from Null-MC/floodfill.blockentity-fix

FloodFill Entity Fix
This commit is contained in:
Xonk 2024-06-17 16:23:30 -04:00 committed by GitHub
commit 19cecb224e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 73 additions and 68 deletions

View File

@ -487,45 +487,45 @@ block.265=mcwlights:yellow_lamp:lit=true mcwlights:yellow_paper_lamp:lit=true mc
block.301=glass glass_pane
block.302=honey_block
block.302=black_stained_glass black_stained_glass_pane
block.303=ice frosted_ice
block.303=blue_stained_glass blue_stained_glass_pane
block.304=nether_portal
block.304=brown_stained_glass brown_stained_glass_pane
block.305=slime_block
block.305=cyan_stained_glass cyan_stained_glass_pane
block.306=black_stained_glass black_stained_glass_pane
block.306=gray_stained_glass gray_stained_glass_pane
block.307=blue_stained_glass blue_stained_glass_pane
block.307=green_stained_glass green_stained_glass_pane
block.308=brown_stained_glass brown_stained_glass_pane
block.308=light_blue_stained_glass light_blue_stained_glass_pane
block.309=cyan_stained_glass cyan_stained_glass_pane
block.309=light_gray_stained_glass light_gray_stained_glass_pane
block.310=gray_stained_glass gray_stained_glass_pane
block.310=lime_stained_glass lime_stained_glass_pane
block.311=green_stained_glass green_stained_glass_pane
block.311=magenta_stained_glass magenta_stained_glass_pane
block.312=light_blue_stained_glass light_blue_stained_glass_pane
block.312=orange_stained_glass orange_stained_glass_pane
block.313=light_gray_stained_glass light_gray_stained_glass_pane
block.313=pink_stained_glass pink_stained_glass_pane
block.314=lime_stained_glass lime_stained_glass_pane
block.314=purple_stained_glass purple_stained_glass_pane
block.315=magenta_stained_glass magenta_stained_glass_pane
block.315=red_stained_glass red_stained_glass_pane
block.316=orange_stained_glass orange_stained_glass_pane
block.316=white_stained_glass white_stained_glass_pane
block.317=pink_stained_glass pink_stained_glass_pane
block.317=yellow_stained_glass yellow_stained_glass_pane
block.318=purple_stained_glass purple_stained_glass_pane
block.318=honey_block
block.319=red_stained_glass red_stained_glass_pane
block.319=ice frosted_ice
block.320=white_stained_glass white_stained_glass_pane
block.320=nether_portal
block.321=yellow_stained_glass yellow_stained_glass_pane
block.321=slime_block
####### ----- LPV shapes ----- #######

View File

@ -830,18 +830,8 @@ void main() {
// reflective translucents / glass
switch (blockId) {
case BLOCK_HONEY:
tintColor = vec3(0.984, 0.733, 0.251);
mixWeight = 1.0;
break;
case BLOCK_NETHER_PORTAL:
lightColor = vec3(0.502, 0.165, 0.831);
tintColor = vec3(0.502, 0.165, 0.831);
lightRange = 11.0;
mixWeight = 1.0;
break;
case BLOCK_SLIME:
tintColor = vec3(0.408, 0.725, 0.329);
case BLOCK_GLASS:
tintColor = vec3(1.0);
mixWeight = 1.0;
break;
case BLOCK_GLASS_BLACK:
@ -908,6 +898,20 @@ void main() {
tintColor = vec3(0.965, 0.965, 0.123);
mixWeight = 1.0;
break;
case BLOCK_HONEY:
tintColor = vec3(0.984, 0.733, 0.251);
mixWeight = 1.0;
break;
case BLOCK_NETHER_PORTAL:
lightColor = vec3(0.502, 0.165, 0.831);
tintColor = vec3(0.502, 0.165, 0.831);
lightRange = 11.0;
mixWeight = 1.0;
break;
case BLOCK_SLIME:
tintColor = vec3(0.408, 0.725, 0.329);
mixWeight = 1.0;
break;
// LPV shapes

View File

@ -179,26 +179,26 @@
#define BLOCK_LAMP_LIT_WHITE 264
#define BLOCK_LAMP_LIT_YELLOW 265
#define BLOCK_GLASS 301
#define BLOCK_HONEY 302
#define BLOCK_ICE 303
#define BLOCK_NETHER_PORTAL 304
#define BLOCK_SLIME 305
#define BLOCK_GLASS_BLACK 306
#define BLOCK_GLASS_BLUE 307
#define BLOCK_GLASS_BROWN 308
#define BLOCK_GLASS_CYAN 309
#define BLOCK_GLASS_GRAY 310
#define BLOCK_GLASS_GREEN 311
#define BLOCK_GLASS_LIGHT_BLUE 312
#define BLOCK_GLASS_LIGHT_GRAY 313
#define BLOCK_GLASS_LIME 314
#define BLOCK_GLASS_MAGENTA 315
#define BLOCK_GLASS_ORANGE 316
#define BLOCK_GLASS_PINK 317
#define BLOCK_GLASS_PURPLE 318
#define BLOCK_GLASS_RED 319
#define BLOCK_GLASS_WHITE 320
#define BLOCK_GLASS_YELLOW 321
#define BLOCK_GLASS_BLACK 302
#define BLOCK_GLASS_BLUE 303
#define BLOCK_GLASS_BROWN 304
#define BLOCK_GLASS_CYAN 305
#define BLOCK_GLASS_GRAY 306
#define BLOCK_GLASS_GREEN 307
#define BLOCK_GLASS_LIGHT_BLUE 308
#define BLOCK_GLASS_LIGHT_GRAY 309
#define BLOCK_GLASS_LIME 310
#define BLOCK_GLASS_MAGENTA 311
#define BLOCK_GLASS_ORANGE 312
#define BLOCK_GLASS_PINK 313
#define BLOCK_GLASS_PURPLE 314
#define BLOCK_GLASS_RED 315
#define BLOCK_GLASS_WHITE 316
#define BLOCK_GLASS_YELLOW 317
#define BLOCK_HONEY 318
#define BLOCK_ICE 319
#define BLOCK_NETHER_PORTAL 320
#define BLOCK_SLIME 321
#define BLOCK_LPV_IGNORE 401
#define BLOCK_CARPET 402
#define BLOCK_DOOR_N 403

View File

@ -11,7 +11,6 @@ void SetVoxelBlock(const in vec3 playerPos, const in uint blockId) {
}
void PopulateShadowVoxel(const in vec3 playerPos) {
//int blockId = int(mc_Entity.x + 0.5);
uint voxelId = uint(mc_Entity.x + 0.5);
vec3 originPos = playerPos;
@ -22,6 +21,7 @@ void PopulateShadowVoxel(const in vec3 playerPos) {
#ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE
if (voxelId == 0u && at_midBlock.w > 0) voxelId = uint(BLOCK_LIGHT_1 + at_midBlock.w - 1);
#endif
if (voxelId == 0u) voxelId = 1u;
originPos += at_midBlock.xyz/64.0;
@ -32,7 +32,7 @@ void PopulateShadowVoxel(const in vec3 playerPos) {
((renderStage == MC_RENDER_STAGE_ENTITIES && (currentRenderedItemId > 0 || entityId > 0)) || renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES)
) {
if (renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES) {
if (blockEntityId > 0)
if (blockEntityId > 0 && blockEntityId < 500)
voxelId = uint(blockEntityId);
}
else if (currentRenderedItemId > 0 && currentRenderedItemId < 1000) {

View File

@ -670,18 +670,6 @@ block.*= minecraft:hanging_roots minecraft:weeping_vines minecraft:cave_vines:be
#= BLOCK_GLASS
block.301= glass glass_pane
#= BLOCK_HONEY
block.*= honey_block
#= BLOCK_ICE
block.*= ice frosted_ice
#= BLOCK_NETHER_PORTAL
block.*= nether_portal
#= BLOCK_SLIME
block.*= slime_block
#= BLOCK_GLASS_BLACK
block.*= black_stained_glass black_stained_glass_pane
@ -730,6 +718,18 @@ block.*= minecraft:hanging_roots minecraft:weeping_vines minecraft:cave_vines:be
#= BLOCK_GLASS_YELLOW
block.*= yellow_stained_glass yellow_stained_glass_pane
#= BLOCK_HONEY
block.*= honey_block
#= BLOCK_ICE
block.*= ice frosted_ice
#= BLOCK_NETHER_PORTAL
block.*= nether_portal
#= BLOCK_SLIME
block.*= slime_block
####### ----- LPV shapes ----- #######

View File

@ -235,7 +235,7 @@ void main() {
(InterpolateFromBase && (blockId == BLOCK_GRASS_TALL_LOWER || blockId == BLOCK_GROUND_WAVING || blockId == BLOCK_GRASS_SHORT || blockId == BLOCK_SAPLING || blockId == BLOCK_GROUND_WAVING_VERTICAL))
// these wave off of the ceiling. the area connected to the ceiling does not wave.
|| (!InterpolateFromBase && (blockId == 17))
|| (!InterpolateFromBase && (blockId == BLOCK_VINE_OTHER))
// these wave off of the air. they wave uniformly
|| (blockId == BLOCK_GRASS_TALL_UPPER || blockId == BLOCK_AIR_WAVING)
@ -256,7 +256,8 @@ void main() {
#ifdef DISTORT_SHADOWMAP
if(entityId == 1100) position.xyz = position.xyz - normalize(gl_NormalMatrix * gl_Normal) * 0.25;
if (entityId == ENTITY_SSS_MEDIUM || entityId == ENTITY_SLIME)
position.xyz = position.xyz - normalize(gl_NormalMatrix * gl_Normal) * 0.25;
gl_Position = BiasShadowProjection(toClipSpace3(position));
#else