-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
150 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# AVMWandMod | ||
|
||
致力于模仿与创造不可能~ | ||
请注意在创造块法杖可能会毁端请玩之前备份客户端的所有~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 0 additions & 33 deletions
33
src/main/java/net/lanternmc/avmwandmod/Command/BianXie.java
This file was deleted.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
src/main/java/net/lanternmc/avmwandmod/Command/CmdGUI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package net.lanternmc.avmwandmod.Command; | ||
|
||
import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription; | ||
import io.github.cottonmc.cotton.gui.widget.WButton; | ||
import io.github.cottonmc.cotton.gui.widget.WPlainPanel; | ||
import io.github.cottonmc.cotton.gui.widget.WTextField; | ||
import io.github.cottonmc.cotton.gui.widget.data.Insets; | ||
import net.lanternmc.avmwandmod.NBT.CmdRunnable; | ||
import net.minecraft.entity.player.PlayerEntity; | ||
|
||
public class CmdGUI extends LightweightGuiDescription { | ||
|
||
public CmdGUI(PlayerEntity player) { | ||
WPlainPanel panel = new WPlainPanel(); | ||
panel.setInsets(Insets.ROOT_PANEL); | ||
|
||
WTextField inPut = new WTextField(); | ||
inPut.setSize(500, 100); | ||
panel.add(inPut, 5,5); | ||
WButton button = new WButton(); | ||
button.setOnClick(new CmdRunnable(player, inPut.getText())); | ||
button.setSize(100, 100); | ||
panel.add(button,0,10); | ||
|
||
setFullscreen(true); | ||
setRootPanel(panel); | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/net/lanternmc/avmwandmod/Command/CmdScreen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package net.lanternmc.avmwandmod.Command; | ||
|
||
import io.github.cottonmc.cotton.gui.GuiDescription; | ||
import io.github.cottonmc.cotton.gui.client.CottonClientScreen; | ||
import net.minecraft.text.Text; | ||
|
||
public class CmdScreen extends CottonClientScreen { | ||
|
||
|
||
public CmdScreen(GuiDescription description) { | ||
super(description); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/net/lanternmc/avmwandmod/NBT/CmdRunnable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package net.lanternmc.avmwandmod.NBT; | ||
|
||
import net.minecraft.entity.player.PlayerEntity; | ||
|
||
public class CmdRunnable implements Runnable { | ||
|
||
private final PlayerEntity player; | ||
private final String command; | ||
|
||
public CmdRunnable(PlayerEntity p, String command) { | ||
this.player = p; | ||
this.command = command; | ||
} | ||
|
||
@Override | ||
public void run() { | ||
NBTManager.GenNBT(command, player.getMainHandStack()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package net.lanternmc.avmwandmod.NBT; | ||
|
||
import net.minecraft.item.Item; | ||
|
||
public class CopyItem extends Item { | ||
public CopyItem(Settings settings) { | ||
super(settings); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/net/lanternmc/avmwandmod/NBT/NBTManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package net.lanternmc.avmwandmod.NBT; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.nbt.NbtCompound; | ||
|
||
import java.util.Objects; | ||
|
||
public class NBTManager { | ||
|
||
public static void GenNBT(String CommandInfo, ItemStack is) { | ||
NbtCompound nbt = new NbtCompound(); | ||
nbt.putString("Command", CommandInfo); | ||
is.setNbt(nbt); | ||
} | ||
|
||
|
||
public static String loadNBT(ItemStack is) { | ||
NbtCompound nbt = is.getNbt(); | ||
return Objects.requireNonNull(nbt).getString("Command"); | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/net/lanternmc/avmwandmod/Resourcepack/Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package net.lanternmc.avmwandmod.Resourcepack; | ||
|
||
import net.minecraft.client.resource.DefaultClientResourcePackProvider; | ||
|
||
import java.nio.file.Path; | ||
|
||
public class Test { | ||
|
||
public void init() { | ||
DefaultClientResourcePackProvider rp = new DefaultClientResourcePackProvider(Path.of("resourcepacks","resourcepacks")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters