diff options
| author | mat <git@matdoes.dev> | 2025-04-17 22:17:18 +0200 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-04-17 11:09:14 -0930 |
| commit | 2aa046c4b50a0de850eb567cd8bced03e8f99bd6 (patch) | |
| tree | 2fda147226a725b588ef0e7ff36b22cad6509bd4 /azalea-physics/src | |
| parent | 6a83a6fa387170ae71fbe06791cf3afa20aac1df (diff) | |
| download | azalea-drasl-2aa046c4b50a0de850eb567cd8bced03e8f99bd6.tar.xz | |
make BlockState::id private
Diffstat (limited to 'azalea-physics/src')
| -rw-r--r-- | azalea-physics/src/collision/blocks.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/azalea-physics/src/collision/blocks.rs b/azalea-physics/src/collision/blocks.rs index 048ee067..ec1efc4d 100644 --- a/azalea-physics/src/collision/blocks.rs +++ b/azalea-physics/src/collision/blocks.rs @@ -4910,19 +4910,21 @@ static SHAPE760: LazyLock<VoxelShape> = impl BlockWithShape for BlockState { fn collision_shape(&self) -> &'static VoxelShape { COLLISION_SHAPES_MAP - .get(self.id as usize) + .get(self.id() as usize) .unwrap_or(&&SHAPE1) } fn outline_shape(&self) -> &'static VoxelShape { - OUTLINE_SHAPES_MAP.get(self.id as usize).unwrap_or(&&SHAPE1) + OUTLINE_SHAPES_MAP + .get(self.id() as usize) + .unwrap_or(&&SHAPE1) } fn is_collision_shape_empty(&self) -> bool { - matches!(self.id, 0|29..=42|45..=84|86..=117|1987..=2034|2047..=2050|2054..=2056|2109..=2136|2401..=2918|3042..=4337|4342..=4349|4366..=4589|4622..=4685|4758..=4777|4858..=4913|4922..=5385|5450..=5705|5802..=5827|5892..=5905|5908..=5911|5916..=5950|5978..=5993|6037..=6041|6043..=6044|7056..=7239|7368..=7369|7372..=7373|7376..=7377|7380..=7381|7384..=7385|7388..=7389|7392..=7393|7396..=7397|8169..=8172|8190|8305..=8448|8709|8712|9033|9036|9380..=9563|9588..=9635|9952..=9983|10129..=10152|11256..=11287|11636..=11967|12205..=12206|12209..=12210|12213..=12214|12217..=12218|12221..=12222|12225..=12226|12229..=12230|12233..=12234|12237..=12238|12241..=12242|12245..=12246|12249..=12250|12253..=12254|12257..=12258|12261..=12262|12265..=12266|12269..=12270|12273..=12274|12277..=12278|12281..=12282|12285..=12286|12289..=12290|12293..=12294|12297..=12298|12301..=12302|12305..=12306|12309..=12310|12313..=12314|12317..=12318|12321..=12322|12325..=12326|12329..=12330|12333..=12334|12337..=12338|12341..=12342|12345..=12346|12349..=12350|12353..=12354|12357..=12358|12361..=12362|12365..=12366|12369..=12370|12373..=12374|12377..=12378|12381..=12382|12385..=12386|12389..=12390|12393..=12394|12429..=12430|12433..=12434|12437..=12438|12441..=12442|12445..=12446|12449..=12450|12453..=12454|12457..=12458|12461..=12462|12465..=12466|12469..=12470|12473..=12474|12477..=12478|12481..=12482|12485..=12486|12489..=12490|13518..=13519|13522|13524|13526|13528|13530..=13535|13537|13572|13783..=13809|13836..=13955|13967|13981..=13984|15189|15192|15513|15516|15837|15840|16161|16164|16485|16488|16809|16812|17133|17136|17457|17460|17781|17784|18105|18108|18429|18432|18753|18756|19077|19080|19598..=19601|19615|19617..=19618|19632|19634..=19688|19703..=19706|19899..=19900|19903..=19904|19907..=19908|19911..=19912|19915..=19916|19919..=19920|19923..=19924|19927..=19928|19931..=19932|19935..=19936|19939..=19940|19943..=19944|19947..=19948|19951..=19952|19955..=19956|19959..=19960|20123..=20170|20299..=20378|20575|20578|20995|20998|21400..=21425|21432|21435|22202|22205|22613|22616|23025|23028|23346|23828..=23955|25797..=25851|25855..=25870|25910..=25911|25918..=25919|25926..=25927|25934..=25961|26060|26063|26471|26474|26882|26885|27293|27296|27632) + matches!(self.id(), 0|29..=42|45..=84|86..=117|1987..=2034|2047..=2050|2054..=2056|2109..=2136|2401..=2918|3042..=4337|4342..=4349|4366..=4589|4622..=4685|4758..=4777|4858..=4913|4922..=5385|5450..=5705|5802..=5827|5892..=5905|5908..=5911|5916..=5950|5978..=5993|6037..=6041|6043..=6044|7056..=7239|7368..=7369|7372..=7373|7376..=7377|7380..=7381|7384..=7385|7388..=7389|7392..=7393|7396..=7397|8169..=8172|8190|8305..=8448|8709|8712|9033|9036|9380..=9563|9588..=9635|9952..=9983|10129..=10152|11256..=11287|11636..=11967|12205..=12206|12209..=12210|12213..=12214|12217..=12218|12221..=12222|12225..=12226|12229..=12230|12233..=12234|12237..=12238|12241..=12242|12245..=12246|12249..=12250|12253..=12254|12257..=12258|12261..=12262|12265..=12266|12269..=12270|12273..=12274|12277..=12278|12281..=12282|12285..=12286|12289..=12290|12293..=12294|12297..=12298|12301..=12302|12305..=12306|12309..=12310|12313..=12314|12317..=12318|12321..=12322|12325..=12326|12329..=12330|12333..=12334|12337..=12338|12341..=12342|12345..=12346|12349..=12350|12353..=12354|12357..=12358|12361..=12362|12365..=12366|12369..=12370|12373..=12374|12377..=12378|12381..=12382|12385..=12386|12389..=12390|12393..=12394|12429..=12430|12433..=12434|12437..=12438|12441..=12442|12445..=12446|12449..=12450|12453..=12454|12457..=12458|12461..=12462|12465..=12466|12469..=12470|12473..=12474|12477..=12478|12481..=12482|12485..=12486|12489..=12490|13518..=13519|13522|13524|13526|13528|13530..=13535|13537|13572|13783..=13809|13836..=13955|13967|13981..=13984|15189|15192|15513|15516|15837|15840|16161|16164|16485|16488|16809|16812|17133|17136|17457|17460|17781|17784|18105|18108|18429|18432|18753|18756|19077|19080|19598..=19601|19615|19617..=19618|19632|19634..=19688|19703..=19706|19899..=19900|19903..=19904|19907..=19908|19911..=19912|19915..=19916|19919..=19920|19923..=19924|19927..=19928|19931..=19932|19935..=19936|19939..=19940|19943..=19944|19947..=19948|19951..=19952|19955..=19956|19959..=19960|20123..=20170|20299..=20378|20575|20578|20995|20998|21400..=21425|21432|21435|22202|22205|22613|22616|23025|23028|23346|23828..=23955|25797..=25851|25855..=25870|25910..=25911|25918..=25919|25926..=25927|25934..=25961|26060|26063|26471|26474|26882|26885|27293|27296|27632) } fn is_collision_shape_full(&self) -> bool { - matches!(self.id, 1..=21|26..=28|85|118..=156|160..=188|192..=245|249..=447|476..=1730|2041..=2046|2063..=2068|2093..=2108|2137..=2400|2919|4338..=4341|4358..=4365|5912..=5915|5958..=5959|5977|5994..=5995|6028|6030..=6036|6042|6045..=6052|6124..=6139|6780..=6983|7054..=7055|7640..=7641|8056|8199|8201..=8202|8295..=8296|8449|8690..=8702|10032..=10033|10044..=10048|10153..=10180|11253..=11255|11352..=11354|11599..=11600|11605..=11606|11611..=11616|11633..=11635|11968..=11970|12055..=12056|12061..=12062|12067..=12068|12073..=12074|12079..=12080|12085..=12086|12091..=12092|12103..=12104|12109..=12110|12115..=12116|12121..=12122|12127..=12128|12133..=12134|12139..=12140|12145..=12146|12151..=12152|12157..=12158|12163..=12164|12169..=12170|12175..=12176|12181..=12182|12187..=12188|12193..=12194|12199..=12204|13427..=13436|13517|13538..=13571|13573..=13782|13810|13826..=13835|13964|15109..=15110|15115..=15116|15121..=15122|15127..=15128|15133..=15134|15139..=15140|15145..=15146|15151..=15152|15157..=15158|15163..=15164|15169..=15170|15175..=15176|15181..=15182|19427..=19460|19489|19602..=19614|19616|19619..=19631|19633|19689..=19690|19695..=19696|19701..=19702|20379..=20394|20409..=20472|20474..=20482|20487..=20488|20897..=20902|20907..=20908|21313|21398..=21399|21750..=21752|22059..=22060|22109|22114..=22115|22520|22525..=22526|22931..=22932|22937..=22938|23343..=23345|23827|23956..=23957|23966..=23983|24308..=24309|24314..=24315|24320..=24321|24326..=24335|24660..=24661|24666..=24667|24672..=24673|24678..=24679|25704..=25751|25796|25903|25962|25964..=25967|26052..=26053|26378|26463..=26464|26789|26874..=26875|27200|27285..=27286|27611..=27620|27623..=27631|27633|27650..=27703) + matches!(self.id(), 1..=21|26..=28|85|118..=156|160..=188|192..=245|249..=447|476..=1730|2041..=2046|2063..=2068|2093..=2108|2137..=2400|2919|4338..=4341|4358..=4365|5912..=5915|5958..=5959|5977|5994..=5995|6028|6030..=6036|6042|6045..=6052|6124..=6139|6780..=6983|7054..=7055|7640..=7641|8056|8199|8201..=8202|8295..=8296|8449|8690..=8702|10032..=10033|10044..=10048|10153..=10180|11253..=11255|11352..=11354|11599..=11600|11605..=11606|11611..=11616|11633..=11635|11968..=11970|12055..=12056|12061..=12062|12067..=12068|12073..=12074|12079..=12080|12085..=12086|12091..=12092|12103..=12104|12109..=12110|12115..=12116|12121..=12122|12127..=12128|12133..=12134|12139..=12140|12145..=12146|12151..=12152|12157..=12158|12163..=12164|12169..=12170|12175..=12176|12181..=12182|12187..=12188|12193..=12194|12199..=12204|13427..=13436|13517|13538..=13571|13573..=13782|13810|13826..=13835|13964|15109..=15110|15115..=15116|15121..=15122|15127..=15128|15133..=15134|15139..=15140|15145..=15146|15151..=15152|15157..=15158|15163..=15164|15169..=15170|15175..=15176|15181..=15182|19427..=19460|19489|19602..=19614|19616|19619..=19631|19633|19689..=19690|19695..=19696|19701..=19702|20379..=20394|20409..=20472|20474..=20482|20487..=20488|20897..=20902|20907..=20908|21313|21398..=21399|21750..=21752|22059..=22060|22109|22114..=22115|22520|22525..=22526|22931..=22932|22937..=22938|23343..=23345|23827|23956..=23957|23966..=23983|24308..=24309|24314..=24315|24320..=24321|24326..=24335|24660..=24661|24666..=24667|24672..=24673|24678..=24679|25704..=25751|25796|25903|25962|25964..=25967|26052..=26053|26378|26463..=26464|26789|26874..=26875|27200|27285..=27286|27611..=27620|27623..=27631|27633|27650..=27703) } } |
