mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 14:34:28 +00:00
Port CommandEvent and custom entity selectors to 1.13 (#5411)
This commit is contained in:
1 parent
2e5f25d8ae
commit
8084ca43b9
12 files changed
+429
-167
No files matched your search
@@ -0,0 +1,19 @@
|
||||
--- a/net/minecraft/command/Commands.java
|
||||
+++ b/net/minecraft/command/Commands.java
|
||||
@@ -189,7 +189,15 @@
|
||||
|
||||
try {
|
||||
try {
|
||||
- int lvt_4_3_ = this.field_197062_b.execute(p_197059_2_, p_197059_1_);
|
||||
+ com.mojang.brigadier.ParseResults<CommandSource> parse = this.field_197062_b.parse(p_197059_2_, p_197059_1_);
|
||||
+ net.minecraftforge.event.CommandEvent event = new net.minecraftforge.event.CommandEvent(parse);
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) {
|
||||
+ if (event.getException() != null) {
|
||||
+ com.google.common.base.Throwables.throwIfUnchecked(event.getException());
|
||||
+ }
|
||||
+ return 1;
|
||||
+ }
|
||||
+ int lvt_4_3_ = this.field_197062_b.execute(event.getParseResults());
|
||||
return lvt_4_3_;
|
||||
} catch (CommandException commandexception) {
|
||||
p_197059_1_.func_197021_a(commandexception.func_197003_a());
|
||||
Reference in new issue
Block a user