Skip to content
This repository was archived by the owner on Feb 19, 2019. It is now read-only.

Commit 96cf7fd

Browse files
committed
Repackaged events according to category
1 parent b8bc1b4 commit 96cf7fd

54 files changed

Lines changed: 118 additions & 67 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/main/java/me/zero/client/api/ClientAPI.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ public final class ClientAPI {
3232
*/
3333
private ClientAPI() {}
3434

35+
/**
36+
* Current version of the API
37+
*/
38+
public static final double VERSION = 2.1;
39+
3540
/**
3641
* Instance of the API event bus. All default game event are
3742
* passed through this event bus.

src/main/java/me/zero/client/api/command/handler/listener/ChatCommandListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import me.zero.client.api.command.Command;
2323
import me.zero.client.api.command.handler.CommandHandler;
2424
import me.zero.client.api.command.executor.sender.CommandSender;
25-
import me.zero.client.api.event.defaults.game.ChatEvent;
25+
import me.zero.client.api.event.defaults.game.misc.ChatEvent;
2626
import me.zero.client.api.event.defaults.internal.CommandExecutionEvent;
2727
import me.zero.client.api.util.interfaces.Helper;
2828
import net.minecraft.util.text.TextComponentString;

src/main/java/me/zero/client/api/event/CAPIEventManager.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2017 ZeroMemes
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package me.zero.client.api.event;
218

319
import me.zero.alpine.EventManager;

src/main/java/me/zero/client/api/event/defaults/filters/PacketFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package me.zero.client.api.event.defaults.filters;
1818

19-
import me.zero.client.api.event.defaults.game.PacketEvent;
19+
import me.zero.client.api.event.defaults.game.network.PacketEvent;
2020
import net.minecraft.network.Packet;
2121

2222
import java.util.function.Predicate;

src/main/java/me/zero/client/api/event/defaults/game/ClickEvent.java renamed to src/main/java/me/zero/client/api/event/defaults/game/core/ClickEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package me.zero.client.api.event.defaults.game;
17+
package me.zero.client.api.event.defaults.game.core;
1818

1919
import net.minecraft.client.Minecraft;
2020

src/main/java/me/zero/client/api/event/defaults/game/GameShutdownEvent.java renamed to src/main/java/me/zero/client/api/event/defaults/game/core/GameShutdownEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package me.zero.client.api.event.defaults.game;
17+
package me.zero.client.api.event.defaults.game.core;
1818

1919
import me.zero.alpine.type.Cancellable;
2020

src/main/java/me/zero/client/api/event/defaults/game/KeyEvent.java renamed to src/main/java/me/zero/client/api/event/defaults/game/core/KeyEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package me.zero.client.api.event.defaults.game;
17+
package me.zero.client.api.event.defaults.game.core;
1818

1919
/**
2020
* Event called when a Key is pressed outside of a GUI while in-game

src/main/java/me/zero/client/api/event/defaults/game/LoopEvent.java renamed to src/main/java/me/zero/client/api/event/defaults/game/core/LoopEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package me.zero.client.api.event.defaults.game;
17+
package me.zero.client.api.event.defaults.game.core;
1818

1919
import net.minecraft.client.Minecraft;
2020

src/main/java/me/zero/client/api/event/defaults/game/ProfilerEvent.java renamed to src/main/java/me/zero/client/api/event/defaults/game/core/ProfilerEvent.java

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,42 @@
1414
* limitations under the License.
1515
*/
1616

17-
package me.zero.client.api.event.defaults.game;
17+
package me.zero.client.api.event.defaults.game.core;
1818

1919
/**
20-
* Called when a section is started in the profiler
20+
* Called when a section is started in the profiler.
2121
*
2222
* @author Brady
2323
* @since 4/8/2017 12:00 PM
2424
*/
2525
public final class ProfilerEvent {
2626

2727
/**
28-
* Current profiler section
28+
* Complete current profiler section.
29+
*
30+
* ex) 'root.tick.render'
31+
*/
32+
private final String sectionPath;
33+
34+
/**
35+
* Current profiler section.
36+
*
37+
* ex) 'render'
2938
*/
3039
private final String section;
3140

32-
public ProfilerEvent(String section) {
41+
public ProfilerEvent(String sectionPath, String section) {
42+
this.sectionPath = sectionPath;
3343
this.section = section;
3444
}
3545

46+
/**
47+
* @return The full profiler section
48+
*/
49+
public final String getSectionPath() {
50+
return this.sectionPath;
51+
}
52+
3653
/**
3754
* @return The current profiler section
3855
*/

src/main/java/me/zero/client/api/event/defaults/game/TickEvent.java renamed to src/main/java/me/zero/client/api/event/defaults/game/core/TickEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package me.zero.client.api.event.defaults.game;
17+
package me.zero.client.api.event.defaults.game.core;
1818

1919
import net.minecraft.client.Minecraft;
2020

0 commit comments

Comments
 (0)