Rename getBuilderFor to build
This commit is contained in:
@@ -70,12 +70,12 @@ public class BuilderAdvancement extends CommandBuilder
|
||||
return this.getNodeAsResourceLocation(3);
|
||||
}
|
||||
|
||||
public BuilderAdvancement getBuilderForAction(EnumActionType action)
|
||||
public BuilderAdvancement build(EnumActionType action)
|
||||
{
|
||||
return this.getBuilder(action, this.getMode());
|
||||
return this.build(action, this.getMode());
|
||||
}
|
||||
|
||||
public BuilderAdvancement getBuilder(EnumActionType action, EnumMode mode)
|
||||
public BuilderAdvancement build(EnumActionType action, EnumMode mode)
|
||||
{
|
||||
return new BuilderAdvancement(action, this.getPlayer(), mode, !EnumMode.EVERYTHING.equals(mode) ? this.getAdvancement() : null);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class BuilderDifficulty extends CommandBuilder
|
||||
{
|
||||
public BuilderDifficulty()
|
||||
{
|
||||
|
||||
super();
|
||||
}
|
||||
|
||||
public BuilderDifficulty(Difficulty difficulty)
|
||||
|
||||
@@ -88,17 +88,17 @@ public class BuilderExperience extends CommandBuilder
|
||||
return syntax;
|
||||
}
|
||||
|
||||
public BuilderExperience getBuilderForAddLevels()
|
||||
public BuilderExperience buildAdd()
|
||||
{
|
||||
return new BuilderExperience(EnumMode.ADD, this.getLevel(), this.getPlayer(), EnumUnit.LEVELS);
|
||||
}
|
||||
|
||||
public BuilderExperience getBuilderForRemoveLevels()
|
||||
public BuilderExperience buildRemove()
|
||||
{
|
||||
return new BuilderExperience(EnumMode.ADD, -this.getLevel(), this.getPlayer(), EnumUnit.LEVELS);
|
||||
}
|
||||
|
||||
public BuilderExperience getBuilderForResetLevels()
|
||||
public BuilderExperience buildReset()
|
||||
{
|
||||
return new BuilderExperience(EnumMode.SET, 0, this.getPlayer(), EnumUnit.LEVELS);
|
||||
}
|
||||
|
||||
@@ -88,12 +88,12 @@ public class BuilderFill extends BuilderDoubleBlockPos
|
||||
return EnumHelper.valueOf(this.getNodeAsString(7), EnumBlockFilter.class);
|
||||
}
|
||||
|
||||
public BuilderFill getBuilderForFill()
|
||||
public BuilderFill build()
|
||||
{
|
||||
return new BuilderFill(this.getBlock1(), null, null);
|
||||
}
|
||||
|
||||
public BuilderFill getBuilderForReplace()
|
||||
public BuilderFill buildReplace()
|
||||
{
|
||||
return new BuilderFill(this.getBlock2(), EnumBlockFilter.REPLACE, this.getBlock1());
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ public class BuilderGamerule extends CommandBuilder
|
||||
{
|
||||
public BuilderGamerule()
|
||||
{
|
||||
|
||||
super();
|
||||
}
|
||||
|
||||
public BuilderGamerule(String rule, String value)
|
||||
@@ -40,7 +40,7 @@ public class BuilderGamerule extends CommandBuilder
|
||||
return this.getNodeAsString(1);
|
||||
}
|
||||
|
||||
public BuilderGamerule getBuilderForValue(String value)
|
||||
public BuilderGamerule build(String value)
|
||||
{
|
||||
return new BuilderGamerule(this.getRule(), value);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class BuilderNoteEditor extends BuilderSetBlock
|
||||
this.setState(BlockStateProperties.NOTE_0_24, note);
|
||||
}
|
||||
|
||||
public BuilderNoteEditor getBuilderForNote(int note)
|
||||
public BuilderNoteEditor build(int note)
|
||||
{
|
||||
return new BuilderNoteEditor(note, this.getBlockPos());
|
||||
}
|
||||
|
||||
@@ -150,17 +150,17 @@ public class BuilderPotionEffect extends CommandBuilder
|
||||
this.setDuration(EffectNBT.toSeconds(this.seconds, this.minutes, this.hours));
|
||||
}
|
||||
|
||||
public BuilderGeneric getGiveCommand()
|
||||
public BuilderGeneric buildGive()
|
||||
{
|
||||
return new BuilderGeneric(this.getCommandName(), EnumMode.GIVE.toString(), this.getPlayer(), this.getEffect().toString(), String.valueOf(this.getDuration()), String.valueOf(this.getAmplifier()), String.valueOf(this.getHideParticles()));
|
||||
}
|
||||
|
||||
public BuilderGeneric getRemoveCommand()
|
||||
public BuilderGeneric buildRemove()
|
||||
{
|
||||
return new BuilderGeneric(this.getCommandName(), EnumMode.CLEAR.toString(), this.getPlayer(), this.getEffect().toString());
|
||||
}
|
||||
|
||||
public BuilderGeneric getClearCommand()
|
||||
public BuilderGeneric buildClear()
|
||||
{
|
||||
return new BuilderGeneric(this.getCommandName(), EnumMode.CLEAR.toString(), this.getPlayer());
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public class BuilderPotionItem extends BuilderGive
|
||||
return this.potion.getEffects();
|
||||
}
|
||||
|
||||
public BuilderPotionItem getBuilderForPotion(Item item)
|
||||
public BuilderPotionItem build(Item item)
|
||||
{
|
||||
return new BuilderPotionItem(item.getRegistryName(), this.getPlayer(), this.potion);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class BuilderRecipe extends CommandBuilder
|
||||
return this.getNodeAsResourceLocation(2);
|
||||
}
|
||||
|
||||
public BuilderRecipe getBuilderForMode(EnumMode mode)
|
||||
public BuilderRecipe build(EnumMode mode)
|
||||
{
|
||||
return new BuilderRecipe(mode, this.getPlayer(), this.getRecipe());
|
||||
}
|
||||
|
||||
@@ -116,12 +116,12 @@ public class BuilderScoreboardPlayers extends BuilderScoreboard
|
||||
return syntax;
|
||||
}
|
||||
|
||||
public BuilderScoreboardPlayers getBuilderForPoints(EnumMode mode)
|
||||
public BuilderScoreboardPlayers buildPoints(EnumMode mode)
|
||||
{
|
||||
return this.getBuilderForPoints(mode, this.getPoints());
|
||||
return this.buildPoints(mode, this.getPoints());
|
||||
}
|
||||
|
||||
public BuilderScoreboardPlayers getBuilderForPoints(EnumMode mode, int points)
|
||||
public BuilderScoreboardPlayers buildPoints(EnumMode mode, int points)
|
||||
{
|
||||
BuilderScoreboardPlayers builder = new BuilderScoreboardPlayers();
|
||||
|
||||
@@ -133,7 +133,7 @@ public class BuilderScoreboardPlayers extends BuilderScoreboard
|
||||
return builder;
|
||||
}
|
||||
|
||||
public BuilderScoreboardPlayers getBuilderForEnable()
|
||||
public BuilderScoreboardPlayers buildEnable()
|
||||
{
|
||||
BuilderScoreboardPlayers builder = new BuilderScoreboardPlayers();
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ public class BuilderSignEditor extends BuilderData
|
||||
|
||||
public BuilderSignEditor()
|
||||
{
|
||||
super();
|
||||
this.setMode(EnumMode.MERGE);
|
||||
this.setTarget(EnumTarget.BLOCK);
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class BuilderTag extends CommandBuilder
|
||||
return syntax;
|
||||
}
|
||||
|
||||
public BuilderTag getBuilderForMode(EnumMode mode)
|
||||
public BuilderTag build(EnumMode mode)
|
||||
{
|
||||
return new BuilderTag(this.getPlayer(), mode, this.getName());
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ public class BuilderTeams extends CommandBuilder
|
||||
return null;
|
||||
}
|
||||
|
||||
public BuilderTeams getBuilderForMode(EnumMode mode)
|
||||
public BuilderTeams build(EnumMode mode)
|
||||
{
|
||||
BuilderTeams builder = new BuilderTeams();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public class BuilderTime extends CommandBuilder
|
||||
{
|
||||
public BuilderTime()
|
||||
{
|
||||
|
||||
super();
|
||||
}
|
||||
|
||||
public BuilderTime(EnumMode mode)
|
||||
|
||||
@@ -77,7 +77,7 @@ public class BuilderTrigger extends CommandBuilder
|
||||
return syntax;
|
||||
}
|
||||
|
||||
public BuilderTrigger getBuilderForMode(EnumMode mode)
|
||||
public BuilderTrigger build(EnumMode mode)
|
||||
{
|
||||
return new BuilderTrigger(this.getObjective(), mode, this.getValue());
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class BuilderWhitelist extends CommandBuilder
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public BuilderWhitelist getBuilder(EnumMode mode)
|
||||
public BuilderWhitelist build(EnumMode mode)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
|
||||
@@ -124,15 +124,15 @@ public class ContentAdvancements extends Content
|
||||
|
||||
container.add(new GuiButtonBase(x + 118, y + 24, 114, 20, new TranslationTextComponent("gui.worldhandler.advancements.grant"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderAdvancement.getBuilderForAction(EnumActionType.GRANT));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderAdvancement.build(EnumActionType.GRANT));
|
||||
}));
|
||||
container.add(new GuiButtonBase(x + 118, y + 48, 114, 20, new TranslationTextComponent("gui.worldhandler.advancements.revoke"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderAdvancement.getBuilderForAction(EnumActionType.REVOKE));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderAdvancement.build(EnumActionType.REVOKE));
|
||||
}));
|
||||
container.add(new GuiButtonBase(x + 118, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.actions.reset").mergeStyle(TextFormatting.RED), () ->
|
||||
{
|
||||
Minecraft.getInstance().displayGuiScreen(new GuiWorldHandler(Contents.CONTINUE.withBuilder(this.builderAdvancement.getBuilder(EnumActionType.REVOKE, EnumMode.EVERYTHING)).withParent(Contents.ADVANCEMENTS)));
|
||||
Minecraft.getInstance().displayGuiScreen(new GuiWorldHandler(Contents.CONTINUE.withBuilder(this.builderAdvancement.build(EnumActionType.REVOKE, EnumMode.EVERYTHING)).withParent(Contents.ADVANCEMENTS)));
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ public class ContentEditBlocks extends Content
|
||||
container.add(this.block1Field);
|
||||
container.add(button1 = new GuiButtonBase(x + 118, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.edit_blocks.fill"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderFill.getBuilderForFill());
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderFill.build());
|
||||
}));
|
||||
button1.active = ResourceHelper.isRegistered(this.builderFill.getBlock1(), ForgeRegistries.BLOCKS);
|
||||
}
|
||||
@@ -246,7 +246,7 @@ public class ContentEditBlocks extends Content
|
||||
container.add(this.block2Field);
|
||||
container.add(button1 = new GuiButtonBase(x + 118, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.edit_blocks.replace"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderFill.getBuilderForReplace());
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderFill.buildReplace());
|
||||
}));
|
||||
button1.active = ResourceHelper.isRegistered(this.builderFill.getBlock1(), ForgeRegistries.BLOCKS) && ResourceHelper.isRegistered(this.builderFill.getBlock2(), ForgeRegistries.BLOCKS);
|
||||
}
|
||||
|
||||
@@ -55,16 +55,16 @@ public class ContentExperience extends Content
|
||||
|
||||
container.add(this.buttonAdd = new GuiButtonBase(x + 116 / 2, y + 24, 114, 20, new TranslationTextComponent("gui.worldhandler.actions.add"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderExperience.getBuilderForAddLevels());
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderExperience.buildAdd());
|
||||
container.init();
|
||||
}));
|
||||
container.add(this.buttonRemove = new GuiButtonBase(x + 116 / 2, y + 48, 114, 20, new TranslationTextComponent("gui.worldhandler.actions.remove"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderExperience.getBuilderForRemoveLevels());
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderExperience.buildRemove());
|
||||
}));
|
||||
container.add(new GuiButtonTooltip(x + 116 / 2, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.actions.reset"), new TranslationTextComponent("gui.worldhandler.actions.set_to_0"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderExperience.getBuilderForResetLevels());
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderExperience.buildReset());
|
||||
container.init();
|
||||
}));
|
||||
|
||||
|
||||
@@ -133,11 +133,11 @@ public class ContentGamerules extends Content
|
||||
{
|
||||
container.add(new GuiButtonBase(x + 118, y + 24, 114, 20, new TranslationTextComponent("gui.worldhandler.generic.enable"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderGamerule.getBuilderForValue(String.valueOf(true)));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderGamerule.build(String.valueOf(true)));
|
||||
}));
|
||||
container.add(new GuiButtonBase(x + 118, y + 48, 114, 20, new TranslationTextComponent("gui.worldhandler.generic.disable"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderGamerule.getBuilderForValue(String.valueOf(false)));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderGamerule.build(String.valueOf(false)));
|
||||
}));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -228,25 +228,25 @@ public class ContentMultiplayer extends Content
|
||||
container.add(this.playerField);
|
||||
container.add(button6 = new GuiButtonBase(x + 118, y + 24, 44, 20, new TranslationTextComponent("gui.worldhandler.multiplayer.whitelist.add"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderWhitelist.getBuilder(EnumMode.ADD));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderWhitelist.build(EnumMode.ADD));
|
||||
}));
|
||||
container.add(button7 = new GuiButtonBase(x + 118 + 47, y + 24, 44, 20, new TranslationTextComponent("gui.worldhandler.multiplayer.whitelist.remove"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderWhitelist.getBuilder(EnumMode.REMOVE));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderWhitelist.build(EnumMode.REMOVE));
|
||||
}));
|
||||
|
||||
container.add(new GuiButtonBase(x + 118, y + 48, 114, 20, new TranslationTextComponent("gui.worldhandler.multiplayer.whitelist.whitelist", new TranslationTextComponent("gui.worldhandler.generic.on")), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderWhitelist.getBuilder(EnumMode.ON));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderWhitelist.build(EnumMode.ON));
|
||||
}));
|
||||
container.add(new GuiButtonBase(x + 118, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.multiplayer.whitelist.whitelist", new TranslationTextComponent("gui.worldhandler.generic.off")), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderWhitelist.getBuilder(EnumMode.OFF));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderWhitelist.build(EnumMode.OFF));
|
||||
}));
|
||||
|
||||
container.add(new GuiButtonIcon(x + 232 - 20, y + 24, 20, 20, EnumIcon.RELOAD, new TranslationTextComponent("gui.worldhandler.multiplayer.whitelist.reload"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderWhitelist.getBuilder(EnumMode.RELOAD));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderWhitelist.build(EnumMode.RELOAD));
|
||||
}));
|
||||
|
||||
if(this.playerField.getText().isEmpty())
|
||||
|
||||
@@ -69,109 +69,109 @@ public class ContentNoteEditor extends Content
|
||||
|
||||
container.add(new GuiButtonPiano(x - 3 + 15, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.g"), sound, 0.53F, Type.NORMAL, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(1));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(1));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 2, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.a"), sound, 0.6F, Type.NORMAL, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(3));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(3));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 3, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.b"), sound, 0.67F, Type.RIGHT, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(5));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(5));
|
||||
}));
|
||||
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 4, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.c"), sound, 0.7F, Type.LEFT, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(6));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(6));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 5, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.d"), sound, 0.8F, Type.NORMAL, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(8));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(8));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 6, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.e"), sound, 0.9F, Type.RIGHT, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(10));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(10));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 7, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.f"), sound, 0.95F, Type.LEFT, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(11));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(11));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 8, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.g"), sound, 1.05F, Type.NORMAL, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(13));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(13));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 9, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.a"), sound, 1.2F, Type.NORMAL, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(15));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(15));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 10, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.b"), sound, 1.32F, Type.RIGHT, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(17));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(17));
|
||||
}));
|
||||
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 11, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.c"), sound, 1.4F, Type.LEFT, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(18));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(18));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 12, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.d"), sound, 1.6F, Type.NORMAL, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(20));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(20));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 13, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.e"), sound, 1.8F, Type.RIGHT, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(22));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(22));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 + 15 * 14, y, 14, 92, new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.f"), sound, 1.9F, Type.LEFT, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(23));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(23));
|
||||
}));
|
||||
|
||||
container.add(new GuiButtonPiano(x - 3 - 5 + 15, y, 9, 58, new StringTextComponent("F#"), sound, 0.5F, Type.BLACK, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(0));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(0));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 - 5 + 15 * 2, y, 9, 58, new StringTextComponent("G#"), sound, 0.56F, Type.BLACK, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(2));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(2));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 - 5 + 15 * 3, y, 9, 58, new StringTextComponent("A#"), sound, 0.63F, Type.BLACK, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(4));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(4));
|
||||
}));
|
||||
|
||||
container.add(new GuiButtonPiano(x - 3 - 5 + 15 * 5, y, 9, 58, new StringTextComponent("C#"), sound, 0.75F, Type.BLACK, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(7));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(7));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 - 5 + 15 * 6, y, 9, 58, new StringTextComponent("D#"), sound, 0.85F, Type.BLACK, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(9));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(9));
|
||||
}));
|
||||
|
||||
container.add(new GuiButtonPiano(x - 3 - 5 + 15 * 8, y, 9, 58, new StringTextComponent("F#"), sound, 1.0F, Type.BLACK, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(12));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(12));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 - 5 + 15 * 9, y, 9, 58, new StringTextComponent("G#"), sound, 1.1F, Type.BLACK, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(14));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(14));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 - 5 + 15 * 10, y, 9, 58, new StringTextComponent("A#"), sound, 1.25F, Type.BLACK, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(16));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(16));
|
||||
}));
|
||||
|
||||
container.add(new GuiButtonPiano(x - 3 - 5 + 15 * 12, y, 9, 58, new StringTextComponent("C#"), sound, 1.5F, Type.BLACK, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(19));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(19));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 - 5 + 15 * 13, y, 9, 58, new StringTextComponent("D#"), sound, 1.7F, Type.BLACK, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(21));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(21));
|
||||
}));
|
||||
container.add(new GuiButtonPiano(x - 3 - 5 + 15 * 15, y, 9, 58, new StringTextComponent("F#"), sound, 2.0F, Type.BLACK, () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.getBuilderForNote(24));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderNoteEditor.build(24));
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,12 +120,12 @@ public class ContentPotions extends ContentChild
|
||||
}));
|
||||
container.add(new GuiButtonBase(x + 118, y + 36, 114, 20, new TranslationTextComponent("gui.worldhandler.potions.effect.remove"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotion.getRemoveCommand());
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotion.buildRemove());
|
||||
container.init();
|
||||
}));
|
||||
container.add(new GuiButtonBase(x + 118, y + 60, 114, 20, new TranslationTextComponent("gui.worldhandler.potions.effect.remove_all"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotion.getClearCommand());
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotion.buildClear());
|
||||
container.init();
|
||||
}));
|
||||
}
|
||||
@@ -174,31 +174,31 @@ public class ContentPotions extends ContentChild
|
||||
{
|
||||
container.add(button1 = new GuiButtonBase(x + 118, y, 114, 20, new TranslationTextComponent("gui.worldhandler.potions.effect"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotion.getGiveCommand());
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotion.buildGive());
|
||||
this.potionPage = 0;
|
||||
container.init();
|
||||
}));
|
||||
container.add(button2 = new GuiButtonBase(x + 118, y + 24, 56, 20, new TranslationTextComponent("gui.worldhandler.potions.effect.tipped_arrow"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotionItem.getBuilderForPotion(Items.TIPPED_ARROW));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotionItem.build(Items.TIPPED_ARROW));
|
||||
this.potionPage = 0;
|
||||
container.init();
|
||||
}));
|
||||
container.add(button3 = new GuiButtonTooltip(x + 178, y + 24, 55, 20, new TranslationTextComponent("gui.worldhandler.potions.effect.bottle"), new TranslationTextComponent("gui.worldhandler.actions.place_command_block"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotionItem.getBuilderForPotion(Items.POTION));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotionItem.build(Items.POTION));
|
||||
this.potionPage = 0;
|
||||
container.init();
|
||||
}));
|
||||
container.add(button4 = new GuiButtonTooltip(x + 118, y + 48, 56, 20, new TranslationTextComponent("gui.worldhandler.potions.effect.splash"), new TranslationTextComponent("gui.worldhandler.actions.place_command_block"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotionItem.getBuilderForPotion(Items.SPLASH_POTION));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotionItem.build(Items.SPLASH_POTION));
|
||||
this.potionPage = 0;
|
||||
container.init();
|
||||
}));
|
||||
container.add(button5 = new GuiButtonTooltip(x + 178, y + 48, 55, 20, new TranslationTextComponent("gui.worldhandler.potions.effect.lingering"), new TranslationTextComponent("gui.worldhandler.actions.place_command_block"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotionItem.getBuilderForPotion(Items.LINGERING_POTION));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPotionItem.build(Items.LINGERING_POTION));
|
||||
this.potionPage = 0;
|
||||
container.init();
|
||||
}));
|
||||
|
||||
@@ -96,12 +96,12 @@ public class ContentRecipes extends Content
|
||||
|
||||
container.add(new GuiButtonBase(x + 118, y + 24, 114, 20, new TranslationTextComponent("gui.worldhandler.recipes.give"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderRecipe.getBuilderForMode(EnumMode.GIVE));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderRecipe.build(EnumMode.GIVE));
|
||||
container.initButtons();
|
||||
}));
|
||||
container.add(new GuiButtonBase(x + 118, y + 48, 114, 20, new TranslationTextComponent("gui.worldhandler.recipes.take"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderRecipe.getBuilderForMode(EnumMode.TAKE));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderRecipe.build(EnumMode.TAKE));
|
||||
container.initButtons();
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -142,17 +142,17 @@ public class ContentScoreboardPlayers extends ContentScoreboard
|
||||
})));
|
||||
container.add(this.addButton = new GuiButtonBase(x + 118, y + 48, 56, 20, new TranslationTextComponent("gui.worldhandler.actions.add"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPlayers.getBuilderForPoints(EnumMode.ADD));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPlayers.buildPoints(EnumMode.ADD));
|
||||
container.init();
|
||||
}));
|
||||
container.add(this.removeButton = new GuiButtonBase(x + 118 + 114 / 2 + 1, y + 48, 56, 20, new TranslationTextComponent("gui.worldhandler.actions.remove"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPlayers.getBuilderForPoints(EnumMode.REMOVE));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPlayers.buildPoints(EnumMode.REMOVE));
|
||||
container.init();
|
||||
}));
|
||||
container.add(button1 = new GuiButtonTooltip(x + 118, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.actions.reset"), new TranslationTextComponent("gui.worldhandler.actions.set_to_0"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPlayers.getBuilderForPoints(EnumMode.SET, 0));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPlayers.buildPoints(EnumMode.SET, 0));
|
||||
container.init();
|
||||
}));
|
||||
|
||||
@@ -166,12 +166,12 @@ public class ContentScoreboardPlayers extends ContentScoreboard
|
||||
{
|
||||
container.add(button1 = new GuiButtonBase(x + 118, y + 36, 114, 20, new TranslationTextComponent("gui.worldhandler.actions.add"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTag.getBuilderForMode(BuilderTag.EnumMode.ADD));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTag.build(BuilderTag.EnumMode.ADD));
|
||||
container.init();
|
||||
}));
|
||||
container.add(button2 = new GuiButtonBase(x + 118, y + 60, 114, 20, new TranslationTextComponent("gui.worldhandler.actions.remove"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTag.getBuilderForMode(BuilderTag.EnumMode.REMOVE));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTag.build(BuilderTag.EnumMode.REMOVE));
|
||||
container.init();
|
||||
}));
|
||||
|
||||
@@ -188,17 +188,17 @@ public class ContentScoreboardPlayers extends ContentScoreboard
|
||||
})));
|
||||
container.add(this.addButton = new GuiButtonBase(x + 118, y + 48, 56, 20, new TranslationTextComponent("gui.worldhandler.actions.add"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTrigger.getBuilderForMode(BuilderTrigger.EnumMode.ADD));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTrigger.build(BuilderTrigger.EnumMode.ADD));
|
||||
container.init();
|
||||
}));
|
||||
container.add(this.removeButton = new GuiButtonBase(x + 118 + 114 / 2 + 1, y + 48, 56, 20, new TranslationTextComponent("gui.worldhandler.actions.set"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTrigger.getBuilderForMode(BuilderTrigger.EnumMode.SET));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTrigger.build(BuilderTrigger.EnumMode.SET));
|
||||
container.init();
|
||||
}));
|
||||
container.add(button1 = new GuiButtonBase(x + 118, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.generic.enable"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPlayers.getBuilderForEnable());
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderPlayers.buildEnable());
|
||||
container.init();
|
||||
}));
|
||||
|
||||
|
||||
@@ -160,12 +160,12 @@ public class ContentScoreboardTeams extends ContentScoreboard
|
||||
|
||||
container.add(button1 = new GuiButtonBase(x + 118, y + 36, 114, 20, new TranslationTextComponent("gui.worldhandler.scoreboard.team.join"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTeams.getBuilderForMode(EnumMode.JOIN));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTeams.build(EnumMode.JOIN));
|
||||
container.initButtons();
|
||||
}));
|
||||
container.add(new GuiButtonBase(x + 118, y + 60, 114, 20, new TranslationTextComponent("gui.worldhandler.scoreboard.team.leave"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTeams.getBuilderForMode(EnumMode.LEAVE));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTeams.build(EnumMode.LEAVE));
|
||||
container.initButtons();
|
||||
}));
|
||||
|
||||
@@ -175,12 +175,12 @@ public class ContentScoreboardTeams extends ContentScoreboard
|
||||
{
|
||||
container.add(button1 = new GuiButtonBase(x + 118, y + 36, 114, 20, new TranslationTextComponent("gui.worldhandler.scoreboard.team.remove"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTeams.getBuilderForMode(EnumMode.REMOVE));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTeams.build(EnumMode.REMOVE));
|
||||
container.initButtons();
|
||||
}));
|
||||
container.add(button2 = new GuiButtonBase(x + 118, y + 60, 114, 20, new TranslationTextComponent("gui.worldhandler.scoreboard.team.empty"), () ->
|
||||
{
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTeams.getBuilderForMode(EnumMode.EMPTY));
|
||||
CommandHelper.sendCommand(container.getPlayer(), this.builderTeams.build(EnumMode.EMPTY));
|
||||
container.initButtons();
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user