i forgor
This commit is contained in:
parent
5859c856e2
commit
e455ee5000
6 changed files with 20 additions and 18 deletions
|
@ -4,8 +4,10 @@
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="50f184fa-7bed-4956-baf5-7586ff26ea08" name="Changes" comment="add fart !!!!!!!">
|
<list default="true" id="50f184fa-7bed-4956-baf5-7586ff26ea08" name="Changes" comment="packet queue farded it">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/Bot.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/Bot.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/BossbarManagerPlugin.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/BossbarManagerPlugin.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
@ -111,13 +113,6 @@
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1680245437032</updated>
|
<updated>1680245437032</updated>
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00096" summary="improve reconnect i guess">
|
|
||||||
<created>1682141715244</created>
|
|
||||||
<option name="number" value="00096" />
|
|
||||||
<option name="presentableId" value="LOCAL-00096" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1682141715244</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00097" summary="make better console logging like the old js chomens bot">
|
<task id="LOCAL-00097" summary="make better console logging like the old js chomens bot">
|
||||||
<created>1682142828982</created>
|
<created>1682142828982</created>
|
||||||
<option name="number" value="00097" />
|
<option name="number" value="00097" />
|
||||||
|
@ -454,7 +449,14 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1682842148011</updated>
|
<updated>1682842148011</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="145" />
|
<task id="LOCAL-00145" summary="packet queue farded it">
|
||||||
|
<created>1682854236394</created>
|
||||||
|
<option name="number" value="00145" />
|
||||||
|
<option name="presentableId" value="LOCAL-00145" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1682854236395</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="146" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
|
@ -469,7 +471,6 @@
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="make trusted broadcast log in console" />
|
|
||||||
<MESSAGE value="add connecting message" />
|
<MESSAGE value="add connecting message" />
|
||||||
<MESSAGE value="add reconnect delay to each bot option (optional)" />
|
<MESSAGE value="add reconnect delay to each bot option (optional)" />
|
||||||
<MESSAGE value="change stuff a bit" />
|
<MESSAGE value="change stuff a bit" />
|
||||||
|
@ -494,7 +495,8 @@
|
||||||
<MESSAGE value="fix error i guess" />
|
<MESSAGE value="fix error i guess" />
|
||||||
<MESSAGE value="add packet queue for funni" />
|
<MESSAGE value="add packet queue for funni" />
|
||||||
<MESSAGE value="add fart !!!!!!!" />
|
<MESSAGE value="add fart !!!!!!!" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="add fart !!!!!!!" />
|
<MESSAGE value="packet queue farded it" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="packet queue farded it" />
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
|
|
|
@ -183,7 +183,7 @@ public class ChatPlugin extends Bot.Listener {
|
||||||
if (splitMessage.trim().equals("")) continue;
|
if (splitMessage.trim().equals("")) continue;
|
||||||
|
|
||||||
if (splitMessage.startsWith("/")) {
|
if (splitMessage.startsWith("/")) {
|
||||||
bot.sendPacket(new ServerboundChatCommandPacket(
|
bot.session().send(new ServerboundChatCommandPacket(
|
||||||
splitMessage.substring(1),
|
splitMessage.substring(1),
|
||||||
Instant.now().toEpochMilli(),
|
Instant.now().toEpochMilli(),
|
||||||
0L,
|
0L,
|
||||||
|
@ -192,7 +192,7 @@ public class ChatPlugin extends Bot.Listener {
|
||||||
new BitSet()
|
new BitSet()
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
bot.sendPacket(new ServerboundChatPacket(
|
bot.session().send(new ServerboundChatPacket(
|
||||||
splitMessage,
|
splitMessage,
|
||||||
Instant.now().toEpochMilli(),
|
Instant.now().toEpochMilli(),
|
||||||
0L,
|
0L,
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class CorePlugin extends PositionPlugin.PositionListener {
|
||||||
if (!ready) return;
|
if (!ready) return;
|
||||||
|
|
||||||
if (bot.options().useCore()) {
|
if (bot.options().useCore()) {
|
||||||
bot.sendPacket(new ServerboundSetCommandBlockPacket(
|
bot.session().send(new ServerboundSetCommandBlockPacket(
|
||||||
absoluteCorePosition(),
|
absoluteCorePosition(),
|
||||||
command,
|
command,
|
||||||
kaboom ? CommandBlockMode.AUTO : CommandBlockMode.REDSTONE,
|
kaboom ? CommandBlockMode.AUTO : CommandBlockMode.REDSTONE,
|
||||||
|
@ -112,7 +112,7 @@ public class CorePlugin extends PositionPlugin.PositionListener {
|
||||||
final CompletableFuture<CompoundTag> future = new CompletableFuture<>();
|
final CompletableFuture<CompoundTag> future = new CompletableFuture<>();
|
||||||
transactions.put(transactionId, future);
|
transactions.put(transactionId, future);
|
||||||
|
|
||||||
final Runnable afterTick = () -> bot.sendPacket(new ServerboundBlockEntityTagQuery(transactionId, position));
|
final Runnable afterTick = () -> bot.session().send(new ServerboundBlockEntityTagQuery(transactionId, position));
|
||||||
|
|
||||||
bot.executor().schedule(afterTick, 50, TimeUnit.MILLISECONDS);
|
bot.executor().schedule(afterTick, 50, TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class PositionPlugin extends Bot.Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void packetReceived (ClientboundPlayerPositionPacket packet) {
|
public void packetReceived (ClientboundPlayerPositionPacket packet) {
|
||||||
bot.sendPacket(new ServerboundAcceptTeleportationPacket(packet.getTeleportId()));
|
bot.session().send(new ServerboundAcceptTeleportationPacket(packet.getTeleportId()));
|
||||||
|
|
||||||
position = Vector3i.from(packet.getX(), packet.getY(), packet.getZ());
|
position = Vector3i.from(packet.getX(), packet.getY(), packet.getZ());
|
||||||
for (PositionListener listener : listeners) { listener.positionChange(position); }
|
for (PositionListener listener : listeners) { listener.positionChange(position); }
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class SelfCarePlugin extends Bot.Listener {
|
||||||
final GameEventValue value = packet.getValue();
|
final GameEventValue value = packet.getValue();
|
||||||
|
|
||||||
if (notification == GameEvent.ENTER_CREDITS) {
|
if (notification == GameEvent.ENTER_CREDITS) {
|
||||||
bot.sendPacket(new ServerboundClientCommandPacket(ClientCommand.RESPAWN));
|
bot.session().send(new ServerboundClientCommandPacket(ClientCommand.RESPAWN));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class TabCompletePlugin extends Bot.Listener {
|
||||||
public CompletableFuture<ClientboundCommandSuggestionsPacket> tabComplete (String command) {
|
public CompletableFuture<ClientboundCommandSuggestionsPacket> tabComplete (String command) {
|
||||||
final int transactionId = nextTransactionId++;
|
final int transactionId = nextTransactionId++;
|
||||||
|
|
||||||
bot.sendPacket(new ServerboundCommandSuggestionPacket(transactionId, command));
|
bot.session().send(new ServerboundCommandSuggestionPacket(transactionId, command));
|
||||||
|
|
||||||
final CompletableFuture<ClientboundCommandSuggestionsPacket> future = new CompletableFuture<>();
|
final CompletableFuture<ClientboundCommandSuggestionsPacket> future = new CompletableFuture<>();
|
||||||
transactions.put(transactionId, future);
|
transactions.put(transactionId, future);
|
||||||
|
|
Loading…
Reference in a new issue