Skip to content

Commit

Permalink
fixed incompatibility with the powder snow bucket of the Forbidden Ar…
Browse files Browse the repository at this point in the history
…canus mod. #52
  • Loading branch information
cech12 committed Oct 10, 2024
1 parent 1ab0261 commit 0e381de
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/).

## [1.20.4-3.2.2.1] - 2024-10-10
### Fixed
- There was an incompatibility with the powder snow bucket of the Forbidden Arcanus mod. (thanks to SirTwsted for the report) #52

## [1.20.4-3.2.2.0] - 2024-09-30
### Added
- new fluid tag "bucketlib:no_flipping" to list all fluids that should be displayed in a normal bucket instead of a 180° flipped bucket. (thanks to Konhaiii for the idea) #50
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,16 @@ private static void readRegistry() {
Level level = Services.PLATFORM.getCurrentLevel();
for (Item item : Services.REGISTRY.getAllItems()) {
if (item instanceof SolidBucketItem bucket) {
bucketBlocks.add(new BucketBlock(bucket.getBlock(), bucket));
if (bucketBlocks.stream().noneMatch(bucketBlock -> bucketBlock.block == bucket.getBlock())) {
bucketBlocks.add(new BucketBlock(bucket.getBlock(), bucket));
}
}
if (item instanceof MobBucketItem bucket) {
EntityType<?> entityType = Services.BUCKET.getEntityTypeOfMobBucketItem(bucket);
if (entityType != null && level != null && entityType.create(level) instanceof Bucketable) {
bucketEntities.add(new BucketEntity(entityType, Services.BUCKET.getFluidOfBucketItem(bucket), bucket));
if (bucketEntities.stream().noneMatch(bucketEntity -> bucketEntity.entityType == entityType)) {
bucketEntities.add(new BucketEntity(entityType, Services.BUCKET.getFluidOfBucketItem(bucket), bucket));
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Project
group=de.cech12.bucketlib
mod_version=3.2.2.0
mod_version=3.2.2.1
mod_id=bucketlib
mod_name=BucketLib
mod_author=Cech12
Expand Down

0 comments on commit 0e381de

Please sign in to comment.