Skip to content

Commit

Permalink
backport some 2.6.0 changes
Browse files Browse the repository at this point in the history
* Empty ceramic buckets cannot interact any longer with tanks with less than 1000mb. (#53 fixed)
* Filled ceramic buckets cannot interact with tanks with less than 1000mb empty space.
* change pike texture of Upgrade Aquatic mod #50
  • Loading branch information
cech12 committed Apr 27, 2021
1 parent 048dca2 commit bee7ed4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=2.5.5
mod_version=2.6.0
minecraft_version=1.15.2

forge_version=1.15.2-31.1.75
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public UpgradeAquaticCompat() {
this.addFish("immortal_jellyfish");
this.addFish("lionfish");
this.addFish("nautilus");
//this.addFish("perch"); //added in 1.16
this.addFish("pike");
this.addSquid();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,12 @@ protected void setFluid(FluidStack fluid) {
this.container = CeramicBucketUtils.getFilledCeramicBucket(fluid.getFluid(), this.container);
}

@Override
public int fill(FluidStack resource, FluidAction doFill) {
//only fill the bucket, if there is enough fluid to fill the bucket completely
if (resource.getAmount() < FluidAttributes.BUCKET_VOLUME) {
return 0;
}
return super.fill(resource, doFill);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ protected void setContainerToEmpty() {
@Nonnull
@Override
public FluidStack drain(int maxDrain, FluidAction action) {
//only drain the bucket, if there is enough space to drain the bucket completely
if (maxDrain < FluidAttributes.BUCKET_VOLUME) {
return FluidStack.EMPTY;
}
//consider infinity enchantment
if (action == FluidAction.EXECUTE
&& CeramicBucketUtils.isAffectedByInfinityEnchantment(this.container)) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bee7ed4

Please sign in to comment.