Skip to content

Conversation

MC-Samuel
Copy link
Contributor

@MC-Samuel MC-Samuel commented Sep 7, 2025

  • BrewingStandFueledScriptEvent: Deprecated "consuming" and "not_consuming" determinations into just "consume:<ElementTag(Boolean)>", modernized determination format, minor getContext format change
  • CauldronLevelChangeScriptEvent: Removed deprecated methods of #getOldLevel and #getNewLevel, modernized determination format, minor getContext format change
  • FurnaceBurnsItemScriptEvent: Modernized determination format, minor getContext format change
  • FurnaceStartsSmeltingScriptEvent: Removed examples, modernized determination format, minor getContext format change
  • LeafDecaysScriptEvent: Minor getContext format change
  • LiquidLevelChangesScriptEvent: Minor getContext format change
  • NoteBlockPlaysNoteScriptEvent: Minor getContext and getSound format changes
  • PistonExtendsScriptEvent: Minor getContext format change
  • PistonRetractsScriptEvent: Minor getContext format change
  • RedstoneScriptEvent: Modernized determination format, minor getContext format change

return false;
}
String changeType = path.eventArgLowerAt(2);
if (changeType.equals("raises")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, but these could probably be a switch statement

this.<CauldronLevelChangeScriptEvent, ElementTag>registerOptionalDetermination(null, ElementTag.class, (evt, context, level) -> {
if (level.isInt()) {
evt.newLevel = level.asInt();
((Levelled) evt.event.getNewState().getBlockData()).setLevel(newLevel);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this with e.g. an empty cauldron getting a level or a cauldron emptying? I believe the point of the deprecation was that while lava/water_cauldron are levelled, the base cauldron isn't.

String changeType = path.eventArgLowerAt(2);
if (changeType.equals("raises")) {
if (event.getNewLevel() <= event.getOldLevel()) {
if (path.eventArgLowerAt(2).equals("raises")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you replaced the variable with calling eventArgLowerAt for every check?

public FurnaceBurnsItemScriptEvent() {
registerCouldMatcher("furnace burns <item>");
this.<FurnaceBurnsItemScriptEvent, DurationTag>registerDetermination(null, DurationTag.class, (evt, context, time) -> {
evt.event.setBurnTime(time.getTicksAsInt());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is a breaking change? Previously inputting just a number would go through the ElementTag handling and be set as ticks, now it'll be converted into a DurationTag and be set as seconds (unless setBurnTime is in seconds instead of ticks for some reason).

@MC-Samuel MC-Samuel requested a review from tal5 October 13, 2025 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants