Skip to content

Commit

Permalink
Change CustomFluid And FluidRegistrable
Browse files Browse the repository at this point in the history
  • Loading branch information
FirstMegaGame4 committed Aug 28, 2023
1 parent 84b8cc9 commit 346725a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ public boolean isSource(FluidState state) {
return this.isSource();
}

@Override
public Item getBucketItem() {
return this.bucket;
}

@Override
protected void flow(WorldAccess world, BlockPos pos, BlockState blockState, Direction direction, FluidState fluidState) {
if (direction == Direction.DOWN) {
Expand All @@ -91,6 +86,11 @@ public FluidBlock getBlock() {
return this.block;
}

@Nullable
public BucketItem getBucket() {
return this.bucket;
}

@Override
public boolean isNotRegistered() {
return !this.registered.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public interface FluidRegistrable extends Registrable {

default void register(Identifier identifier) {
if (this instanceof FlowableFluid fluid && this.isNotRegistered()) {
// RegistrationUtils.registerFluid(identifier, fluid);
RegistrationUtils.registerFluid(identifier, fluid);
if (this instanceof CustomFluid custom && custom.isSource()) {
RegistrationUtils.registerBlockWithoutItem(identifier, custom.getBlock());
if (custom.getBucketItem() != null) {
RegistrationUtils.registerItem(identifier, custom.getBucketItem());
if (custom.getBucket() != null) {
RegistrationUtils.registerItem(identifier, custom.getBucket());
}
}
if (this instanceof FluidExtensions extensions) {
Expand Down

0 comments on commit 346725a

Please sign in to comment.