Skip to content

Commit

Permalink
- fix: BucketItemReg works abnormal.
Browse files Browse the repository at this point in the history
  • Loading branch information
MegumiKasuga committed Dec 2, 2024
1 parent f2f712e commit 1ae68c2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
31 changes: 31 additions & 0 deletions src/main/java/kasuga/lib/registrations/common/BucketItemReg.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package kasuga.lib.registrations.common;

import kasuga.lib.core.annos.Mandatory;
import kasuga.lib.core.annos.Optional;
import kasuga.lib.core.base.SimpleCreativeTab;
import kasuga.lib.core.base.item_helper.ExternalProperties;
import kasuga.lib.registrations.Reg;
import kasuga.lib.registrations.registry.SimpleRegistry;
Expand Down Expand Up @@ -118,6 +120,35 @@ public BucketItemReg<T> itemType(BucketBuilder<? extends BucketItem> builder) {
return this;
}

@Optional
public ItemReg<T> tab(CreativeTabReg tab) {
properties.tab(tab.getTab());
return this;
}

@Optional
public ItemReg<T> tab(SimpleCreativeTab tab) {
properties.tab(tab);
return this;
}

@Optional
public ItemReg<T> stackTo(int size) {
properties.stacksTo(size);
return this;
}

/**
* Customize your item's property.
* @param identifier Item property customizer.
* @return self.
*/
@Optional
public ItemReg<T> withProperty(PropertyIdentifier identifier) {
identifier.apply(properties);
return this;
}

/**
* Submit your config to minecraft and forge registry.
* @param registry the mod SimpleRegistry.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ public FluidReg<E> typeProperty(PropertyBuilder builder) {
@Mandatory
public FluidReg<E> basicFluidProperties(int lightLevel, int density, int viscosity, boolean canSupportBoating) {
return lightLevel(lightLevel).canSupportBoating(canSupportBoating).density(density).viscosity(viscosity);

}

public FluidReg<E> lightLevel(int lightLevel) {
Expand Down

0 comments on commit 1ae68c2

Please sign in to comment.