Skip to content

Commit

Permalink
refactor: better method name
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Jan 13, 2025
1 parent d9f18d1 commit fcf16ce
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ public void onInitFinish(BlockEntityInitInfo initInfo) {

container.addOnSlotChangeListener(BrewingStandContainer.REAGENT_SLOT, item -> {
brewTime = item == ItemAirStack.AIR_STACK ? 0 : MAX_BREW_TIME;
sendContainerData(true);
sendBrewingStandContainerData(true);
});
}

@Override
public void tick(long currentTick) {
tick0();
sendContainerData(brewTime % 40 == 0);
tickBrewingStand();
sendBrewingStandContainerData(brewTime % 40 == 0);
}

protected void tick0() {
protected void tickBrewingStand() {
if (!checkFuel()) {
return;
}
Expand Down Expand Up @@ -151,7 +151,7 @@ protected PotionMixRecipe findRecipe(ItemStack ingredient, ItemStack reagent) {
return Registries.POTION_MIX_RECIPES.get(PotionMixRecipe.buildIdentifier(ingredient, reagent));
}

protected void sendContainerData(boolean sendBrewTime) {
protected void sendBrewingStandContainerData(boolean sendBrewTime) {
var container = containerHolderComponent.getContainer();
if (sendBrewTime) {
container.sendContainerData(ContainerSetDataPacket.BREWING_STAND_BREW_TIME, brewTime);
Expand Down

0 comments on commit fcf16ce

Please sign in to comment.