├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src
└── main
├── java
└── com
│ └── evaan
│ └── frostburn
│ ├── FrostBurn.java
│ ├── clickgui
│ ├── ClickGui.java
│ ├── Dropdown.java
│ ├── ImGuiScreen.java
│ ├── Window.java
│ └── button
│ │ ├── ModuleButton.java
│ │ ├── SettingButton.java
│ │ └── buttons
│ │ ├── BoolButton.java
│ │ └── ModeButton.java
│ ├── command
│ ├── Command.java
│ ├── CommandManager.java
│ └── commands
│ │ ├── BindCommand.java
│ │ ├── ConfigCommand.java
│ │ ├── DrawnCommand.java
│ │ ├── FriendCommand.java
│ │ ├── HelpCommand.java
│ │ ├── ModulesCommand.java
│ │ ├── SettingCommand.java
│ │ └── ToggleCommand.java
│ ├── event
│ ├── FrostBurnEvent.java
│ └── events
│ │ └── PacketEvent.java
│ ├── mixins
│ ├── MixinClientConnection.java
│ ├── MixinClientPlayerEntity.java
│ ├── MixinFluidBlock.java
│ ├── MixinGameRenderer.java
│ ├── MixinInGameHud.java
│ ├── MixinKeyboard.java
│ ├── MixinMinecraftClient.java
│ ├── MixinPlayerEntity.java
│ └── MixinWorldRenderer.java
│ ├── module
│ ├── Module.java
│ ├── ModuleManager.java
│ └── modules
│ │ ├── combat
│ │ ├── AutoAnchor.java
│ │ ├── AutoTotem.java
│ │ ├── BedAura.java
│ │ ├── Criticals.java
│ │ ├── CrystalAura.java
│ │ ├── KillAura.java
│ │ └── Surround.java
│ │ ├── misc
│ │ ├── AirPlace.java
│ │ ├── AutoStaircase.java
│ │ ├── CleanChat.java
│ │ ├── DiscordRPC.java
│ │ ├── FakePlayer.java
│ │ ├── MiddleClick.java
│ │ ├── Nuker.java
│ │ ├── Offhand.java
│ │ ├── Scaffold.java
│ │ ├── Velocity.java
│ │ └── YawLock.java
│ │ ├── movement
│ │ ├── Fly.java
│ │ ├── Jesus.java
│ │ ├── NoFall.java
│ │ ├── SafeWalk.java
│ │ └── Sprint.java
│ │ └── render
│ │ ├── ClickGuiMod.java
│ │ ├── Fullbright.java
│ │ ├── HUD.java
│ │ ├── ImGuiMod.java
│ │ ├── NoParticle.java
│ │ ├── NoWeather.java
│ │ └── Zoom.java
│ └── util
│ ├── ConfigManager.java
│ ├── Friends.java
│ ├── Keyboard.java
│ ├── Setting.java
│ ├── SettingsManager.java
│ ├── Wrapper.java
│ └── packet
│ └── PlayerInteractEntityC2SUtils.java
└── resources
├── assets
└── frostburn
│ ├── 16.png
│ └── 32.png
├── fabric.mod.json
└── frostburn.mixins.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # gradle
2 |
3 | .gradle/
4 | build/
5 | out/
6 | classes/
7 |
8 | # eclipse
9 |
10 | *.launch
11 |
12 | # idea
13 |
14 | .idea/
15 | *.iml
16 | *.ipr
17 | *.iws
18 |
19 | # vscode
20 |
21 | .settings/
22 | .vscode/
23 | bin/
24 | .classpath
25 | .project
26 |
27 | # macos
28 |
29 | *.DS_Store
30 |
31 | # fabric
32 |
33 | run/
34 | logs/
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: java
2 | install: skip
3 |
4 | os: linux
5 | dist: trusty
6 |
7 | script:
8 | - chmod +x gradlew
9 | - ./gradlew build
10 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | FrostBurn Copyright (C) 2021 Evan
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FrostBurn [](https://www.travis-ci.com/evaan/FrostBurn) [](https://discord.gg/XkpYgpfHtc)  
2 | A 1.17 utility mod oriented towards anarchy servers
3 | ## Progress
4 | - [x] Command System
5 | - [x] Module System
6 | - [x] Friends
7 | - [x] Settings
8 | - [x] ClickGUI (Uses [imgui](https://github.com/SpaiR/imgui-java))
9 | - [ ] HUD
10 | - [ ] Render Modules
11 | - [ ] Chams
12 | - [x] Fullbright
13 | - [ ] HoleESP
14 | - [ ] Nametags
15 | - [x] NoParticle
16 | - [x] NoWeather
17 | - [ ] ViewmodelChanger
18 | - [x] Zoom
19 | - [ ] Combat Modules
20 | - [x] AutoAnchor (To be rewritten)
21 | - [ ] AutoAnvil
22 | - [x] AutoTotem
23 | - [x] BedAura
24 | - [ ] Burrow
25 | - [x] Criticals
26 | - [x] CrystalAura (To be rewritten)
27 | - [x] KillAura
28 | - [ ] PistonAura
29 | - [x] Surround
30 | - [ ] Misc Modules
31 | - [x] AirPlace
32 | - [ ] AntiAim
33 | - [x] AutoStaircase
34 | - [ ] AutoTool
35 | - [x] DiscordRPC
36 | - [x] FakePlayer
37 | - [x] MiddleClickFriend
38 | - [x] MiddleClickPearl
39 | - [ ] PacketMine
40 | - [x] Scaffold
41 | - [ ] ShulkerPeek
42 | - [ ] Timer
43 | - [x] Yawlock
44 | - [ ] Movement Modules
45 | - [ ] BoatFly
46 | - [ ] Fly
47 | - [x] Jesus
48 | - [ ] ReverseStep
49 | - [x] Sprint
50 | - [ ] Step
51 | - [x] Velocity
52 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'fabric-loom' version '0.8-SNAPSHOT'
3 | id 'maven-publish'
4 | }
5 |
6 | apply plugin: "idea"
7 |
8 | sourceCompatibility = JavaVersion.VERSION_16
9 | targetCompatibility = JavaVersion.VERSION_16
10 |
11 | archivesBaseName = project.archives_base_name
12 | version = project.mod_version
13 | group = project.maven_group
14 |
15 | repositories {
16 | maven {
17 | url = 'https://jitpack.io'
18 | mavenCentral()
19 | }
20 | }
21 |
22 | dependencies {
23 | minecraft "com.mojang:minecraft:${project.minecraft_version}"
24 | mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
25 | modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
26 |
27 | modImplementation 'net.jodah:typetools:0.5.0'
28 | modImplementation 'com.github.ZeroMemes:Alpine:1.5'
29 | modImplementation 'com.github.Vatuu:discord-rpc:1.6.2'
30 | include 'net.jodah:typetools:0.5.0'
31 | include 'com.github.ZeroMemes:Alpine:1.5'
32 | include 'com.github.Vatuu:discord-rpc:1.6.2'
33 |
34 | implementation("io.github.spair:imgui-java-binding:1.82.2")
35 | include("io.github.spair:imgui-java-binding:1.82.2")
36 | implementation("io.github.spair:imgui-java-lwjgl3:1.82.2") {
37 | exclude group: "org.lwjgl"
38 | }
39 | include("io.github.spair:imgui-java-lwjgl3:1.82.2")
40 | ["linux", "linux-x86", "macos", "windows", "windows-x86"].each {
41 | implementation("io.github.spair:imgui-java-natives-$it:1.82.2")
42 | include("io.github.spair:imgui-java-natives-$it:1.82.2")
43 | }
44 |
45 | modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
46 | }
47 |
48 | processResources {
49 | inputs.property "version", project.version
50 |
51 | filesMatching("fabric.mod.json") {
52 | expand "version": project.version
53 | }
54 | }
55 |
56 | tasks.withType(JavaCompile).configureEach {
57 | it.options.encoding = "UTF-8"
58 |
59 | def targetVersion = 8
60 | if (JavaVersion.current().isJava9Compatible()) {
61 | it.options.release = targetVersion
62 | }
63 | }
64 |
65 | java {
66 | withSourcesJar()
67 | }
68 |
69 | jar {
70 | from("LICENSE") {
71 | rename { "${it}_${project.archivesBaseName}"}
72 | }
73 | }
74 |
75 | publishing {
76 | publications {
77 | mavenJava(MavenPublication) {
78 | artifact(remapJar) {
79 | builtBy remapJar
80 | }
81 | artifact(sourcesJar) {
82 | builtBy remapSourcesJar
83 | }
84 | }
85 | }
86 |
87 | repositories {
88 | }
89 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Done to increase the memory available to gradle.
2 | org.gradle.jvmargs=-Xmx1G
3 |
4 | # Fabric Properties
5 | # check these on https://fabricmc.net/use
6 | minecraft_version=1.17.1
7 | yarn_mappings=1.17.1+build.1
8 | loader_version=0.11.3
9 |
10 | # Mod Properties
11 | mod_version = 1.0
12 | maven_group = com.evaan
13 | archives_base_name = frostburn
14 |
15 | # Dependencies
16 | # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
17 | fabric_version=0.34.9+1.17
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evaan/FrostBurn/7379a4bfa153432e15e4db496e74d097969db6ba/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | maven {
4 | name = 'Fabric'
5 | url = 'https://maven.fabricmc.net/'
6 | }
7 | gradlePluginPortal()
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/FrostBurn.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn;
2 |
3 | import com.evaan.frostburn.clickgui.ClickGui;
4 | import com.evaan.frostburn.command.CommandManager;
5 | import com.evaan.frostburn.module.ModuleManager;
6 | import com.evaan.frostburn.util.ConfigManager;
7 | import com.evaan.frostburn.util.SettingsManager;
8 | import me.zero.alpine.EventBus;
9 | import me.zero.alpine.EventManager;
10 | import net.fabricmc.api.ModInitializer;
11 | import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
12 | import net.minecraft.client.MinecraftClient;
13 |
14 | import java.io.File;
15 |
16 | /**
17 | * @Author evaan
18 | * https://github.com/evaan
19 | */
20 | public class FrostBurn implements ModInitializer {
21 | public static MinecraftClient mc = MinecraftClient.getInstance();
22 | public static EventBus EVENT_BUS;
23 | public static String clientVersionString = "FrostBurn 1.0";
24 | public static ClickGui clickGUI;
25 |
26 | @Override
27 | public void onInitialize() {
28 | EVENT_BUS = new EventManager();
29 | SettingsManager.init();
30 | ModuleManager.init();
31 | CommandManager.init();
32 | clickGUI = new ClickGui();
33 | if (new File(MinecraftClient.getInstance().runDirectory + File.separator + "FrostBurn" + File.separator + "default.json").exists()) ConfigManager.load("default");
34 | System.out.println("███████╗██████╗░░█████╗░░██████╗████████╗██████╗░██╗░░░██╗██████╗░███╗░░██╗");
35 | System.out.println("██╔════╝██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██║░░░██║██╔══██╗████╗░██║");
36 | System.out.println("█████╗░░██████╔╝██║░░██║╚█████╗░░░░██║░░░██████╦╝██║░░░██║██████╔╝██╔██╗██║");
37 | System.out.println("██╔══╝░░██╔══██╗██║░░██║░╚═══██╗░░░██║░░░██╔══██╗██║░░░██║██╔══██╗██║╚████║");
38 | System.out.println("██║░░░░░██║░░██║╚█████╔╝██████╔╝░░░██║░░░██████╦╝╚██████╔╝██║░░██║██║░╚███║");
39 | System.out.println("╚═╝░░░░░╚═╝░░╚═╝░╚════╝░╚═════╝░░░░╚═╝░░░╚═════╝░░╚═════╝░╚═╝░░╚═╝╚═╝░░╚══╝");
40 | System.out.println("FrostBurn has been initialized!");
41 | System.out.println("https://github.com/evaan/frostburn");
42 | ConfigManager.load("default");
43 |
44 | ClientLifecycleEvents.CLIENT_STOPPING.register((minecraftClient) -> {
45 | ConfigManager.save("default");
46 | });
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/clickgui/ClickGui.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.clickgui;
2 |
3 | import com.evaan.frostburn.clickgui.button.ModuleButton;
4 | import com.evaan.frostburn.module.Module;
5 | import com.evaan.frostburn.module.ModuleManager;
6 | import com.evaan.frostburn.util.Wrapper;
7 | import net.minecraft.client.gui.screen.Screen;
8 | import net.minecraft.client.util.math.MatrixStack;
9 | import net.minecraft.text.LiteralText;
10 | import net.minecraft.util.Pair;
11 |
12 | import java.util.ArrayList;
13 |
14 | /**
15 | * @author Gopro336
16 | * some code ported from Zenith client (my client)
17 | * fixed scroll -evaan
18 | */
19 |
20 | public class ClickGui extends Screen implements Wrapper {
21 |
22 | public static ArrayList windows;
23 | public static Pair isBinding = new Pair<>(false, null);
24 |
25 | public ClickGui() {
26 | super(new LiteralText("ClickGui"));
27 | windows = new ArrayList<>();
28 | int xOffset = 3;
29 | for (Module.Category category : Module.Category.values()) {
30 | windows.add(new Window(category, xOffset, 3, 100, 20));
31 | xOffset += 120;
32 | }
33 | }
34 |
35 | @Override
36 | public void render(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) {
37 | windows.forEach(window -> window.render(matrices, mouseX, mouseY));
38 | }
39 |
40 | @Override
41 | public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) {
42 | windows.forEach(window -> window.mouseDown(mouseX, mouseY, mouseButton));
43 | return false;
44 | }
45 |
46 | @Override
47 | public boolean mouseReleased(double mouseX, double mouseY, int state) {
48 | windows.forEach(window -> window.mouseUp(mouseX, mouseY));
49 | return false;
50 | }
51 |
52 | @Override
53 | public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
54 | windows.forEach(window -> window.keyPress(keyCode));
55 | return super.keyPressed(keyCode, scanCode, modifiers);
56 | }
57 |
58 | @Override
59 | public boolean isPauseScreen() {
60 | return false;
61 | }
62 |
63 | public void drawGradient(MatrixStack matrices, double left, double top, double right, double bottom, int startColor, int endColor) {
64 | fillGradient(matrices, (int)left, (int)top, (int)right, (int)bottom, startColor, endColor);
65 | }
66 |
67 | @Override
68 | public void onClose() {
69 | windows.forEach(Window::close);
70 | ModuleManager.getModule("ClickGui").disable();
71 | }
72 |
73 | @Override
74 | public boolean mouseScrolled(double mouseX, double mouseY, double amount) {
75 | if (amount < 0)
76 | {
77 | for (Window window : windows)
78 | {
79 | window.setY((int)(window.getY() - 8));
80 | }
81 | }
82 | else if (amount > 0)
83 | {
84 | for (Window window : windows)
85 | {
86 | window.setY((int)(window.getY() + 8));
87 | }
88 | }
89 | return super.mouseScrolled(mouseX, mouseY, amount);
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/clickgui/Dropdown.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.clickgui;
2 |
3 | import com.evaan.frostburn.clickgui.button.ModuleButton;
4 | import com.evaan.frostburn.clickgui.button.SettingButton;
5 | import com.evaan.frostburn.clickgui.button.buttons.BoolButton;
6 | import com.evaan.frostburn.clickgui.button.buttons.ModeButton;
7 | import com.evaan.frostburn.module.Module;
8 | import com.evaan.frostburn.util.Setting;
9 | import com.evaan.frostburn.util.SettingsManager;
10 | import net.minecraft.client.util.math.MatrixStack;
11 |
12 | import java.util.ArrayList;
13 |
14 | /**
15 | * @author Gopro336
16 | */
17 | public class Dropdown {
18 |
19 | private final double W;
20 | private final double H;
21 | public double X;
22 | public double Y;
23 | private final Module module;
24 | private final ModuleButton moduleButton;
25 | private static int modY = 0;
26 |
27 | private final ArrayList buttons = new ArrayList<>();
28 |
29 | public Dropdown(ModuleButton mButton, Module module, double x, double y, double w, double h) {
30 | X = x;
31 | Y = y;
32 | W = w;
33 | H = h;
34 |
35 | this.moduleButton = mButton;
36 | this.module = module;
37 | int boost = 0;
38 |
39 | initGui(boost);
40 | }
41 |
42 | public void initGui(int boost) {
43 |
44 | //if (SettingsManager.getSettings(module) == null) return;
45 |
46 | for (Setting> setting : SettingsManager.getSettings(module)) {
47 |
48 | SettingButton settingButton;
49 |
50 | if (setting.getValue() instanceof Boolean) {
51 |
52 | //set the setting button
53 | settingButton = new BoolButton(moduleButton, module, setting, X, Y + (boost * H), W, H);
54 | buttons.add(settingButton);
55 |
56 | }
57 | if (setting.getValue() instanceof String) {
58 |
59 | //set the setting button
60 | settingButton = new ModeButton(moduleButton, module, setting, X, Y + (boost * H), W, H);
61 | buttons.add(settingButton);
62 |
63 | }
64 | /*if (setting.isNumber()) {
65 |
66 | //set the setting button
67 | settingButton = new SliderButton(module, setting, X, Y + (boost * H), W, H, mX, mY, false);
68 | buttons.add(settingButton);
69 |
70 | }*/
71 | }
72 |
73 | //bind
74 | }
75 |
76 | public void render(MatrixStack matrices, int mX, int mY) {
77 | modY = 0;
78 | int boost = 0;
79 |
80 | for (SettingButton button : buttons){
81 | ++boost;
82 | button.setX(X);
83 | button.setY(Y + (boost * H));
84 | button.render(matrices, mX, mY);
85 | button.update();
86 | Window.buttonCounter[0] = Window.buttonCounter[0] + 1;
87 |
88 | modY = boost;
89 | }
90 |
91 | }
92 |
93 | public void mouseDown(int mX, int mY, int mB) {
94 | buttons.forEach(settingButton -> settingButton.mouseDown(mX, mY, mB));
95 | }
96 |
97 | public void mouseUp(int mX, int mY) {
98 | buttons.forEach(settingButton -> settingButton.mouseUp(mX, mY));
99 | }
100 |
101 | public void keyPress(int key) {
102 | buttons.forEach(settingButton -> settingButton.keyPress(key));
103 | }
104 |
105 | public void close() {
106 | buttons.forEach(SettingButton::close);
107 | }
108 |
109 | public void setX(double x) {
110 | X = x;
111 | }
112 |
113 | public void setY(double y) {
114 | Y = y;
115 | }
116 |
117 | //Returns boost multiplied by the height. Used for adding to the main height.
118 | public double getBoost() {
119 | ///return (int)(moduleButton.getDropdownProgressPercentage() * (modY*H))/100;
120 | return modY*H;
121 | }
122 |
123 | }
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/clickgui/ImGuiScreen.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.clickgui;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.module.ModuleManager;
5 | import com.evaan.frostburn.util.Setting;
6 | import imgui.ImGui;
7 | import imgui.ImGuiIO;
8 | import imgui.flag.*;
9 | import imgui.gl3.ImGuiImplGl3;
10 | import imgui.glfw.ImGuiImplGlfw;
11 | import imgui.type.ImBoolean;
12 | import imgui.type.ImInt;
13 | import net.fabricmc.api.EnvType;
14 | import net.fabricmc.api.Environment;
15 | import net.minecraft.client.MinecraftClient;
16 | import net.minecraft.client.gui.screen.Screen;
17 | import net.minecraft.client.util.math.MatrixStack;
18 | import net.minecraft.text.LiteralText;
19 | import net.minecraft.util.Formatting;
20 |
21 | import java.awt.*;
22 | import java.awt.datatransfer.StringSelection;
23 | import java.net.URI;
24 | import java.util.HashMap;
25 | import java.util.Objects;
26 |
27 | @Environment(EnvType.CLIENT)
28 | public class ImGuiScreen extends Screen {
29 |
30 | private long windowPtr;
31 |
32 | private final ImGuiImplGlfw implGlfw = new ImGuiImplGlfw();
33 |
34 | private final ImGuiImplGl3 implGl3 = new ImGuiImplGl3();
35 |
36 | private HashMap enabledMap = new HashMap<>();
37 | private HashMap settingsMap = new HashMap<>();
38 |
39 | private HashMap spaghettiCode = new HashMap<>();
40 | private HashMap showSettingsMap = new HashMap<>();
41 |
42 | int x = 50;
43 | int alpha = 0;
44 |
45 | boolean isClosing = false;
46 |
47 | public ImGuiScreen() {
48 | super(new LiteralText("FrostBurn ClickGui"));
49 | windowPtr = MinecraftClient.getInstance().getWindow().getHandle();
50 | ImGui.createContext();
51 | implGlfw.init(windowPtr, false);
52 | implGl3.init("#version 150");
53 |
54 | for (Module.Category category : Module.Category.values()) {
55 | spaghettiCode.put(category, false);
56 | }
57 |
58 | for (Module module : ModuleManager.modules) {
59 | if (module.getName().equalsIgnoreCase("imgui")) continue;
60 | showSettingsMap.put(module, false);
61 | enabledMap.put(module, new ImBoolean(module.isEnabled()));
62 | for (Setting setting : module.settings) {
63 | switch (setting.getType()) {
64 | case BOOLEAN:
65 | settingsMap.put(setting, new ImBoolean((Boolean) setting.getValue()));
66 | break;
67 | case INTEGER:
68 | settingsMap.put(setting, new int[]{(int) setting.getValue()});
69 | break;
70 | case FLOAT:
71 | settingsMap.put(setting, new float[]{(float) setting.getValue()});
72 | break;
73 | case STRING:
74 | settingsMap.put(setting, new ImInt(setting.getOptions().indexOf(setting.getValue())));
75 | break;
76 | }
77 | }
78 | }
79 | }
80 |
81 | @Override
82 | public boolean isPauseScreen() {
83 | return false;
84 | }
85 |
86 | @Override
87 | public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
88 | implGlfw.newFrame();
89 | ImGui.newFrame();
90 | if (alpha < 255) alpha+=10;
91 | if (isClosing) {
92 | alpha-=30;
93 | if (alpha <= 0) super.onClose();
94 | }
95 | ImGui.getIO().setConfigWindowsMoveFromTitleBarOnly(true);
96 | ImGui.getStyle().setWindowMenuButtonPosition(-1);
97 | ImGui.getStyle().setColor(ImGuiCol.TitleBgActive, 0, 0, 0, alpha);
98 | ImGui.getStyle().setColor(ImGuiCol.FrameBg, 50, 50, 50, alpha);
99 | ImGui.getStyle().setColor(ImGuiCol.FrameBgActive, 50, 50, 50, alpha);
100 | ImGui.getStyle().setColor(ImGuiCol.FrameBgHovered, 75, 75, 75, alpha);
101 | ImGui.getStyle().setColor(ImGuiCol.CheckMark, 255, 255, 255, alpha);
102 | ImGui.getStyle().setColor(ImGuiCol.SliderGrab, 255, 255, 255, alpha);
103 | ImGui.getStyle().setColor(ImGuiCol.SliderGrabActive, 255, 255, 255, alpha);
104 | ImGui.getStyle().setColor(ImGuiCol.Button, 50, 50,50,alpha);
105 | ImGui.getStyle().setColor(ImGuiCol.ButtonHovered, 75, 75,75,alpha);
106 | ImGui.getStyle().setColor(ImGuiCol.ButtonActive, 100, 100, 100,alpha);
107 | ImGui.getStyle().setColor(ImGuiCol.Header, 50, 50, 50,alpha);
108 | ImGui.getStyle().setColor(ImGuiCol.HeaderHovered, 75, 75, 75,alpha);
109 | ImGui.getStyle().setColor(ImGuiCol.Text, 255, 255, 255, alpha);
110 | ImGui.getStyle().setColor(ImGuiCol.WindowBg, 25, 25, 25, alpha > 220 ? 220 : alpha);
111 | ImGui.getStyle().setColor(ImGuiCol.Border, 0, 0, 0, alpha);
112 | ImGui.getStyle().setColor(ImGuiCol.TitleBg, 50, 50, 50, alpha);
113 | for (Module.Category category : Module.Category.values()) {
114 | ImGui.begin(category.getName(), ImGuiWindowFlags.NoResize);
115 | if (!spaghettiCode.get(category)) {
116 | ImGui.setWindowPos(x, 50);
117 | x+=300;
118 | ImGui.setWindowSize(250, 450);
119 | spaghettiCode.put(category, true);
120 | }
121 | for (Module module : ModuleManager.getModulesInCategory(category)) {
122 | if (module.getName().equalsIgnoreCase("imgui"))
123 | continue;
124 | ImGui.checkbox(module.getName(), enabledMap.get(module));
125 | if (ImGui.isItemHovered() && ImGui.isMouseClicked(1)) showSettingsMap.put(module, !showSettingsMap.get(module));
126 | ImGui.sameLine(235);
127 | ImGui.text(((module.settings.isEmpty()) ? "" : (showSettingsMap.get(module)) ? "V" : ">"));
128 | if (showSettingsMap.get(module)) {
129 | for (Setting setting : module.settings) {
130 | ImGui.indent();
131 | switch (setting.getType()) {
132 | case BOOLEAN:
133 | ImGui.checkbox(setting.getName(), (ImBoolean) settingsMap.get(setting));
134 | if ((boolean) setting.getValue() != ((ImBoolean) settingsMap.get(setting)).get())
135 | setting.setValue(((ImBoolean) settingsMap.get(setting)).get());
136 | break;
137 | case INTEGER:
138 | ImGui.sliderInt(setting.getName(), (int[]) settingsMap.get(setting), (int) setting.getMin(), (int) setting.getMax());
139 | int[] javaStupid = (int[]) settingsMap.get(setting);
140 | if (javaStupid[0] != (int) setting.getValue()) setting.setValue(javaStupid[0]);
141 | break;
142 | case FLOAT:
143 | ImGui.sliderFloat(setting.getName(), (float[]) settingsMap.get(setting), (float) setting.getMin(),(float) setting.getMax());
144 | float[] javaStupid1 = (float[]) settingsMap.get(setting);
145 | if (javaStupid1[0] != (float) setting.getValue()) setting.setValue(javaStupid1[0]);
146 | break;
147 | case STRING:
148 | String[] javaStupid2 = (String[]) setting.getOptions().toArray(new String[setting.getOptions().size()]);
149 | ImGui.combo(setting.getName(), (ImInt) settingsMap.get(setting), javaStupid2);
150 | if (((ImInt) settingsMap.get(setting)).get() != setting.getOptions().indexOf(setting.getValue()))
151 | setting.setValue(setting.getOptions().get(((ImInt) settingsMap.get(setting)).get()));
152 | }
153 | ImGui.unindent();
154 | }
155 |
156 | }
157 | if (enabledMap.get(module).get() != module.isEnabled()) module.toggle();
158 | }
159 | ImGui.end();
160 | }
161 |
162 | ImGui.render();
163 | implGl3.renderDrawData(Objects.requireNonNull(ImGui.getDrawData()));
164 | }
165 |
166 | @Override
167 | public void onClose() {
168 | if (isClosing) super.onClose();
169 | else isClosing = true;
170 | }
171 | }
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/clickgui/Window.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.clickgui;
2 |
3 | import com.evaan.frostburn.FrostBurn;
4 | import com.evaan.frostburn.clickgui.button.ModuleButton;
5 | import com.evaan.frostburn.module.Module;
6 | import com.evaan.frostburn.module.ModuleManager;
7 | import com.evaan.frostburn.module.modules.render.ClickGuiMod;
8 | import com.evaan.frostburn.util.Wrapper;
9 | import net.minecraft.client.util.math.MatrixStack;
10 | import net.minecraft.text.LiteralText;
11 |
12 | import java.awt.*;
13 | import java.util.ArrayList;
14 | //import java.util.List;
15 |
16 | /**
17 | * @author Gopro336
18 | * windows still dont close properly
19 | */
20 | public class Window implements Wrapper {
21 |
22 | public String title;
23 | public final Module.Category category;
24 | public static int[] buttonCounter = new int[]{1};
25 | private final ArrayList buttons = new ArrayList<>();
26 | public final int W;
27 | public final int H;
28 | public double X;
29 | public double Y;
30 | private double dragX;
31 | private double dragY;
32 | public boolean open = true;
33 | private boolean dragging;
34 |
35 | public Window(Module.Category category, int x, int y, int w, int h) {
36 |
37 | this.title = category.toString();
38 | this.category = category;
39 | X = x;
40 | Y = y;
41 | W = w;
42 | H = h;
43 |
44 | double yOffset = Y + H;
45 |
46 | //for each module from the category, initiate a module button and add it to buttons list
47 | for (Module module : ModuleManager.getModulesInCategory(category))
48 | {
49 | ModuleButton button = new ModuleButton(module, X, yOffset, W, H);
50 | buttons.add(button);
51 | yOffset += H;
52 |
53 | }
54 | }
55 |
56 | public void render(MatrixStack matrices, int mX, int mY)
57 | {
58 | //button counter not in use yet
59 | buttonCounter = new int[]{1};
60 |
61 | //dragging
62 | if (dragging) {
63 | X = dragX + mX;
64 | Y = dragY + mY;
65 | }
66 |
67 | //draw top bar
68 | FrostBurn.clickGUI.drawGradient(matrices, X, Y, X + W, Y + H, new Color(ClickGuiMod.clickGuiMod.bgR.getValue(), ClickGuiMod.clickGuiMod.bgG.getValue(), ClickGuiMod.clickGuiMod.bgB.getValue(), ClickGuiMod.clickGuiMod.bgA.getValue()).getRGB(), new Color(ClickGuiMod.clickGuiMod.bgR.getValue(), ClickGuiMod.clickGuiMod.bgG.getValue(), ClickGuiMod.clickGuiMod.bgB.getValue(), ClickGuiMod.clickGuiMod.bgA.getValue()).getRGB());//119
69 |
70 | //draw title string
71 | textRenderer.draw(matrices, new LiteralText(category.getName()), (float)X + 4, (float)Y + 4, new Color(30, 30, 30).getRGB());
72 |
73 | //return if it is closed
74 | if (!open) return;
75 |
76 | double modY = Y + H;
77 |
78 | for (ModuleButton moduleButton : buttons)
79 | {
80 | Window.buttonCounter[0] = buttonCounter[0] + 1;
81 | //draw moduleButton
82 | moduleButton.setX(X);
83 | moduleButton.setY(modY);
84 | moduleButton.render(matrices, mX, mY);
85 |
86 | //if moduleButton is closed continue to next iteration
87 | //if (!moduleButton.isOpen()) continue;
88 |
89 | if (moduleButton.isOpen()){
90 | //set "dropdown" to reference the dropdown defined inside of moduleButton class
91 | Dropdown dropdown = moduleButton.dropdown;
92 |
93 | dropdown.setX(X);
94 | dropdown.setY(modY);
95 | //dropdown.opening = true;
96 |
97 | dropdown.render(matrices, mX, mY);
98 |
99 | //boost is multiplied by height beforehand
100 | modY += dropdown.getBoost();
101 |
102 | }
103 |
104 | modY += H;
105 | }
106 | }
107 |
108 | public void mouseDown(double mX, double mY, int mB)
109 | {
110 | if (isHover(X, Y, W, H, mX, mY))
111 | {
112 | if (mB == 0) {
113 | dragging = true;
114 | dragX = X - mX;
115 | dragY = Y - mY;
116 | }
117 | else if (mB == 1) {
118 | if (open) {
119 | for (ModuleButton button : buttons) {
120 | if (button.isOpen())
121 | {
122 | button.processRightClick();
123 | }
124 | }
125 | }
126 | /*else if (!open) {
127 | open = true;
128 | }*/
129 | }
130 | }
131 |
132 | if (open)
133 | for (ModuleButton button : buttons) {
134 | button.mouseDown((int)mX, (int)mY, mB);
135 | button.dropdown.mouseDown((int)mX, (int)mY, mB);
136 | }
137 | }
138 |
139 | public void close() {
140 | buttons.forEach(button -> button.dropdown.close());
141 | }
142 |
143 | public void mouseUp(double mX, double mY) {
144 | dragging = false;
145 | if (!open) return;
146 | buttons.forEach(button -> button.dropdown.mouseUp((int)mX, (int)mY));
147 | }
148 |
149 | public void keyPress(int key) {
150 | if (open)
151 | buttons.forEach(button -> button.dropdown.keyPress(key));
152 | }
153 |
154 | private boolean isHover(double X, double Y, double W, double H, double mX, double mY) {
155 | return mX >= X && mX <= X + W && mY >= Y && mY <= Y + H;
156 | }
157 |
158 | public double getY() {
159 | return Y;
160 | }
161 |
162 | public void setY(int y) {
163 | Y = y;
164 | }
165 |
166 | public void setX(int x) {
167 | X = x;
168 | }
169 |
170 | /*public void setOpen(boolean Open) {
171 | open = Open;
172 | }*/
173 | }
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/clickgui/button/ModuleButton.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.clickgui.button;
2 |
3 | import com.evaan.frostburn.FrostBurn;
4 | import com.evaan.frostburn.clickgui.Dropdown;
5 | import com.evaan.frostburn.module.Module;
6 | import com.evaan.frostburn.module.modules.render.ClickGuiMod;
7 | import com.evaan.frostburn.util.Wrapper;
8 | import net.minecraft.client.util.math.MatrixStack;
9 | import net.minecraft.util.math.Quaternion;
10 |
11 | import java.awt.*;
12 |
13 | /**
14 | * @author Gopro336
15 | */
16 | public class ModuleButton implements Wrapper
17 | {
18 | public boolean startHighlight;
19 | private final Module module;
20 | //private final ArrayList buttons = new ArrayList<>();
21 | private final double W;
22 | private final double H;
23 | private double X;
24 | private double Y;
25 | private boolean open;
26 | public Dropdown dropdown;
27 |
28 | public ModuleButton(Module module, double x, double y, double w, double h)
29 | {
30 | this.startHighlight = false;
31 |
32 | this.module = module;
33 | X = x;
34 | Y = y;
35 | W = w;
36 | H = h;
37 |
38 | dropdown = new Dropdown(this, this.getModule(), X, Y, W, H);
39 | }
40 |
41 | private final MatrixStack matrixStack = new MatrixStack();
42 |
43 | public void render(MatrixStack matrices, int mX, int mY)
44 | {
45 | FrostBurn.clickGUI.drawGradient(matrices, X, Y, X + W , Y + H, new Color(ClickGuiMod.clickGuiMod.bgR.getValue(), ClickGuiMod.clickGuiMod.bgG.getValue(), ClickGuiMod.clickGuiMod.bgB.getValue(), ClickGuiMod.clickGuiMod.bgA.getValue()).getRGB(), new Color(ClickGuiMod.clickGuiMod.bgR.getValue(), ClickGuiMod.clickGuiMod.bgG.getValue(), ClickGuiMod.clickGuiMod.bgB.getValue(), ClickGuiMod.clickGuiMod.bgA.getValue()).getRGB());
46 |
47 | if (module.isEnabled()) {
48 | Wrapper.textRenderer.draw(matrices, module.getName(), (float) (X + 5), (float) (Y + 4), new Color(new Color(ClickGuiMod.clickGuiMod.textAltR.getValue(), ClickGuiMod.clickGuiMod.textAltG.getValue(), ClickGuiMod.clickGuiMod.textAltB.getValue(), ClickGuiMod.clickGuiMod.textAltA.getValue()).getRGB()).getRGB());
49 | }
50 | else {
51 | Wrapper.textRenderer.draw(matrices, module.getName(), (float) (X + 5), (float) (Y + 4), new Color(ClickGuiMod.clickGuiMod.textR.getValue(), ClickGuiMod.clickGuiMod.textG.getValue(), ClickGuiMod.clickGuiMod.textB.getValue(), ClickGuiMod.clickGuiMod.textA.getValue()).getRGB());
52 | }
53 |
54 | if (isHover(X, Y, W, H - 1, mX, mY)) {
55 | FrostBurn.clickGUI.drawGradient(matrices, X, Y, X + W , Y + H, new Color(140, 140, 140, 110).getRGB(), new Color(140, 140, 140, 110).getRGB());
56 | }
57 |
58 | if (open) {
59 | matrixStack.push();
60 | matrixStack.translate(X + H/2, Y + H/2, 0);
61 | rotate(90,0, 0,1);
62 | matrixStack.translate(-(X + H/2), -(Y + H/2), 0);
63 | textRenderer.draw(matrices, ("..."), (float) ((X + W - 3) - Wrapper.textRenderer.getWidth("...")), (float) (Y + 4), new Color(ClickGuiMod.clickGuiMod.textR.getValue(), ClickGuiMod.clickGuiMod.textG.getValue(), ClickGuiMod.clickGuiMod.textB.getValue(), ClickGuiMod.clickGuiMod.textA.getValue()).getRGB());
64 | matrixStack.pop();
65 | }
66 | else {
67 | textRenderer.draw(matrices, ("..."), (float) ((X + W - 3) - Wrapper.textRenderer.getWidth("...")), (float) (Y + 4), new Color(ClickGuiMod.clickGuiMod.textR.getValue(), ClickGuiMod.clickGuiMod.textG.getValue(), ClickGuiMod.clickGuiMod.textB.getValue(), ClickGuiMod.clickGuiMod.textA.getValue()).getRGB());
68 | }
69 |
70 | }
71 |
72 | public void rotate(float angle, float x, float y, float z) {
73 | matrixStack.multiply(new Quaternion(x * angle, y * angle, z * angle, true));
74 | }
75 |
76 | public void mouseDown(int mX, int mY, int mB) {
77 | if (!isHover(X, Y, W, H - 1, mX, mY)) return;
78 |
79 | if (mB == 0) {
80 | module.toggle();
81 | if (module.getName().equals("ClickGUI"))
82 | mc.openScreen(null);
83 | }
84 | else if (mB == 1) {
85 | processRightClick();
86 | }
87 | }
88 |
89 | private boolean isHover(double X, double Y, double W, double H, int mX, int mY) {
90 | return mX >= X && mX <= X + W && mY >= Y && mY <= Y + H;
91 | }
92 |
93 | public void setX(double x) {
94 | X = x;
95 | }
96 |
97 | public void setY(double y) {
98 | Y = y;
99 | }
100 |
101 | public boolean isOpen() {
102 | return open;
103 | }
104 |
105 | public Module getModule() {
106 | return module;
107 | }
108 |
109 | /*public ArrayList getButtons() {
110 | return buttons;
111 | }*/
112 |
113 | public void processRightClick() {
114 | open = !open;
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/clickgui/button/SettingButton.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.clickgui.button;
2 |
3 | import com.evaan.frostburn.FrostBurn;
4 | import com.evaan.frostburn.module.Module;
5 | import com.evaan.frostburn.module.modules.render.ClickGuiMod;
6 | import com.evaan.frostburn.util.Setting;
7 | import com.evaan.frostburn.util.Wrapper;
8 | import net.minecraft.client.util.math.MatrixStack;
9 |
10 | import java.awt.*;
11 |
12 | /**
13 | * @author Gopro336
14 | */
15 | public class SettingButton implements Wrapper
16 | {
17 | public Setting setting;
18 | private boolean state;
19 | private final double W;
20 | private final double H;
21 | private Module module;
22 | private ModuleButton parentMB;
23 | private double X;
24 | private double Y;
25 |
26 | public SettingButton(ModuleButton parent, Module module, double x, double y, double w, double h) {
27 | this.module = module;
28 | this.parentMB = parent;
29 | X = x;
30 | Y = y;
31 | W = w;
32 | H = h;
33 | }
34 |
35 | public void update() {
36 | }
37 |
38 | public void render(MatrixStack matrices, int mX, int mY) {
39 | }
40 |
41 | public void mouseDown(int mX, int mY, int mB) {
42 | }
43 |
44 | public void mouseUp(int mX, int mY) {
45 | }
46 |
47 | public void keyPress(int key) {
48 | }
49 |
50 | public void close() {
51 | }
52 |
53 | public void drawButton(MatrixStack matrices, int mX, int mY)
54 | {
55 | FrostBurn.clickGUI.drawGradient(matrices, X, Y, X + W , Y + H, new Color(ClickGuiMod.clickGuiMod.bgR.getValue(), ClickGuiMod.clickGuiMod.bgG.getValue(), ClickGuiMod.clickGuiMod.bgB.getValue(), ClickGuiMod.clickGuiMod.bgA.getValue()).getRGB(), new Color(ClickGuiMod.clickGuiMod.bgR.getValue(), ClickGuiMod.clickGuiMod.bgG.getValue(), ClickGuiMod.clickGuiMod.bgB.getValue(), ClickGuiMod.clickGuiMod.bgA.getValue()).getRGB());
56 |
57 | if (isHover(getX(), getY(), getW(), getH() - 1, mX, mY)) {
58 | FrostBurn.clickGUI.drawGradient(matrices, X, Y, X + W , Y + H, new Color(140, 140, 140, 110).getRGB(), new Color(140, 140, 140, 110).getRGB());
59 | }
60 | }
61 |
62 | protected boolean isHovering(final double mouseX, final double mouseY) {
63 | return mouseX >= this.getX() && mouseX <= this.getX() + this.getW() && mouseY >= this.getY() && mouseY <= this.getY() + this.H;
64 | }
65 |
66 | public void mouseClicked(final int mouseX, final int mouseY, final int mouseButton) {
67 | if (mouseButton == 0 && this.isHovering(mouseX, mouseY)) {
68 | this.state = !this.state;
69 | this.toggle();
70 | }
71 | }
72 |
73 | public Setting getValue(){
74 | return setting;
75 | }
76 |
77 | public void toggle() {
78 | }
79 |
80 | public Module getModule()
81 | {
82 | return module;
83 | }
84 |
85 | public void setModule(Module module)
86 | {
87 | this.module = module;
88 | }
89 |
90 | public SettingButton getSelf() {
91 | return this;
92 | }
93 |
94 | public double getX() {
95 | return X;
96 | }
97 |
98 | public void setX(double x) {
99 | X = x;
100 | }
101 |
102 | public double getY() {
103 | return Y;
104 | }
105 |
106 | public void setY(double y) {
107 | Y = y;
108 | }
109 |
110 | public double getW() {
111 | return W;
112 | }
113 |
114 | public double getH() {
115 | return H;
116 | }
117 |
118 | public boolean isHover(double X, double Y, double W, double H, int mX, int mY) {
119 | return mX >= X && mX <= X + W && mY >= Y && mY <= Y + H;
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/clickgui/button/buttons/BoolButton.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.clickgui.button.buttons;
2 |
3 | import com.evaan.frostburn.clickgui.button.ModuleButton;
4 | import com.evaan.frostburn.clickgui.button.SettingButton;
5 | import com.evaan.frostburn.module.Module;
6 | import com.evaan.frostburn.module.modules.render.ClickGuiMod;
7 | import com.evaan.frostburn.util.Setting;
8 | import com.evaan.frostburn.util.Wrapper;
9 | import net.minecraft.client.util.math.MatrixStack;
10 |
11 | import java.awt.*;
12 |
13 | public class BoolButton extends SettingButton implements Wrapper
14 | {
15 | private final Setting setting;
16 |
17 | public BoolButton(ModuleButton parent, Module module, Setting> setting, double X, double Y, double W, double H) {
18 | super(parent, module, X, Y, W, H);
19 | this.setting = setting;
20 | }
21 |
22 | @Override
23 | public void render(MatrixStack matrices, int mX, int mY) {
24 |
25 | drawButton(matrices, mX, mY);
26 |
27 | if ((boolean)setting.getValue()) {
28 | textRenderer.draw(matrices, setting.getName(), (float) (getX() + 10), (float) (getY() + 4), new Color(new Color(ClickGuiMod.clickGuiMod.textAltR.getValue(), ClickGuiMod.clickGuiMod.textAltG.getValue(), ClickGuiMod.clickGuiMod.textAltB.getValue(), ClickGuiMod.clickGuiMod.textAltA.getValue()).getRGB()).getRGB());
29 | }
30 | else {
31 | textRenderer.draw(matrices, setting.getName(), (float) (getX() + 10), (float) (getY() + 4), new Color(ClickGuiMod.clickGuiMod.textR.getValue(), ClickGuiMod.clickGuiMod.textG.getValue(), ClickGuiMod.clickGuiMod.textB.getValue(), ClickGuiMod.clickGuiMod.textA.getValue()).getRGB());
32 | }
33 | }
34 |
35 | @Override
36 | public Setting> getValue(){
37 | return setting;
38 | }
39 |
40 | @Override
41 | public void mouseDown(int mX, int mY, int mB) {
42 | if (isHover(getX(), getY(), getW(), getH() - 1, mX, mY) && mB == 0) setting.setValue(!(boolean)setting.getValue());
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/clickgui/button/buttons/ModeButton.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.clickgui.button.buttons;
2 |
3 | import com.evaan.frostburn.clickgui.button.ModuleButton;
4 | import com.evaan.frostburn.clickgui.button.SettingButton;
5 | import com.evaan.frostburn.module.Module;
6 | import com.evaan.frostburn.module.modules.render.ClickGuiMod;
7 | import com.evaan.frostburn.util.Setting;
8 | import com.evaan.frostburn.util.Wrapper;
9 | import net.minecraft.client.util.math.MatrixStack;
10 |
11 | import java.awt.*;
12 |
13 | /**
14 | * @author Gopro336
15 | */
16 | public class ModeButton extends SettingButton implements Wrapper
17 | {
18 | private final Setting setting;
19 |
20 | public ModeButton(ModuleButton parent, Module module, Setting> setting, double X, double Y, double W, double H)
21 | {
22 | super(parent, module, X, Y, W, H);
23 | this.setting = setting;
24 | }
25 |
26 | @Override
27 | public void render(MatrixStack matrices, int mX, int mY)
28 | {
29 | drawButton(matrices, mX, mY);
30 |
31 | textRenderer.draw(matrices, setting.getName(), (float) (getX() + 10), (float) (getY() + 4), new Color(ClickGuiMod.clickGuiMod.textR.getValue(), ClickGuiMod.clickGuiMod.textG.getValue(), ClickGuiMod.clickGuiMod.textB.getValue(), ClickGuiMod.clickGuiMod.textA.getValue()).getRGB());
32 | textRenderer.draw(matrices, setting.getValue().toString(), (float) ((getX() + getW() - 6) - textRenderer.getWidth(setting.getValue().toString())), (float) (getY() + 4), new Color(ClickGuiMod.clickGuiMod.textR.getValue(), ClickGuiMod.clickGuiMod.textG.getValue(), ClickGuiMod.clickGuiMod.textB.getValue(), ClickGuiMod.clickGuiMod.textA.getValue()).getRGB());
33 | }
34 |
35 | @Override
36 | public void mouseDown(int mX, int mY, int mB)
37 | {
38 | super.mouseClicked(mX, mY, mB);
39 | if (this.isHovering(mX, mY)) {
40 | String s = (setting.getValue() instanceof String ? (String) setting.getValue() : setting.getValue().toString());
41 | if (mB == 0) {
42 | try {
43 | if (!setting.getCorrectString(s).equalsIgnoreCase(setting.getOptions().get(setting.getOptions().size() - 1).toString())) {
44 | setting.setValue(setting.getOptions().get(setting.getOptions().indexOf(setting.getCorrectString(s)) + 1));
45 | } else {
46 | setting.setValue(setting.getOptions().get(0));
47 | }
48 | } catch (Exception e) {
49 | System.err.println("Mode Button Error");
50 | e.printStackTrace();
51 | setting.setValue(setting.getOptions().get(0));
52 | }
53 | }
54 | /*else if (mB == 1) {
55 | add decrement?
56 | }*/
57 | }
58 | }
59 |
60 | @Override
61 | public Setting> getValue(){
62 | return setting;
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/command/Command.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.command;
2 |
3 | import com.evaan.frostburn.FrostBurn;
4 | import net.minecraft.text.LiteralText;
5 | import net.minecraft.util.Formatting;
6 |
7 | /**
8 | * @Author evaan
9 | * https://github.com/evaan
10 | */
11 | public class Command {
12 | public static String prefix = ",";
13 |
14 | public String[] name;
15 | public Command(String[] name) {this.name = name;}
16 | public void onCommand(String[] args) {}
17 |
18 | public static void sendMessage(String message) {
19 | try {
20 | FrostBurn.mc.player.sendMessage(new LiteralText(Formatting.BLUE + "[FrostBurn] " + Formatting.WHITE + message), false);
21 | } catch (Exception e) {}
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/command/CommandManager.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.command;
2 |
3 | import com.evaan.frostburn.command.commands.*;
4 |
5 | import java.util.ArrayList;
6 | import java.util.Comparator;
7 |
8 | /**
9 | * @Author evaan
10 | * https://github.com/evaan
11 | */
12 | public class CommandManager {
13 | public static ArrayList commands;
14 |
15 | public static void init() {
16 | commands = new ArrayList<>();
17 |
18 | commands.add(new BindCommand());
19 | commands.add(new HelpCommand());
20 | commands.add(new ToggleCommand());
21 | commands.add(new ModulesCommand());
22 | commands.add(new FriendCommand());
23 | commands.add(new SettingCommand());
24 | commands.add(new DrawnCommand());
25 | commands.add(new ConfigCommand());
26 |
27 | commands.sort(Comparator.comparing(object -> object.name[0]));
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/command/commands/BindCommand.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.command.commands;
2 |
3 | import com.evaan.frostburn.command.Command;
4 | import com.evaan.frostburn.module.Module;
5 | import com.evaan.frostburn.module.ModuleManager;
6 | import net.minecraft.client.util.InputUtil;
7 |
8 | /**
9 | * @Author evaan
10 | * https://github.com/evaan
11 | */
12 | public class BindCommand extends Command {
13 | public BindCommand() {super(new String[]{"bind", "b"});}
14 |
15 | @Override
16 | public void onCommand(String[] args) {
17 | if (args.length != 3) {
18 | sendMessage("Usage: bind ");
19 | return;
20 | }
21 | Module m = ModuleManager.getModule(args[1]);
22 | if (m == null) {
23 | sendMessage("Module not found.");
24 | return;
25 | }
26 | if (args[2].equalsIgnoreCase("r")) m.setBind(InputUtil.fromTranslationKey("key.keyboard.r").getCode());
27 | else {
28 | try { m.setBind(InputUtil.fromTranslationKey("key.keyboard." + args[2].toLowerCase().replaceFirst("right", "right.").replaceFirst("r", "right.")).getCode()); }
29 | catch (NumberFormatException e) { Command.sendMessage("Key not found!"); return; }
30 | }
31 | sendMessage(m.getName() + " bound to " + args[2].toUpperCase());
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/command/commands/ConfigCommand.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.command.commands;
2 |
3 | import com.evaan.frostburn.command.Command;
4 | import com.evaan.frostburn.util.ConfigManager;
5 |
6 | public class ConfigCommand extends Command {
7 |
8 | public ConfigCommand() {
9 | super(new String[]{"config", "c"});
10 | }
11 |
12 | @Override
13 | public void onCommand(String[] args) {
14 | if (args.length == 1) {
15 | sendMessage("Usage: config ");
16 | return;
17 | }
18 |
19 | if (args[1].equalsIgnoreCase("save")) {
20 | ConfigManager.save(args[2]);
21 | } else if (args[1].equalsIgnoreCase("load")) {
22 | ConfigManager.load(args[2]);
23 | } else sendMessage("Usage: ");
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/command/commands/DrawnCommand.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.command.commands;
2 |
3 | import com.evaan.frostburn.command.Command;
4 | import com.evaan.frostburn.module.ModuleManager;
5 |
6 | /**
7 | * @Author evaan
8 | * https://github.com/evaan
9 | */
10 | public class DrawnCommand extends Command {
11 | public DrawnCommand() {super(new String[]{"drawn", "d"});}
12 |
13 | @Override
14 | public void onCommand(String[] args) {
15 | if (args.length == 1) {
16 | sendMessage("Usage: drawn ");
17 | return;
18 | }
19 | if (ModuleManager.getModule(args[1]) != null) {
20 | ModuleManager.getModule(args[1]).setDrawn(ModuleManager.getModule(args[1]).isDrawn());
21 | } else sendMessage("Module not found!");
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/command/commands/FriendCommand.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.command.commands;
2 |
3 | import com.evaan.frostburn.command.Command;
4 | import com.evaan.frostburn.util.Friends;
5 |
6 | /**
7 | * @Author evaan
8 | * https://github.com/evaan
9 | */
10 | public class FriendCommand extends Command {
11 | public FriendCommand() {super(new String[]{"friend"});}
12 |
13 | @Override
14 | public void onCommand(String[] args) {
15 | if (args.length != 3) {
16 | sendMessage("Usage: friend ");
17 | return;
18 | }
19 | if (!args[1].equalsIgnoreCase("add") && !args[1].equalsIgnoreCase("del")) {
20 | sendMessage("Usage: friend ");
21 | return;
22 | }
23 | if (args[1].equalsIgnoreCase("add")) {
24 | if (Friends.getInstance().isFriend(args[2])) {
25 | sendMessage(args[2] + " is already your friend!");
26 | return;
27 | } else {
28 | Friends.getInstance().addFriend(args[2]);
29 | sendMessage("Added " + args[2] + " to your friends list!");
30 | }
31 | }
32 | if (args[1].equalsIgnoreCase("del")) {
33 | if (!Friends.getInstance().isFriend(args[2])) {
34 | sendMessage(args[2] + " is already not your friend!");
35 | return;
36 | } else {
37 | Friends.getInstance().removeFriend(args[2]);
38 | sendMessage("Removed " + args[2] + " from your friends list!");
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/command/commands/HelpCommand.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.command.commands;
2 |
3 | import com.evaan.frostburn.command.Command;
4 | import com.evaan.frostburn.command.CommandManager;
5 | import org.apache.commons.lang3.StringUtils;
6 |
7 | /**
8 | * @Author evaan
9 | * https://github.com/evaan
10 | */
11 | public class HelpCommand extends Command {
12 | public HelpCommand() {super(new String[]{"help"});}
13 |
14 | @Override
15 | public void onCommand(String[] args) {
16 | String tmp = "Commands (" + CommandManager.commands.size() + "): ";
17 | sendMessage("FrostBurn 1.0 by evaan");
18 | sendMessage("https://github.com/evaan/frostburn");
19 | for (Command command : CommandManager.commands) {
20 | tmp += StringUtils.capitalize(command.name[0]) +", ";
21 | }
22 | sendMessage(tmp.substring(0, tmp.length()-2));
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/command/commands/ModulesCommand.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.command.commands;
2 |
3 | import com.evaan.frostburn.command.Command;
4 | import com.evaan.frostburn.module.Module;
5 | import com.evaan.frostburn.module.ModuleManager;
6 | import net.minecraft.util.Formatting;
7 |
8 | /**
9 | * @Author evaan
10 | * https://github.com/evaan
11 | */
12 | public class ModulesCommand extends Command {
13 | public ModulesCommand() {super(new String[]{"modules", "mods"});}
14 |
15 | @Override
16 | public void onCommand(String[] args) {
17 | String message = "Modules (" + ModuleManager.modules.size() + "): ";
18 | for (Module module : ModuleManager.modules) {
19 | if (module.isEnabled()) message += Formatting.GREEN + module.getName() + Formatting.WHITE + ", ";
20 | else message += Formatting.RED + module.getName() + Formatting.WHITE + ", ";
21 | }
22 | sendMessage(message.substring(0, message.length()-2));
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/command/commands/SettingCommand.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.command.commands;
2 |
3 | import com.evaan.frostburn.command.Command;
4 | import com.evaan.frostburn.module.Module;
5 | import com.evaan.frostburn.module.ModuleManager;
6 | import com.evaan.frostburn.util.Setting;
7 | import com.evaan.frostburn.util.SettingsManager;
8 |
9 | /**
10 | * @Author evaan
11 | * https://github.com/evaan
12 | */
13 | public class SettingCommand extends Command {
14 | public SettingCommand() {super(new String[]{"setting", "set"});}
15 |
16 | @Override
17 | public void onCommand(String[] args) {
18 | if (args.length != 4) {
19 | sendMessage("Usage: setting ");
20 | return;
21 | }
22 |
23 | // Try to find module
24 | Module module = ModuleManager.getModule(args[1]);
25 | if (module == null) {
26 | sendMessage("Module not found!"); return;
27 | }
28 |
29 | // Try to find the setting on the module
30 | Setting setting = SettingsManager.getSetting(module, args[2]);
31 | if (setting == null) {
32 | sendMessage("Setting not found!");
33 | return;
34 | } else {
35 | switch (setting.getType()) {
36 | case BOOLEAN:
37 | setting.setValue(Boolean.parseBoolean(args[3]));
38 | Command.sendMessage("Set " + setting.getName() + " to " + args[3]);
39 | break;
40 | case FLOAT:
41 | if ((float)setting.getMin() > Float.parseFloat(args[3]) || (float)setting.getMax() < Float.parseFloat(args[3])) {
42 | Command.sendMessage("Min: " + setting.getMin() + ", Max: " + setting.getMax());
43 | break;
44 | }
45 | setting.setValue(Float.valueOf(args[3]));
46 | Command.sendMessage("Set " + setting.getName() + " to " + args[3]);
47 | break;
48 | case INTEGER:
49 | if ((int)setting.getMin() > Integer.parseInt(args[3]) || (int)setting.getMax() < Integer.parseInt(args[3])) {
50 | Command.sendMessage("Min: " + setting.getMin() + ", Max: " + setting.getMax());
51 | break;
52 | }
53 | setting.setValue(Integer.parseInt(args[3]));
54 | Command.sendMessage("Set " + setting.getName() + " to " + args[3]);
55 | break;
56 | case STRING:
57 | System.out.println("STRING " + args[3]);
58 | // If it is string type, then we will check if it is a valid option
59 | // If the options list is empty, we also allow the setting of the value
60 | if (setting.getOptions().contains(args[3]) || setting.getOptions().isEmpty()) {
61 | setting.setValue(args[3]);
62 | Command.sendMessage("Set " + setting.getName() + " to " + args[3]);
63 | } else {
64 | sendMessage(args[3] + " not found in options!");
65 | return;
66 | }
67 | break;
68 | default:
69 | System.out.println("WARNING: Unknown or unsupported type found! Type: " + setting.getType());
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/command/commands/ToggleCommand.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.command.commands;
2 |
3 | import com.evaan.frostburn.command.Command;
4 | import com.evaan.frostburn.module.Module;
5 | import com.evaan.frostburn.module.ModuleManager;
6 |
7 | /**
8 | * @Author evaan
9 | * https://github.com/evaan
10 | */
11 | public class ToggleCommand extends Command {
12 | public ToggleCommand() {
13 | super(new String[]{"toggle", "t"});
14 | }
15 |
16 | @Override
17 | public void onCommand(String[] args) {
18 | if (args.length == 1) {
19 | sendMessage("Usage: toggle ");
20 | return;
21 | }
22 |
23 | Module module = ModuleManager.getModule(args[1]);
24 | if(module != null) {
25 | module.toggle();
26 | } else sendMessage("Module not found!");
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/event/FrostBurnEvent.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.event;
2 |
3 | import me.zero.alpine.type.Cancellable;
4 |
5 | /**
6 | * @Author evaan
7 | * https://github.com/evaan
8 | */
9 | public class FrostBurnEvent extends Cancellable {
10 | public FrostBurnEvent() {}
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/event/events/PacketEvent.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.event.events;
2 |
3 | import com.evaan.frostburn.event.FrostBurnEvent;
4 | import net.minecraft.network.Packet;
5 |
6 | /**
7 | * @Author evaan
8 | * https://github.com/evaan
9 | */
10 | public class PacketEvent extends FrostBurnEvent {
11 | private final Packet packet;
12 |
13 | public PacketEvent(Packet packet) {this.packet = packet;}
14 | public Packet getPacket() {return packet;}
15 | public static class Receive extends PacketEvent { public Receive(Packet packet) {super(packet);}}
16 | public static class Send extends PacketEvent { public Send(Packet packet) {super(packet);}}
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/mixins/MixinClientConnection.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.mixins;
2 |
3 | import com.evaan.frostburn.FrostBurn;
4 | import com.evaan.frostburn.command.Command;
5 | import com.evaan.frostburn.command.CommandManager;
6 | import com.evaan.frostburn.event.events.PacketEvent;
7 | import io.netty.channel.ChannelHandlerContext;
8 | import io.netty.util.concurrent.GenericFutureListener;
9 | import net.minecraft.network.ClientConnection;
10 | import net.minecraft.network.Packet;
11 | import net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket;
12 | import org.spongepowered.asm.mixin.Mixin;
13 | import org.spongepowered.asm.mixin.injection.At;
14 | import org.spongepowered.asm.mixin.injection.Inject;
15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
16 |
17 | import java.util.concurrent.Future;
18 |
19 | /**
20 | * @Author evaan
21 | * https://github.com/evaan
22 | */
23 |
24 | @Mixin(ClientConnection.class)
25 | public class MixinClientConnection {
26 | boolean found = false;
27 |
28 | @Inject(method = "channelRead0", at = @At("HEAD"), cancellable = true)
29 | public void IchannelRead0(ChannelHandlerContext context, Packet> packet, CallbackInfo callback) {
30 | PacketEvent.Receive event = new PacketEvent.Receive(packet);
31 | FrostBurn.EVENT_BUS.post(event);
32 | if (event.isCancelled()) callback.cancel();
33 | }
34 |
35 | @Inject(method = "send(Lnet/minecraft/network/Packet;Lio/netty/util/concurrent/GenericFutureListener;)V", at = @At("HEAD"), cancellable = true)
36 | public void send(Packet> packet, GenericFutureListener extends Future super Void>> genericFutureListener_1, CallbackInfo callback) {
37 | if (packet instanceof ChatMessageC2SPacket && ((ChatMessageC2SPacket) packet).getChatMessage().startsWith(Command.prefix)) {
38 | String[] args = ((ChatMessageC2SPacket) packet).getChatMessage().substring(1).split(" ");
39 | CommandManager.commands.forEach(command -> {
40 | for (String name : command.name) {
41 | if (args[0].equalsIgnoreCase(name)) command.onCommand(args);
42 | found = true;
43 | }
44 | }
45 | );
46 | if (!found) {
47 | Command.sendMessage("Command not found! Do " + Command.prefix + "help for a list of commands.");
48 | }
49 | callback.cancel();
50 | }
51 | PacketEvent.Send event = new PacketEvent.Send(packet);
52 | FrostBurn.EVENT_BUS.post(event);
53 | if (event.isCancelled()) callback.cancel();
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/mixins/MixinClientPlayerEntity.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.mixins;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.module.ModuleManager;
5 | import net.minecraft.client.network.ClientPlayerEntity;
6 | import org.spongepowered.asm.mixin.Mixin;
7 | import org.spongepowered.asm.mixin.injection.At;
8 | import org.spongepowered.asm.mixin.injection.Inject;
9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
10 |
11 | /**
12 | * @Author evaan
13 | * https://github.com/evaan
14 | */
15 | @Mixin(ClientPlayerEntity.class)
16 | public class MixinClientPlayerEntity {
17 | @Inject(at = @At("RETURN"), method = "tick()V", cancellable = true)
18 | public void tick(CallbackInfo info) {
19 | ModuleManager.modules.stream().filter(Module::isEnabled).forEach(Module::onUpdate);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/mixins/MixinFluidBlock.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.mixins;
2 |
3 | import com.evaan.frostburn.FrostBurn;
4 | import com.evaan.frostburn.module.ModuleManager;
5 | import net.minecraft.block.*;
6 | import net.minecraft.client.network.ClientPlayerEntity;
7 | import net.minecraft.util.math.BlockPos;
8 | import net.minecraft.util.shape.VoxelShape;
9 | import net.minecraft.util.shape.VoxelShapes;
10 | import net.minecraft.world.BlockView;
11 | import org.spongepowered.asm.mixin.Mixin;
12 |
13 | @Mixin(FluidBlock.class)
14 | public abstract class MixinFluidBlock extends Block implements FluidDrainable {
15 |
16 | public MixinFluidBlock(Settings settings) {
17 | super(settings);
18 | }
19 |
20 | @Override
21 | public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
22 | boolean sneaking = false;
23 | boolean underwater = false;
24 | boolean riding = false;
25 | try {
26 | ClientPlayerEntity player = FrostBurn.mc.player;
27 | sneaking = player.isSneaking();
28 | underwater = player.isSubmergedInWater();
29 | riding = player.isRiding();
30 | } catch (Exception e) {
31 | return super.getCollisionShape(state, world, pos, context);
32 | }
33 |
34 | if(ModuleManager.getModule("Jesus").isEnabled() && !sneaking && !underwater && !riding) {
35 | return VoxelShapes.fullCube();
36 | }
37 |
38 | return super.getCollisionShape(state, world, pos, context);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/mixins/MixinGameRenderer.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.mixins;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.module.ModuleManager;
5 | import net.minecraft.client.render.Camera;
6 | import net.minecraft.client.render.GameRenderer;
7 | import net.minecraft.client.util.math.MatrixStack;
8 | import org.spongepowered.asm.mixin.Mixin;
9 | import org.spongepowered.asm.mixin.injection.At;
10 | import org.spongepowered.asm.mixin.injection.Inject;
11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
12 |
13 | /**
14 | * @Author evaan
15 | * https://github.com/evaan
16 | */
17 | @Mixin(GameRenderer.class)
18 | public class MixinGameRenderer {
19 | @Inject(at = @At("HEAD"), method = "renderHand", cancellable = true)
20 | private void renderHand(MatrixStack matrixStack_1, Camera camera, float tickDelta, CallbackInfo info) {
21 | ModuleManager.modules.stream().filter(Module::isEnabled).forEach(module -> {module.onRender(matrixStack_1);});
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/mixins/MixinInGameHud.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.mixins;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.module.ModuleManager;
5 | import net.minecraft.client.gui.hud.InGameHud;
6 | import net.minecraft.client.util.math.MatrixStack;
7 | import org.spongepowered.asm.mixin.Mixin;
8 | import org.spongepowered.asm.mixin.injection.At;
9 | import org.spongepowered.asm.mixin.injection.Inject;
10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
11 |
12 | @Mixin(InGameHud.class)
13 | public class MixinInGameHud {
14 | @Inject(at = @At(value = "RETURN"), method = "render", cancellable = true)
15 | public void render(MatrixStack matrixStack, float float_1, CallbackInfo info) {
16 | ModuleManager.modules.stream().filter(Module::isEnabled).forEach(module -> {module.onRender1(matrixStack);});
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/mixins/MixinKeyboard.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.mixins;
2 |
3 | import com.evaan.frostburn.module.ModuleManager;
4 | import net.minecraft.client.Keyboard;
5 | import org.spongepowered.asm.mixin.Mixin;
6 | import org.spongepowered.asm.mixin.injection.At;
7 | import org.spongepowered.asm.mixin.injection.Inject;
8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
9 |
10 | /**
11 | * @Author evaan
12 | * https://github.com/evaan
13 | */
14 | @Mixin(Keyboard.class)
15 | public class MixinKeyboard {
16 | @Inject(method = "onKey", at = @At(value = "INVOKE", target = "net/minecraft/client/util/InputUtil.isKeyPressed(JI)Z", ordinal = 5), cancellable = true)
17 | private void onKeyEvent(long windowPointer, int key, int scanCode, int action, int modifiers, CallbackInfo callbackInfo) {
18 | ModuleManager.modules.forEach(module -> { if (module.getBind() == key) module.toggle(); });
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/mixins/MixinMinecraftClient.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.mixins;
2 |
3 | import com.evaan.frostburn.FrostBurn;
4 | import net.minecraft.client.MinecraftClient;
5 | import net.minecraft.client.util.Window;
6 | import org.spongepowered.asm.mixin.Mixin;
7 | import org.spongepowered.asm.mixin.injection.At;
8 | import org.spongepowered.asm.mixin.injection.Inject;
9 | import org.spongepowered.asm.mixin.injection.Redirect;
10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
11 |
12 | import java.io.IOException;
13 | import java.io.InputStream;
14 |
15 | /**
16 | * @Author evaan
17 | * https://github.com/evaan
18 | */
19 | @Mixin(MinecraftClient.class)
20 | public class MixinMinecraftClient {
21 |
22 | @Inject(method = "getWindowTitle", at = @At("HEAD"), cancellable = true)
23 | public void getWindowTitle(CallbackInfoReturnable ci){
24 | ci.setReturnValue(FrostBurn.clientVersionString);
25 | }
26 |
27 | @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/Window;setIcon(Ljava/io/InputStream;Ljava/io/InputStream;)V"))
28 | public void setAlternativeWindowIcon(Window window, InputStream inputStream1, InputStream inputStream2) throws IOException {
29 | window.setIcon(
30 | FrostBurn.class.getResourceAsStream("/assets/frostburn/16.png"),
31 | FrostBurn.class.getResourceAsStream("/assets/frostburn/32.png")
32 | );
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/mixins/MixinPlayerEntity.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.mixins;
2 |
3 | import com.evaan.frostburn.FrostBurn;
4 | import com.evaan.frostburn.module.ModuleManager;
5 | import net.minecraft.client.network.ClientPlayerEntity;
6 | import net.minecraft.entity.player.PlayerEntity;
7 | import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
8 | import org.spongepowered.asm.mixin.Mixin;
9 | import org.spongepowered.asm.mixin.injection.At;
10 | import org.spongepowered.asm.mixin.injection.Inject;
11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
13 |
14 | @Mixin(PlayerEntity.class)
15 | public class MixinPlayerEntity {
16 |
17 | @Inject(method = "clipAtLedge()Z", at = @At("HEAD"), cancellable = true)
18 | private void clipAtLedge(CallbackInfoReturnable cir) {
19 | if(ModuleManager.getModule("SafeWalk").isEnabled()) cir.setReturnValue(true);
20 | }
21 |
22 |
23 | @Inject(method = "tickMovement()V", at = @At("TAIL"), cancellable = true)
24 | private void tickMovement(CallbackInfo cir) {
25 | ClientPlayerEntity player = FrostBurn.mc.player;
26 | if (player == null) return;
27 |
28 | // Negate fall damage
29 | if(ModuleManager.getModule("NoFall").isEnabled()) {
30 | PlayerMoveC2SPacket packet = new PlayerMoveC2SPacket.OnGroundOnly(true);
31 | player.networkHandler.sendPacket(packet);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/mixins/MixinWorldRenderer.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.mixins;
2 |
3 | import com.evaan.frostburn.module.ModuleManager;
4 | import net.minecraft.client.render.LightmapTextureManager;
5 | import net.minecraft.client.render.WorldRenderer;
6 | import net.minecraft.particle.ParticleEffect;
7 | import org.spongepowered.asm.mixin.Mixin;
8 | import org.spongepowered.asm.mixin.injection.At;
9 | import org.spongepowered.asm.mixin.injection.Inject;
10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
11 |
12 | @Mixin(WorldRenderer.class)
13 | public class MixinWorldRenderer {
14 |
15 | @Inject(method = "renderWeather", at = @At("HEAD"), cancellable = true)
16 | public void renderWeather(LightmapTextureManager manager, float f, double d, double e, double g, CallbackInfo cir) {
17 | if(ModuleManager.getModule("NoWeather").isEnabled()) cir.cancel();
18 | }
19 |
20 | @Inject(method = "addParticle", at = @At("HEAD"), cancellable = true)
21 | public void addParticle(ParticleEffect parameters, boolean shouldAlwaysSpawn, double x, double y, double z, double velocityX, double velocityY, double velocityZ, CallbackInfo cir) {
22 | if(ModuleManager.getModule("NoParticle").isEnabled()) cir.cancel();
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/Module.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module;
2 |
3 | import com.evaan.frostburn.FrostBurn;
4 | import com.evaan.frostburn.command.Command;
5 | import com.evaan.frostburn.util.Setting;
6 | import com.evaan.frostburn.util.SettingsManager;
7 | import net.minecraft.client.MinecraftClient;
8 | import net.minecraft.client.util.math.MatrixStack;
9 | import net.minecraft.util.Formatting;
10 |
11 | import java.util.ArrayList;
12 |
13 | /**
14 | * @Author evaan
15 | * https://github.com/evaan
16 | */
17 | public class Module {
18 | protected final MinecraftClient mc = MinecraftClient.getInstance();
19 | public ArrayList settings;
20 |
21 | String name;
22 | Category category;
23 | boolean enabled, drawn;
24 | int bind;
25 |
26 | public Module(String name, Category category) {
27 | this.settings = new ArrayList<>();
28 | this.name = name;
29 | this.category = category;
30 | this.enabled = false;
31 | this.drawn = true;
32 | this.bind = 0;
33 | }
34 |
35 | public String getName() {
36 | return name;
37 | }
38 |
39 | public Category getCategory() {
40 | return category;
41 | }
42 |
43 | public boolean isEnabled() {
44 | return enabled;
45 | }
46 |
47 | public boolean isDrawn() {
48 | return drawn;
49 | }
50 |
51 | public int getBind() {
52 | return bind;
53 | }
54 |
55 | public void setEnabled(boolean enabled) {
56 | if (enabled) enable();
57 | else disable();
58 | }
59 |
60 | public void setDrawn(boolean drawn) {
61 | this.drawn = drawn;
62 | }
63 |
64 | public void setBind(int bind) {
65 | this.bind = bind;
66 | }
67 |
68 | public void onEnable() {}
69 |
70 | public void onDisable() {}
71 |
72 | public void onUpdate() {}
73 |
74 | public void onRender(MatrixStack matrices) {}
75 |
76 | public void onRender1(MatrixStack matrices) {}
77 |
78 | public void toggle() {
79 | if (enabled) disable();
80 | else enable();
81 | }
82 |
83 | public String getHudInfo() {return "";}
84 |
85 | public void enable() {
86 | enabled = true;
87 | if(FrostBurn.mc != null) Command.sendMessage(name + Formatting.GREEN + " enabled!");
88 | FrostBurn.EVENT_BUS.subscribe(this);
89 | onEnable();
90 | }
91 |
92 | public void disable() {
93 | enabled = false;
94 | if(FrostBurn.mc != null) Command.sendMessage(name + Formatting.RED + " disabled!");
95 | FrostBurn.EVENT_BUS.unsubscribe(this);
96 | onDisable();
97 | }
98 |
99 | public Setting register(Setting setting) {
100 | SettingsManager.register(setting);
101 | this.settings.add(setting);
102 | return setting;
103 | }
104 |
105 | public enum Category {
106 | COMBAT("Combat"),
107 | MISC("Misc"),
108 | RENDER("Render"),
109 | MOVEMENT("Movement");
110 |
111 | String name;
112 |
113 | Category(String name) {
114 | this.name = name;
115 | }
116 |
117 | public String getName() {
118 | return this.name;
119 | }
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/ModuleManager.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module;
2 |
3 | import com.evaan.frostburn.module.modules.combat.*;
4 | import com.evaan.frostburn.module.modules.misc.*;
5 | import com.evaan.frostburn.module.modules.movement.*;
6 | import com.evaan.frostburn.module.modules.render.*;
7 |
8 | import java.util.ArrayList;
9 | import java.util.Comparator;
10 |
11 | /**
12 | * @Author evaan
13 | * https://github.com/evaan
14 | */
15 | public class ModuleManager {
16 | public static ArrayList modules;
17 |
18 | public static void init() {
19 | modules = new ArrayList<>();
20 |
21 | modules.add(new ClickGuiMod());
22 | modules.add(new AirPlace());
23 | modules.add(new Surround());
24 | modules.add(new KillAura());
25 | modules.add(new AutoAnchor());
26 | modules.add(new BedAura());
27 | modules.add(new AutoTotem());
28 | modules.add(new Velocity());
29 | modules.add(new Sprint());
30 | modules.add(new FakePlayer());
31 | modules.add(new Criticals());
32 | modules.add(new DiscordRPC());
33 | modules.add(new AutoStaircase());
34 | modules.add(new Fullbright());
35 | modules.add(new Scaffold());
36 | modules.add(new Zoom());
37 | modules.add(new Jesus());
38 | modules.add(new CrystalAura());
39 | modules.add(new NoWeather());
40 | modules.add(new NoParticle());
41 | modules.add(new SafeWalk());
42 | modules.add(new NoFall());
43 | modules.add(new YawLock());
44 | modules.add(new Offhand());
45 | modules.add(new Nuker());
46 | modules.add(new HUD());
47 | modules.add(new CleanChat());
48 | modules.add(new MiddleClick());
49 | modules.add(new ImGuiMod());
50 | modules.add(new Fly());
51 |
52 | modules.sort(Comparator.comparing(object -> object.name)); //sort the modules alphabetically
53 | }
54 |
55 | public static Module getModule(String name) {
56 | Module m = null;
57 | for (Module module : modules) {
58 | if (name.equalsIgnoreCase(module.name)) m = module;
59 | }
60 | return m;
61 | }
62 |
63 | public static ArrayList getModulesInCategory(Module.Category category) {
64 | ArrayList cat = new ArrayList<>();
65 | for (Module module : modules) {
66 | if (module.category.equals(category)) cat.add(module);
67 | }
68 | return cat;
69 | }
70 |
71 | public static ArrayList getModuleNames() {
72 | ArrayList names = new ArrayList<>();
73 | for (Module module : modules) {
74 | names.add(module.getName());
75 | }
76 | return names;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/combat/AutoAnchor.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.combat;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.util.Setting;
5 | import com.google.common.collect.Streams;
6 | import net.minecraft.block.Blocks;
7 | import net.minecraft.entity.player.PlayerEntity;
8 | import net.minecraft.item.Items;
9 | import net.minecraft.util.Hand;
10 | import net.minecraft.util.hit.BlockHitResult;
11 | import net.minecraft.util.math.BlockPos;
12 | import net.minecraft.util.math.Direction;
13 | import net.minecraft.util.math.Vec3d;
14 |
15 | import java.util.stream.Collectors;
16 |
17 | /**
18 | * @Author evaan
19 | * https://github.com/evaan
20 | */
21 |
22 | //todo unchinese
23 | public class AutoAnchor extends Module {
24 | public AutoAnchor() {super("AutoAnchor", Category.COMBAT);}
25 | Setting range = register(new Setting("Range", this, 4.0f, 0.1f, 5.0f));
26 | Setting delay = register(new Setting("Delay", this, 2, 0, 40));
27 |
28 | int anchorSlot = -1;
29 | int glowStoneSlot = -1;
30 | int oldSlot = -1;
31 |
32 | int ticks = 0;
33 |
34 | @Override
35 | public void onUpdate() {
36 | if (mc.world == null || mc.player == null) {disable(); return;}
37 | for (int i = 0; i < 9; i++) {if (mc.player.getInventory().getStack(i).getItem().equals(Items.RESPAWN_ANCHOR)) {anchorSlot = i;} else if (mc.player.getInventory().getStack(i).getItem().equals(Items.GLOWSTONE)) {glowStoneSlot = i;}}
38 | if (anchorSlot == -1 || glowStoneSlot == -1) {disable(); return;}
39 | if (ticks != delay.getValue()) {ticks++; return;}
40 | else ticks = 0;
41 | try {
42 | PlayerEntity player = (PlayerEntity) Streams.stream(mc.world.getEntities()).filter(e -> e instanceof PlayerEntity && mc.player.distanceTo(e) <= range.getValue() && e != mc.player).collect(Collectors.toList()).get(0);
43 | for (Direction direction : Direction.values()) {
44 | BlockPos blockPos = null;
45 | if (player.getBlockPos().getSquaredDistance(mc.player.getX(), mc.player.getY(), mc.player.getZ(), true) < 6.0f && !(mc.world.getBlockState(player.getBlockPos()).getBlock() != Blocks.RESPAWN_ANCHOR && mc.world.getBlockState(player.getBlockPos()).getBlock() != Blocks.AIR && mc.world.getBlockState(player.getBlockPos()).getMaterial().isReplaceable())) blockPos = player.getBlockPos();
46 | else if (player.getBlockPos().offset(direction).getSquaredDistance(mc.player.getX(), mc.player.getY(), mc.player.getZ(), true) < 6.0f && (mc.world.getBlockState(player.getBlockPos().offset(direction)).getBlock() == Blocks.RESPAWN_ANCHOR || mc.world.getBlockState(player.getBlockPos().offset(direction)).getMaterial().isReplaceable())) blockPos = player.getBlockPos().offset(direction);
47 | if (blockPos == null) continue;
48 | mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(blockPos), Direction.DOWN, blockPos, false));
49 | if (mc.world.getBlockState(blockPos).getBlock().equals(Blocks.RESPAWN_ANCHOR)) {
50 | mc.player.getInventory().selectedSlot = glowStoneSlot;
51 | mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(blockPos), Direction.DOWN, blockPos, true));
52 | mc.interactionManager.interactBlock(mc.player, mc.world, Hand.OFF_HAND, new BlockHitResult(Vec3d.of(blockPos), Direction.DOWN, blockPos, true));
53 | }
54 | mc.player.getInventory().selectedSlot = oldSlot;
55 | break;
56 | }
57 | } catch (Exception ignored) {}
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/combat/AutoTotem.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.combat;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import net.minecraft.item.Items;
5 | import net.minecraft.screen.slot.SlotActionType;
6 |
7 | /**
8 | * @Author evaan, majorsopa
9 | * https://github.com/evaan
10 | * https://github.com/majorsopa
11 | */
12 | public class AutoTotem extends Module {
13 | public AutoTotem() {super("AutoTotem", Category.COMBAT);}
14 |
15 | @Override
16 | public void onUpdate() {
17 | if (mc.player == null) return;
18 | int i;
19 | Boolean found = false;
20 | if (!mc.player.getOffHandStack().getItem().equals(Items.TOTEM_OF_UNDYING)) {
21 | for (i = 9; i <= 36; i++) {
22 | if (mc.player.getInventory().getStack(i).getItem().equals(Items.TOTEM_OF_UNDYING)) {
23 | found = true;
24 | break;
25 | }
26 | }
27 | if (!(mc.player.getOffHandStack().getItem().equals(Items.TOTEM_OF_UNDYING)) && found) {
28 | mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, i, 0, SlotActionType.PICKUP, mc.player);
29 | mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, 45, 0, SlotActionType.PICKUP, mc.player);
30 | }
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/combat/BedAura.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.combat;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.util.Setting;
5 | import com.google.common.collect.Streams;
6 | import net.minecraft.block.BedBlock;
7 | import net.minecraft.entity.Entity;
8 | import net.minecraft.entity.player.PlayerEntity;
9 | import net.minecraft.item.BedItem;
10 | import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
11 | import net.minecraft.util.Hand;
12 | import net.minecraft.util.Pair;
13 | import net.minecraft.util.hit.BlockHitResult;
14 | import net.minecraft.util.math.BlockPos;
15 | import net.minecraft.util.math.Direction;
16 | import net.minecraft.util.math.Vec3d;
17 |
18 | import java.util.ArrayList;
19 | import java.util.Comparator;
20 | import java.util.List;
21 | import java.util.stream.Collectors;
22 |
23 | /**
24 | * @Author evaan
25 | * https://github.com/evaan
26 | */
27 | public class BedAura extends Module {
28 | //todo rewrite
29 | public BedAura() {super("BedAura", Category.COMBAT);}
30 | Setting range = register(new Setting("Range", this, 4.0f, 0.1f, 5.0f));
31 | Setting delay = register(new Setting("Delay", this, 10, 0, 40));
32 |
33 | int bedSlot = -1;
34 | int oldSlot = -1;
35 |
36 | int ticks = 0;
37 |
38 | @Override
39 | public void onUpdate() {
40 | if (mc.world == null || mc.player == null) {disable(); return;}
41 | for (int i = 0; i < 9; i++) {if (mc.player.getInventory().getStack(i).getItem() instanceof BedItem) {bedSlot = i;}}
42 | if (bedSlot == -1) {disable(); return;}
43 | if (ticks != delay.getValue()) {ticks++; return;}
44 | else ticks = 0;
45 | if (mc.player == null || mc.world == null) {disable(); return;}
46 | List players = Streams.stream(mc.world.getEntities()).filter(e -> e instanceof PlayerEntity && mc.player.distanceTo(e) <= range.getValue() && e != mc.player).collect(Collectors.toList());
47 | if (players.isEmpty()) {return;}
48 | PlayerEntity player = (PlayerEntity)players.get(0);
49 | ArrayList> positions = new ArrayList<>();
50 | positions.add(new Pair<>(player.getBlockPos().north().up(), Direction.SOUTH));
51 | positions.add(new Pair<>(player.getBlockPos().east().up(), Direction.WEST));
52 | positions.add(new Pair<>(player.getBlockPos().south().up(), Direction.NORTH));
53 | positions.add(new Pair<>(player.getBlockPos().west().up(), Direction.EAST));
54 | positions.sort(Comparator.comparing(object -> object.getLeft().getSquaredDistance(mc.player.getX(), mc.player.getY(), mc.player.getZ(), true)));
55 | for (Pair pair : positions) {
56 | BlockPos blockPos = pair.getLeft();
57 | Direction direction = pair.getRight();
58 | oldSlot = mc.player.getInventory().selectedSlot;
59 | mc.player.getInventory().selectedSlot = bedSlot;
60 | if (!(mc.world.getBlockState(blockPos)).getMaterial().isReplaceable()) continue;
61 | if (mc.world.getBlockState(blockPos.offset(direction)).getBlock() instanceof BedBlock) mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(blockPos.offset(direction)), Direction.DOWN, blockPos.offset(direction), true));
62 | if (!(mc.world.getBlockState(blockPos).getBlock() instanceof BedBlock)) {
63 | if (direction == Direction.NORTH) mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(-180f, mc.player.getPitch(), true));
64 | if (direction == Direction.EAST) mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(-90f, mc.player.getPitch(), true));
65 | if (direction == Direction.SOUTH) mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(0f, mc.player.getPitch(), true));
66 | if (direction == Direction.WEST) mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(90f, mc.player.getPitch(), true));
67 | mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(blockPos), Direction.DOWN, blockPos, false));
68 | }
69 | //todo maybe do it on another tick
70 | if (mc.world.getBlockState(blockPos).getBlock() instanceof BedBlock) mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(blockPos), Direction.DOWN, blockPos, true));
71 | mc.player.getInventory().selectedSlot = oldSlot;
72 | break;
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/combat/Criticals.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.combat;
2 |
3 | import com.evaan.frostburn.event.events.PacketEvent;
4 | import com.evaan.frostburn.module.Module;
5 | import com.evaan.frostburn.util.packet.PlayerInteractEntityC2SUtils;
6 | import me.zero.alpine.listener.EventHandler;
7 | import me.zero.alpine.listener.Listener;
8 | import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
9 | import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
10 |
11 | /**
12 | * @Author evaan
13 | * https://github.com/evaan
14 | */
15 | public class Criticals extends Module {
16 | public Criticals() {super("Criticals", Category.COMBAT);}
17 |
18 | @EventHandler
19 | private final Listener packetListener = new Listener<>(event -> {
20 | if (event.getPacket() instanceof PlayerInteractEntityC2SPacket) {
21 | if(PlayerInteractEntityC2SUtils.getInteractType((PlayerInteractEntityC2SPacket) event.getPacket()) == PlayerInteractEntityC2SUtils.InteractType.ATTACK && mc.player.isOnGround()) {
22 | mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY() + 0.1f, mc.player.getZ(), true));
23 | mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), false));
24 | }
25 | }
26 | });
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/combat/CrystalAura.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.combat;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.google.common.collect.Streams;
5 | import net.minecraft.entity.decoration.EndCrystalEntity;
6 |
7 | import java.util.stream.Collectors;
8 |
9 | //todo skid some ca because im too lazy to
10 | public class CrystalAura extends Module {
11 |
12 | public CrystalAura() { super("CrystalAura", Category.COMBAT); }
13 |
14 | @Override
15 | public void onUpdate() {
16 | if (mc.player == null || mc.world == null) return;
17 |
18 | try {
19 | EndCrystalEntity entity = (EndCrystalEntity) Streams.stream(mc.world.getEntities()).filter(e -> e instanceof EndCrystalEntity && mc.player.distanceTo(e) <= 4.0).collect(Collectors.toList()).get(0);
20 | if (entity != null) {
21 | if(!entity.isAttackable()) return;
22 | mc.interactionManager.attackEntity(mc.player, entity);
23 | }
24 |
25 | } catch (Exception ignored) {}
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/combat/KillAura.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.combat;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.util.Setting;
5 | import com.google.common.collect.Streams;
6 | import net.minecraft.entity.Entity;
7 | import net.minecraft.entity.decoration.EndCrystalEntity;
8 | import net.minecraft.entity.player.PlayerEntity;
9 | import net.minecraft.item.SwordItem;
10 | import net.minecraft.util.Hand;
11 |
12 | import java.util.List;
13 | import java.util.stream.Collectors;
14 |
15 | /**
16 | * @Author evaan
17 | * https://github.com/evaan
18 | */
19 | public class KillAura extends Module {
20 | public KillAura() {super("KillAura", Category.COMBAT);}
21 |
22 | Setting range = register(new Setting("Range", this, 4.0f, 0.1f, 6.0f));
23 | Setting switchItem = register(new Setting("Switch", this, true));
24 | Setting allEntities = register(new Setting("AllEntities", this, true));
25 | Setting multiAura = register(new Setting("Multi", this, true));
26 | Setting spam = register(new Setting("Spam", this, false));
27 |
28 | //todo rotate
29 |
30 | @Override
31 | public void onUpdate() {
32 | if (mc.player == null || mc.world == null) return;
33 | if(mc.player.getAttackCooldownProgress(0) < 1 && spam.getValue()) return;
34 |
35 | try {
36 | List filtered;
37 | if(!allEntities.getValue()) {
38 | filtered = Streams.stream(mc.world.getEntities()).filter(e -> e instanceof PlayerEntity && mc.player.distanceTo(e) <= range.getValue() && e != mc.player).collect(Collectors.toList());
39 | } else {
40 | filtered = Streams.stream(mc.world.getEntities()).filter(e -> e instanceof Entity && mc.player.distanceTo(e) <= range.getValue() && e != mc.player).collect(Collectors.toList());
41 | }
42 |
43 | for(Entity entity : filtered) {
44 | if(entity != null) {
45 | // Don't attack dead/non living entities, ones we can't attack, and end crystals
46 | if(entity.isLiving() && entity.isAttackable() && !(entity.getClass() == EndCrystalEntity.class)) {
47 | if (switchItem.getValue()) {
48 | for (int i = 0; i < 9; i++) {
49 | if (mc.player.getInventory().getStack(i).getItem() instanceof SwordItem)
50 | mc.player.getInventory().selectedSlot = i;
51 | }
52 | }
53 |
54 | mc.interactionManager.attackEntity(mc.player, entity);
55 | mc.player.swingHand(Hand.MAIN_HAND);
56 |
57 | if(!multiAura.getValue()) break;
58 | }
59 | }
60 | }
61 |
62 | } catch (Exception ignored) {}
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/combat/Surround.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.combat;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import net.minecraft.item.Items;
5 | import net.minecraft.util.Hand;
6 | import net.minecraft.util.hit.BlockHitResult;
7 | import net.minecraft.util.math.BlockPos;
8 | import net.minecraft.util.math.Direction;
9 | import net.minecraft.util.math.Vec3d;
10 |
11 | import java.util.ArrayList;
12 |
13 | /**
14 | * @Author evaan
15 | * https://github.com/evaan
16 | */
17 | public class Surround extends Module {
18 | public Surround() {super("Surround", Category.COMBAT);}
19 |
20 | int obiSlot;
21 | int oldSlot;
22 |
23 | @Override
24 | public void onUpdate() {
25 | if (mc.player == null) return;
26 | oldSlot = mc.player.getInventory().selectedSlot;
27 | obiSlot = -1;
28 | if (!mc.player.isOnGround()) {disable(); return;}
29 | ArrayList positions = new ArrayList<>();
30 | positions.add(mc.player.getBlockPos().north());
31 | positions.add(mc.player.getBlockPos().east());
32 | positions.add(mc.player.getBlockPos().south());
33 | positions.add(mc.player.getBlockPos().west());
34 | for (int i = 0; i < 9; i++) {
35 | if (mc.player.getInventory().getStack(i).getItem().equals(Items.OBSIDIAN)) {
36 | obiSlot = i;
37 | break;
38 | }
39 | }
40 | if (obiSlot == -1) {disable(); return;}
41 | for (BlockPos pos : positions) {
42 | if (!mc.world.getBlockState(pos).getMaterial().isReplaceable()) continue;
43 | for (Direction direction : Direction.values()) {
44 | if (!mc.world.getBlockState(pos.offset(direction)).getMaterial().isReplaceable()) {
45 | mc.player.getInventory().selectedSlot = obiSlot;
46 | mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), direction, pos, false));
47 | mc.player.getInventory().selectedSlot = oldSlot;
48 | }
49 | }
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/misc/AirPlace.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.misc;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import net.minecraft.block.AirBlock;
5 | import net.minecraft.item.BlockItem;
6 | import net.minecraft.util.Hand;
7 | import net.minecraft.util.hit.BlockHitResult;
8 | import net.minecraft.util.math.BlockPos;
9 | import net.minecraft.util.math.Direction;
10 | import net.minecraft.util.math.Vec3d;
11 |
12 | /**
13 | * @Author Gopro336
14 | * https://github.com/Gopro336
15 | */
16 | //TODO: Add an esp for the targeted placePos
17 | public class AirPlace extends Module {
18 |
19 | private BlockPos placePos;
20 |
21 | public AirPlace() {super("AirPlace", Category.MISC);}
22 |
23 | @Override
24 | public void onUpdate() {
25 | if (mc.crosshairTarget instanceof BlockHitResult && mc.player.getMainHandStack().getItem() instanceof BlockItem) {
26 |
27 | try {
28 | placePos = ((BlockHitResult) mc.crosshairTarget).getBlockPos();
29 | } catch (Exception ignored) {} //apparently if you look at an entity the game crashes
30 |
31 | if (mc.world.getBlockState(placePos).getBlock() instanceof AirBlock) {
32 |
33 | if (mc.options.keyUse.wasPressed() || mc.options.keyUse.isPressed()) {
34 | mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(placePos), Direction.DOWN, placePos, false));
35 | mc.player.swingHand(Hand.MAIN_HAND);
36 | }
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/misc/AutoStaircase.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.misc;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.util.Setting;
5 | import net.minecraft.command.argument.EntityAnchorArgumentType;
6 | import net.minecraft.item.BlockItem;
7 | import net.minecraft.util.Hand;
8 | import net.minecraft.util.hit.BlockHitResult;
9 | import net.minecraft.util.math.BlockPos;
10 | import net.minecraft.util.math.Direction;
11 | import net.minecraft.util.math.Vec3d;
12 |
13 |
14 | /**
15 | * @Author majorsopa
16 | * https://github.com/majorsopa
17 | * @Author evaan
18 | * https://github.com/evaan
19 | */
20 | public class AutoStaircase extends Module {
21 | public AutoStaircase() {super("AutoStaircase", Category.MISC);}
22 |
23 | Setting airPlace = register(new Setting("AirPlace", this, true));
24 |
25 | @Override
26 | public void onUpdate() {
27 | if (mc.player == null || mc.world == null) {disable(); return;}
28 | if (!mc.player.isOnGround() || !(mc.player.getInventory().getMainHandStack().getItem() instanceof BlockItem)) return;
29 | BlockPos pos = mc.player.getBlockPos().offset(mc.player.getMovementDirection());
30 | switch (mc.player.getMovementDirection()) {
31 | case NORTH:
32 | mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, new Vec3d(mc.player.getX(), mc.player.getY(), mc.player.getZ() - 1));
33 | break;
34 | case EAST:
35 | mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, new Vec3d(mc.player.getX() + 1, mc.player.getY(), mc.player.getZ()));
36 | break;
37 | case SOUTH:
38 | mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, new Vec3d(mc.player.getX(), mc.player.getY(), mc.player.getZ() + 1));
39 | break;
40 | case WEST:
41 | mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, new Vec3d(mc.player.getX() - 1, mc.player.getY(), mc.player.getZ()));
42 | break;
43 | default:
44 | break;
45 | }
46 | if (mc.world.getBlockState(pos).getMaterial().isReplaceable()) {
47 | mc.options.keyForward.setPressed(false);
48 | if (!airPlace.getValue()) mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos.down()), Direction.DOWN, pos, false));
49 | mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false));
50 | mc.player.swingHand(Hand.MAIN_HAND);
51 | }
52 | if (!mc.world.getBlockState(pos).getMaterial().isReplaceable()) {
53 | mc.options.keyForward.setPressed(true);
54 | mc.player.jump();
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/misc/CleanChat.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.misc;
2 |
3 | import com.evaan.frostburn.event.events.PacketEvent;
4 | import com.evaan.frostburn.module.Module;
5 | import me.zero.alpine.listener.EventHandler;
6 | import me.zero.alpine.listener.Listener;
7 | import net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket;
8 |
9 | import java.util.ArrayList;
10 |
11 | public class CleanChat extends Module {
12 | public CleanChat() {
13 | super("CleanChat", Category.MISC);
14 |
15 | //put the cuss words here or something idk
16 | cussWords.add("fuck");
17 | cussWords.add("shit");
18 |
19 | }
20 |
21 | // no more saying cuss words. it is not good. i'm putting a video on youtube about no more saying cuss words. no more saying cuss words guys! it's inappropriate and violent! if you say a cuss word you're like, going to jail and like, when you go to jail, it- bu- when you go to jail if you say- if you say a cuss word you go to jail and when you go to jail you said a cuss word, then, you're only gonna eat broccoli and other vegetables for your whole life. you don't want to eat vegetables, sometimes people like eating sweets but... i eat broccoli. so... i'm okay with broccoli but i do NOT wanna go to jail. you can NOT go to jail. and saying cuss words is illegal. they are now gonna make a law about that. it is illegal, it is inappropriate, it is really violent. i better warn my school about that.
22 | ArrayList cussWords = new ArrayList<>();
23 |
24 | @EventHandler
25 | private Listener packetListener = new Listener<>(event -> {
26 | if (event.getPacket() instanceof ChatMessageC2SPacket) {
27 | for (String cussWord : cussWords) {
28 | if (((ChatMessageC2SPacket) event.getPacket()).getChatMessage().toLowerCase().contains(cussWord)) event.cancel();
29 | }
30 | }
31 | });
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/misc/DiscordRPC.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.misc;
2 |
3 | import com.evaan.frostburn.FrostBurn;
4 | import com.evaan.frostburn.module.Module;
5 | import net.arikia.dev.drpc.DiscordEventHandlers;
6 | import net.arikia.dev.drpc.DiscordRichPresence;
7 |
8 | /**
9 | * @Author evaan
10 | * https://github.com/evaan
11 | */
12 | public class DiscordRPC extends Module {
13 | public DiscordRPC() {super("DiscordRPC", Category.MISC);}
14 |
15 | @Override
16 | public void onEnable() {
17 | String clientVersion = FrostBurn.clientVersionString;
18 | net.arikia.dev.drpc.DiscordRPC.discordInitialize("820481496962826291", new DiscordEventHandlers.Builder().setReadyEventHandler(user -> {}).build(), true);
19 | net.arikia.dev.drpc.DiscordRPC.discordUpdatePresence(new DiscordRichPresence.Builder(getIP()).setBigImage("logo", clientVersion).build());
20 | }
21 |
22 | @Override
23 | public void onDisable() {
24 | net.arikia.dev.drpc.DiscordRPC.discordShutdown();
25 | }
26 |
27 | @Override
28 | public void onUpdate() {
29 | String clientVersion = FrostBurn.clientVersionString;
30 | net.arikia.dev.drpc.DiscordRPC.discordUpdatePresence(new DiscordRichPresence.Builder(getIP()).setBigImage("logo", clientVersion).build());
31 | }
32 |
33 | public String getIP() {
34 | if (mc.isInSingleplayer()) return "Singleplayer";
35 | try {
36 | return mc.getCurrentServerEntry().address;
37 | } catch (Exception e) {
38 | return "Main Menu";
39 | }
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/misc/FakePlayer.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.misc;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.mojang.authlib.GameProfile;
5 | import net.minecraft.client.network.OtherClientPlayerEntity;
6 | import net.minecraft.entity.Entity;
7 |
8 | import java.util.UUID;
9 |
10 | /**
11 | * @Author evaan
12 | * https://github.com/evaan
13 | */
14 | public class FakePlayer extends Module {
15 | public FakePlayer() {super("FakePlayer", Category.MISC);}
16 |
17 | @Override
18 | public void onEnable() {
19 | if (mc.world == null || mc.player == null) {disable(); return;}
20 | OtherClientPlayerEntity player = new OtherClientPlayerEntity(mc.world, new GameProfile(UUID.fromString("0f75a81d-70e5-43c5-b892-f33c524284f2"), "popbob"));
21 | player.copyPositionAndRotation(mc.player);
22 | player.setHeadYaw(mc.player.headYaw);
23 | mc.world.addEntity(-100, player);
24 | }
25 |
26 | @Override
27 | public void onDisable() {
28 | if (mc.world != null) mc.world.removeEntity(-100, Entity.RemovalReason.DISCARDED);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/misc/MiddleClick.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.misc;
2 |
3 | import com.evaan.frostburn.command.Command;
4 | import com.evaan.frostburn.module.Module;
5 | import com.evaan.frostburn.util.Friends;
6 | import com.evaan.frostburn.util.Setting;
7 | import net.minecraft.client.render.debug.DebugRenderer;
8 | import net.minecraft.entity.Entity;
9 | import net.minecraft.item.Items;
10 | import net.minecraft.util.Formatting;
11 | import net.minecraft.util.Hand;
12 | import net.minecraft.util.hit.HitResult;
13 | import org.lwjgl.glfw.GLFW;
14 |
15 | import java.util.ArrayList;
16 | import java.util.Optional;
17 |
18 | /**
19 | * @Author evaan on 4/22/2021
20 | * https://github.com/evaan
21 | */
22 | public class MiddleClick extends Module {
23 | public MiddleClick() {
24 | super("MiddleClick", Category.MISC);
25 | modes.add("Friend");
26 | modes.add("Pearl");
27 | }
28 |
29 | public ArrayList modes = new ArrayList<>();
30 | Setting mode = register(new Setting("Mode", this, modes, "Friend"));
31 |
32 | boolean pressed = false;
33 |
34 | @Override
35 | public void onUpdate() {
36 | if (mc.player == null || mc.player.world == null) return;
37 | if (GLFW.glfwGetMouseButton(mc.getWindow().getHandle(), GLFW.GLFW_MOUSE_BUTTON_MIDDLE) == 1 && !pressed) {
38 | pressed = true;
39 | if (mode.getValue().equalsIgnoreCase("friend")) {
40 | Optional lookingAt = DebugRenderer.getTargetedEntity(mc.player, 6); //6 is the vanilla reach right
41 | if (lookingAt.isPresent()) {
42 | if (Friends.getInstance().isFriend(lookingAt.get().getName().asString())) {
43 | Friends.getInstance().removeFriend(lookingAt.get().getName().asString());
44 | Command.sendMessage("Removed " + Formatting.RED + lookingAt.get().getName().asString() + Formatting.WHITE + " from your friends list");
45 | } else if (!Friends.getInstance().isFriend(lookingAt.get().getName().asString())) {
46 | Friends.getInstance().addFriend(lookingAt.get().getName().asString());
47 | Command.sendMessage("Added " + Formatting.GREEN + lookingAt.get().getName().asString() + Formatting.WHITE + " to your friends list");
48 | }
49 | }
50 | } else if (mode.getValue().equalsIgnoreCase("pearl")) {
51 | int oldSlot = mc.player.getInventory().selectedSlot;
52 | for (int i = 0; i < 9; i++) {
53 | if (mc.player.getInventory().getStack(i).getItem().equals(Items.ENDER_PEARL)) {
54 | mc.player.getInventory().selectedSlot = i;
55 | break;
56 | }
57 | }
58 | if (mc.crosshairTarget.getType() != HitResult.Type.BLOCK && mc.crosshairTarget.getType() != HitResult.Type.ENTITY) mc.interactionManager.interactItem(mc.player, mc.world, Hand.MAIN_HAND);
59 | mc.player.getInventory().selectedSlot = oldSlot;
60 | }
61 | } else if (GLFW.glfwGetMouseButton(mc.getWindow().getHandle(), GLFW.GLFW_MOUSE_BUTTON_MIDDLE) == 0)
62 | pressed = false;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/misc/Nuker.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.misc;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.util.Setting;
5 | import net.minecraft.block.Blocks;
6 | import net.minecraft.command.argument.EntityAnchorArgumentType;
7 | import net.minecraft.util.Hand;
8 | import net.minecraft.util.math.BlockPos;
9 | import net.minecraft.util.math.Direction;
10 | import net.minecraft.util.math.Vec3d;
11 |
12 | import java.util.ArrayList;
13 | import java.util.Iterator;
14 |
15 | public class Nuker extends Module {
16 | public Nuker() {super("Nuker", Category.MISC);}
17 |
18 | Setting faceBlock = register(
19 | new Setting(
20 | "FaceBlock",
21 | this,
22 | true
23 | )
24 | );
25 | Setting swing = register(
26 | new Setting(
27 | "Swing",
28 | this,
29 | true
30 | )
31 | );
32 | Setting range = register(
33 | new Setting(
34 | "Range",
35 | this,
36 | 3f,
37 | 0f,
38 | 4f
39 | )
40 | );
41 | Setting blocksToMine = register(
42 | new Setting(
43 | "BlocksToMine",
44 | this,
45 | 1f,
46 | 1f,
47 | 10f
48 | )
49 | );
50 |
51 |
52 | ArrayList blocks = new ArrayList<>();
53 |
54 | @Override
55 | public void onUpdate() {
56 | assert mc.player != null;
57 | assert mc.world != null;
58 |
59 | int varRange = range.getValue().intValue();
60 | int xPos = (int) mc.player.getX();
61 | int yPos = (int) mc.player.getY();
62 | int zPos = (int) mc.player.getZ();
63 |
64 | int positiveSideX = xPos + varRange;
65 | int positiveSideY = yPos + varRange;
66 | int positiveSideZ = zPos + varRange;
67 |
68 | int negativeSideX = xPos - varRange;
69 | int negativeSideZ = zPos - varRange;
70 |
71 | for (int y = yPos; y <= positiveSideY; y++) {
72 | for (int x = negativeSideX; x <= positiveSideX; x++) {
73 | for (int z = negativeSideZ; z <= positiveSideZ; z++) {
74 | BlockPos bp = new BlockPos(x, y, z);
75 | if (mc.world.getBlockState(bp).getBlock() != Blocks.AIR){
76 | blocks.add(bp);
77 | }
78 | }
79 | }
80 | }
81 |
82 |
83 | try {
84 | if (blocks.size() > 0) {
85 | if (faceBlock.getValue()) {
86 | mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, Vec3d.of(blocks.get(0)));
87 | }
88 |
89 | Iterator blocksIter = blocks.iterator();
90 | for (int j = 0; j < blocks.size(); j++) {
91 | if (j < blocksToMine.getValue() && blocksIter.hasNext()) {
92 | breakBlock(blocksIter.next());
93 | } else {
94 | break;
95 | }
96 | }
97 | }
98 | } catch (Exception ignored) {}
99 |
100 | blocks.clear();
101 | }
102 |
103 | private void breakBlock(BlockPos blockPos) {
104 | if (mc.interactionManager != null) {
105 | mc.interactionManager.updateBlockBreakingProgress(blockPos, Direction.UP);
106 |
107 | assert mc.player != null;
108 | if (swing.getValue()) {
109 | mc.player.swingHand(Hand.MAIN_HAND);
110 | }
111 | }
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/misc/Offhand.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.misc;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.util.Setting;
5 | import net.minecraft.item.Item;
6 | import net.minecraft.item.Items;
7 | import net.minecraft.screen.slot.SlotActionType;
8 |
9 | public class Offhand extends Module {
10 | public Offhand() {super("Offhand", Category.MISC);}
11 |
12 | Setting totemOnFall = register(
13 | new Setting(
14 | "TotemOnFall",
15 | this,
16 | false
17 | )
18 | );
19 | Setting fallDistance = register(
20 | new Setting(
21 | "FallDistance",
22 | this,
23 | 15f,
24 | 0f,
25 | 256f
26 | )
27 | );
28 | Setting totemSwapHealth = register(
29 | new Setting(
30 | "TotemSwapHealth",
31 | this,
32 | 12f,
33 | 0f,
34 | 36f
35 | )
36 | );
37 | Setting offhandCrystal = register(
38 | new Setting(
39 | "OffhandCrystal",
40 | this,
41 | false
42 | )
43 | );
44 |
45 | @Override
46 | public void onUpdate() {
47 | if (mc.player == null) return;
48 |
49 | if ((mc.player.getAbsorptionAmount() + mc.player.getHealth() <= totemSwapHealth.getValue()) ||
50 | (totemOnFall.getValue() && mc.player.fallDistance >= fallDistance.getValue())) {
51 | itemSwap(Items.TOTEM_OF_UNDYING);
52 | } else if (offhandCrystal.getValue()) {
53 | itemSwap(Items.END_CRYSTAL);
54 | }
55 | }
56 |
57 | private void itemSwap(Item item) {
58 | if (mc.player == null) return;
59 | int i;
60 | Boolean found = false;
61 | if (!(mc.player.getOffHandStack().getItem().equals(item))) {
62 | for (i = 9; i <= 36; i++) {
63 | if (mc.player.getInventory().getStack(i).getItem().equals(item)) {
64 | found = true;
65 | break;
66 | }
67 | }
68 | if (!(mc.player.getOffHandStack().getItem().equals(item)) && found) {
69 | mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, i, 0, SlotActionType.PICKUP, mc.player);
70 | mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, 45, 0, SlotActionType.PICKUP, mc.player);
71 | }
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/misc/Scaffold.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.misc;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import net.minecraft.item.BlockItem;
5 | import net.minecraft.util.Hand;
6 | import net.minecraft.util.hit.BlockHitResult;
7 | import net.minecraft.util.math.BlockPos;
8 | import net.minecraft.util.math.Direction;
9 | import net.minecraft.util.math.Vec3d;
10 |
11 | /**
12 | * @Author evaan
13 | * https://github.com/evaan
14 | */
15 | public class Scaffold extends Module {
16 | public Scaffold() {super("Scaffold", Category.MISC);}
17 |
18 | @Override
19 | public void onUpdate() {
20 | int original_slot = mc.player.getInventory().selectedSlot;
21 |
22 | for (int i = 0; i < 9; i++) {
23 | if (mc.player.getInventory().getStack(i).getItem() instanceof BlockItem)
24 | mc.player.getInventory().selectedSlot = i;
25 | }
26 | if (mc.player == null || mc.world == null) {disable(); return;}
27 | BlockPos pos = mc.player.getBlockPos().down();
28 | if (mc.world.getBlockState(pos).getMaterial().isReplaceable()) {
29 | mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), Direction.DOWN, pos, false));
30 | mc.player.swingHand(Hand.MAIN_HAND);
31 | }
32 |
33 | mc.player.getInventory().selectedSlot = original_slot;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/misc/Velocity.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.misc;
2 |
3 | import com.evaan.frostburn.event.events.PacketEvent;
4 | import com.evaan.frostburn.module.Module;
5 | import me.zero.alpine.listener.EventHandler;
6 | import me.zero.alpine.listener.Listener;
7 | import net.minecraft.network.packet.s2c.play.EntityVelocityUpdateS2CPacket;
8 | import net.minecraft.network.packet.s2c.play.ExplosionS2CPacket;
9 |
10 | /**
11 | * @Author evaan
12 | * https://github.com/evaan
13 | */
14 | public class Velocity extends Module {
15 | public Velocity() {super("Velocity", Category.MISC);}
16 |
17 | @EventHandler
18 | private final Listener packetListener = new Listener<>(event -> {
19 | if (event.getPacket() instanceof EntityVelocityUpdateS2CPacket && ((EntityVelocityUpdateS2CPacket) event.getPacket()).getId() == mc.player.getId()) event.cancel();
20 | else if (event.getPacket() instanceof ExplosionS2CPacket) event.cancel();
21 | });
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/misc/YawLock.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.misc;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import net.minecraft.client.util.math.MatrixStack;
5 |
6 | public class YawLock extends Module {
7 | public YawLock() {super("YawLock", Category.MISC);}
8 |
9 | @Override
10 | public void onEnable() {
11 | if (mc.player == null) {disable(); return;}
12 | }
13 |
14 | @Override
15 | public void onRender(MatrixStack matrices) {
16 | switch (mc.player.getHorizontalFacing()) {
17 | case SOUTH: mc.player.setYaw(0); break;
18 | case EAST: mc.player.setYaw(270); break;
19 | case NORTH: mc.player.setYaw(180); break;
20 | case WEST: mc.player.setYaw(90); break;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/movement/Fly.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.movement;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.util.Setting;
5 | import net.minecraft.entity.player.PlayerAbilities;
6 |
7 | public class Fly extends Module {
8 | public Fly() {super("Fly", Module.Category.MOVEMENT);}
9 |
10 | Setting speed = register(
11 | new Setting(
12 | "Speed",
13 | this,
14 | 100f,
15 | 1f,
16 | 500f
17 | )
18 | );
19 |
20 | @Override
21 | public void onUpdate() {
22 | assert mc.player != null;
23 |
24 | PlayerAbilities abilities = mc.player.getAbilities();
25 | abilities.flying = true;
26 |
27 | abilities.setFlySpeed(speed.getValue() / 5000);
28 |
29 | mc.player.sendAbilitiesUpdate();
30 | }
31 |
32 | @Override
33 | public void onDisable() {
34 | assert mc.player != null;
35 |
36 | PlayerAbilities abilities = mc.player.getAbilities();
37 | abilities.flying = false;
38 |
39 | mc.player.sendAbilitiesUpdate();
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/movement/Jesus.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.movement;
2 |
3 | import com.evaan.frostburn.module.Module;
4 |
5 | public class Jesus extends Module {
6 |
7 | public Jesus() {super("Jesus", Category.MOVEMENT);}
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/movement/NoFall.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.movement;
2 |
3 | import com.evaan.frostburn.module.Module;
4 |
5 | public class NoFall extends Module {
6 | public NoFall() {
7 | super("NoFall", Module.Category.MOVEMENT);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/movement/SafeWalk.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.movement;
2 |
3 | import com.evaan.frostburn.module.Module;
4 |
5 | public class SafeWalk extends Module {
6 | public SafeWalk() { super("SafeWalk", Category.MOVEMENT); }
7 | }
8 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/movement/Sprint.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.movement;
2 |
3 | import com.evaan.frostburn.module.Module;
4 |
5 | /**
6 | * @Author evaan
7 | * https://github.com/evaan
8 | */
9 | public class Sprint extends Module {
10 | public Sprint() {super("Sprint", Category.MOVEMENT);}
11 |
12 | @Override
13 | public void onUpdate() {
14 | if (mc.player == null) return;
15 | mc.player.setSprinting(mc.player.input.movementForward != 0 || mc.player.input.movementSideways != 0);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/render/ClickGuiMod.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.render;
2 |
3 | import com.evaan.frostburn.FrostBurn;
4 | import com.evaan.frostburn.module.Module;
5 | import com.evaan.frostburn.util.Setting;
6 |
7 | public class ClickGuiMod extends Module {
8 | public ClickGuiMod() {super("ClickGui", Category.RENDER);}
9 |
10 | public static ClickGuiMod clickGuiMod;
11 |
12 | public Setting bgR = register(new Setting("BackgroundRed", this, 218, 0, 255));
13 | public Setting bgG = register(new Setting("BackgroundGreen", this, 218, 0, 255));
14 | public Setting bgB = register(new Setting("BackgroundBlue", this, 218, 0, 255));
15 | public Setting bgA = register(new Setting("BackgroundAlpha", this, 232, 0, 255));
16 | public Setting textR = register(new Setting("TextRed", this, 30, 0, 255));
17 | public Setting textG = register(new Setting("TextGreen", this, 30, 0, 255));
18 | public Setting textB = register(new Setting("TextBlue", this, 30, 0, 255));
19 | public Setting textA = register(new Setting("TextAlpha", this, 255, 0, 255));
20 | public Setting textAltR = register(new Setting("TextAltRed", this, 30, 0, 255));
21 | public Setting textAltG = register(new Setting("TextAltGreen", this, 30, 0, 255));
22 | public Setting textAltB = register(new Setting("TextAltBlue", this, 216, 0, 255));
23 | public Setting textAltA = register(new Setting("TextAltAlpha", this, 232, 0, 255));
24 |
25 |
26 | @Override
27 | public void onEnable() {if (mc.player == null) {disable(); return;} clickGuiMod = this; mc.openScreen(FrostBurn.clickGUI);}
28 |
29 | @Override
30 | public void onDisable() {if (mc.player != null) mc.openScreen(null);}
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/render/Fullbright.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.render;
2 |
3 | import com.evaan.frostburn.module.Module;
4 |
5 | public class Fullbright extends Module {
6 | public Fullbright() {super("Fullbright", Category.RENDER);}
7 |
8 | boolean isExisting = false;
9 | double initalGamma;
10 |
11 | @Override
12 | public void onUpdate() {
13 | if (mc.player != null && !isExisting) {
14 | isExisting = true;
15 | initalGamma = mc.options.gamma;
16 | }
17 | mc.options.gamma = 100; //doing this so it doesnt throw a nullpointer on loading and not work
18 | }
19 |
20 | @Override
21 | public void onDisable() {
22 | mc.options.gamma = initalGamma;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/render/HUD.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.render;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.module.ModuleManager;
5 | import com.evaan.frostburn.util.Setting;
6 | import net.minecraft.client.util.math.MatrixStack;
7 | import net.minecraft.util.Formatting;
8 |
9 | import java.awt.*;
10 | import java.text.DecimalFormat;
11 | import java.util.Calendar;
12 |
13 | //fix your shit ass 1.12 skit idiot
14 | public class HUD extends Module {
15 | public HUD() {super("HUD", Category.RENDER); setDrawn(false);}
16 |
17 | Setting watermark = register(new Setting<>("Watermark", this, true));
18 | Setting greeter = register(new Setting<>("Greeter",this, true));
19 | Setting arrayList = register(new Setting<>("ArrayList",this, true));
20 | Setting coords = register(new Setting<>("Coordinates",this, true));
21 | Setting r = register(new Setting<>("Red", this, 255, 0, 255));
22 | Setting g = register(new Setting<>("Green", this, 0, 0, 255));
23 | Setting b = register(new Setting<>("Blue", this, 0, 0, 255));
24 | Setting rainbow = register(new Setting<>("Rainbow", this, true));
25 |
26 | public int rgb;
27 | public int a;
28 | public int r1;
29 | public int g1;
30 | public int b1;
31 | float hue = 0.01f;
32 |
33 | public int y;
34 |
35 | public void updateRainbow() {
36 | rgb = Color.HSBtoRGB(hue, 1, 1);
37 | a = (rgb >>> 24) & 0xFF;
38 | r1 = (rgb >>> 16) & 0xFF;
39 | g1 = (rgb >>> 8) & 0xFF;
40 | b1 = rgb & 0xFF;
41 | hue += 0.0005;
42 | if (hue > 1) hue -= 1;
43 | }
44 |
45 | @Override
46 | public void onRender1(MatrixStack matrices) {
47 | System.out.println(mc.getWindow().getWidth() + " " + mc.getWindow().getHeight());
48 | rgb = (rainbow.getValue() ? rgb : new Color(r.getValue(), g.getValue(), b.getValue()).getRGB());
49 | y=2;
50 | if (watermark.getValue()) {
51 | mc.textRenderer.drawWithShadow(matrices, "FrostBurn 1.0", 2, 2, rgb);
52 | y += 10;
53 | }
54 | if (greeter.getValue()) {
55 | int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
56 | if (hour >= 0 && hour < 12) mc.textRenderer.drawWithShadow(matrices, "Good morning " + mc.player.getName().asString() + " :^)", (mc.getWindow().getWidth()/2)-(mc.textRenderer.getWidth("Good morning " + mc.player.getName() + ":^)")/2),2, rgb);
57 | else if (hour >= 12 && hour < 16) mc.textRenderer.drawWithShadow(matrices,"Good afternoon " + mc.player.getName().asString() + " :^)", (mc.getWindow().getWidth()/2)-(mc.textRenderer.getWidth("Good afternoon " + mc.player.getName() + ":^)")/2),2, rgb);
58 | else if (hour >= 16 && hour < 24) mc.textRenderer.drawWithShadow(matrices, "Good evening " + mc.player.getName().asString() + " :^)", (mc.getWindow().getWidth()/2)-(mc.textRenderer.getWidth("Good evening " + mc.player.getName() + ":^)")/2),2, rgb);
59 | }
60 | if (arrayList.getValue()) {
61 | ModuleManager.modules.stream().filter(Module::isEnabled).filter(Module::isDrawn).forEach(module -> {
62 | if (rainbow.getValue()) updateRainbow();
63 | mc.textRenderer.drawWithShadow(matrices, module.getName() + " " + module.getHudInfo(), 2, y, rgb);
64 | y+=10;
65 | });
66 | }
67 | if (coords.getValue()) {
68 | if (rainbow.getValue()) updateRainbow();
69 | if (mc.player == null) return;
70 | DecimalFormat format = new DecimalFormat("0.#");
71 | if (mc.world.getRegistryKey().getValue().getPath().equalsIgnoreCase("the_nether")) mc.textRenderer.drawWithShadow(matrices, format.format(mc.player.getX()) + Formatting.WHITE + ", " + Formatting.RESET + format.format(mc.player.getY()) + Formatting.WHITE + ", " + Formatting.RESET + format.format(mc.player.getZ()) + Formatting.WHITE + " [" + Formatting.RESET + format.format(mc.player.getX()/8) + Formatting.WHITE + ", " + Formatting.RESET + format.format(mc.player.getY()) + Formatting.WHITE + ", " + Formatting.RESET + format.format(mc.player.getZ()/8) + Formatting.WHITE + "]", 2, mc.getWindow().getHeight()-mc.textRenderer.fontHeight-2, rgb);
72 | else if (mc.world.getRegistryKey().getValue().getPath().equalsIgnoreCase("overworld")) mc.textRenderer.drawWithShadow(matrices, format.format(mc.player.getX()) + Formatting.WHITE + ", " + Formatting.RESET + format.format(mc.player.getY()) + Formatting.WHITE + ", " + Formatting.RESET + format.format(mc.player.getZ()) + Formatting.WHITE + " [" + Formatting.RESET + format.format(mc.player.getX()*8) + Formatting.WHITE + ", " + Formatting.RESET + format.format(mc.player.getY()) + Formatting.WHITE + ", " + Formatting.RESET + format.format(mc.player.getZ()*8) + Formatting.WHITE + "]", 2, mc.getWindow().getHeight()-mc.textRenderer.fontHeight-2, rgb);
73 | else mc.textRenderer.drawWithShadow(matrices, format.format(mc.player.getX()) + Formatting.WHITE + ", " + Formatting.RESET + format.format(mc.player.getY()) + Formatting.WHITE + ", " + Formatting.RESET + format.format(mc.player.getZ()), 2, mc.getWindow().getHeight()-mc.textRenderer.fontHeight-2, rgb);
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/render/ImGuiMod.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.render;
2 |
3 | import com.evaan.frostburn.clickgui.ImGuiScreen;
4 | import com.evaan.frostburn.module.Module;
5 |
6 | /**
7 | * @Author evaan on 4/23/2021
8 | * https://github.com/evaan
9 | */
10 | public class ImGuiMod extends Module {
11 | public ImGuiMod() {super("ImGui", Category.RENDER); setBind(345);}
12 |
13 | @Override
14 | public void onEnable() {
15 | mc.openScreen(new ImGuiScreen());
16 | disable();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/render/NoParticle.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.render;
2 |
3 | import com.evaan.frostburn.module.Module;
4 |
5 | public class NoParticle extends Module {
6 | public NoParticle() {
7 | super("NoParticle", Category.RENDER);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/render/NoWeather.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.render;
2 |
3 | import com.evaan.frostburn.module.Module;
4 |
5 | public class NoWeather extends Module {
6 | public NoWeather() {super("NoWeather", Category.RENDER);}
7 | }
8 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/module/modules/render/Zoom.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.module.modules.render;
2 |
3 | import com.evaan.frostburn.module.Module;
4 |
5 | public class Zoom extends Module {
6 | public Zoom() {super("Zoom", Category.RENDER);}
7 |
8 | private final double newFOV = 30;
9 | private double prevFOV;
10 |
11 | @Override
12 | public void onEnable() {
13 | prevFOV = mc.options.fov;
14 | mc.options.fov = newFOV;
15 | }
16 |
17 | @Override
18 | public void onDisable() {
19 | mc.options.fov = prevFOV;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/util/ConfigManager.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.util;
2 |
3 | import com.evaan.frostburn.module.Module;
4 | import com.evaan.frostburn.module.ModuleManager;
5 | import net.minecraft.client.MinecraftClient;
6 |
7 | import java.io.File;
8 | import java.io.FileInputStream;
9 | import java.io.FileOutputStream;
10 | import java.util.Properties;
11 |
12 | public class ConfigManager {
13 | public static File configFolder;
14 | public static File configFile;
15 | public static Properties config;
16 |
17 | public static void prepare(String name) {
18 | try {
19 | configFolder = new File(MinecraftClient.getInstance().runDirectory + File.separator + "FrostBurn");
20 | configFile = new File(configFolder + File.separator + name + ".xml");
21 | if (!configFolder.exists()) configFolder.mkdirs();
22 | if (!configFile.exists()) configFile.createNewFile();
23 | config = new Properties();
24 | } catch (Exception ignored) {}
25 | }
26 |
27 | public static void save(String name) {
28 | try {
29 | System.out.println("Saving config " + name + ".");
30 | prepare(name);
31 | for (Module module : ModuleManager.modules) {
32 | config.setProperty(module.getName() + ".enabled", String.valueOf(module.isEnabled()));
33 | config.setProperty(module.getName() + ".bind", String.valueOf(module.getBind()));
34 | for (Setting setting : SettingsManager.getSettings(module)) {
35 | config.setProperty(module.getName() + "." + setting.getName(), String.valueOf(setting.getValue()));
36 | }
37 | }
38 | config.storeToXML(new FileOutputStream(configFile), null);
39 | } catch (Exception ignored) {}
40 | }
41 |
42 | public static void load(String name) {
43 | try {
44 | System.out.println("Loading config " + name + ".");
45 | prepare(name);
46 | config.loadFromXML(new FileInputStream(configFile));
47 | for (Module module : ModuleManager.modules) {
48 | if (Boolean.parseBoolean(config.getProperty(module.getName()+".enabled")) != module.isEnabled()) module.setEnabled(Boolean.parseBoolean(config.getProperty(module.getName()+".enabled")));
49 | module.setBind(Integer.parseInt(config.getProperty(module.getName() + ".bind")));
50 | for (Setting setting : module.settings) {
51 | String value = config.getProperty(module.getName() + "." + setting.getName(), null);
52 | if (value != null) {
53 | switch (setting.getType()) {
54 | case FLOAT:
55 | if ((float)setting.getMin() >= Float.parseFloat(value) || (float)setting.getMax() <= Float.parseFloat(value)) setting.setValue(Float.parseFloat(value));
56 | break;
57 | case INTEGER:
58 | if ((int)setting.getMin() >= Integer.parseInt(value) || (int)setting.getMax() <= Integer.parseInt(value)) setting.setValue(Integer.parseInt(value));
59 | break;
60 | case BOOLEAN:
61 | setting.setValue(Boolean.parseBoolean(value));
62 | break;
63 | case STRING:
64 | if (setting.getOptions().contains(value) || setting.getOptions().contains(value)) setting.setValue(value);
65 | break;
66 | }
67 | }
68 | }
69 | }
70 | } catch (Exception e) {e.printStackTrace();}
71 | }
72 | }
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/util/Friends.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.util;
2 |
3 | import java.util.ArrayList;
4 |
5 | /**
6 | * @Author evaan
7 | * https://github.com/evaan
8 | */
9 | public class Friends {
10 | private static Friends instance = null;
11 |
12 | private final ArrayList friends;
13 |
14 | private Friends() {
15 | friends = new ArrayList<>();
16 | }
17 |
18 | public static Friends getInstance() {
19 | if(instance == null)
20 | instance = new Friends();
21 | return instance;
22 | }
23 |
24 | public void addFriend(String name) {
25 | friends.add(name);
26 | }
27 |
28 | public void removeFriend(String name) {
29 | friends.remove(name);
30 | }
31 |
32 | public boolean isFriend(String name) {
33 | return friends.contains(name);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/util/Keyboard.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2002-2008 LWJGL Project
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are
7 | * met:
8 | *
9 | * * Redistributions of source code must retain the above copyright
10 | * notice, this list of conditions and the following disclaimer.
11 | *
12 | * * Redistributions in binary form must reproduce the above copyright
13 | * notice, this list of conditions and the following disclaimer in the
14 | * documentation and/or other materials provided with the distribution.
15 | *
16 | * * Neither the name of 'LWJGL' nor the names of
17 | * its contributors may be used to endorse or promote products derived
18 | * from this software without specific prior written permission.
19 | *
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 | package com.evaan.frostburn.util;
33 |
34 | import org.lwjgl.BufferUtils;
35 |
36 | import java.lang.reflect.Field;
37 | import java.lang.reflect.Modifier;
38 | import java.nio.ByteBuffer;
39 | import java.util.HashMap;
40 | import java.util.Map;
41 |
42 | /**
43 | *
44 | * A raw Keyboard interface. This can be used to poll the current state of the
45 | * keys, or read all the keyboard presses / releases since the last read.
46 | *
47 | * @author cix_foo
48 | * @author elias_naur
49 | * @author Brian Matzon
50 | * @author Gopro336
51 | * @version $Revision$
52 | * $Id$
53 | */
54 | public class Keyboard {
55 | /** Internal use - event size in bytes */
56 | public static final int EVENT_SIZE = 4 + 1 + 4 + 8 + 1;
57 |
58 | /**
59 | * The special character meaning that no
60 | * character was translated for the event.
61 | */
62 | public static final int CHAR_NONE = '\0';
63 |
64 | /**
65 | * The special keycode meaning that only the
66 | * translated character is valid.
67 | */
68 | public static final int KEY_NONE = 0x00;
69 |
70 | public static final int KEY_ESCAPE = 0x01;
71 | public static final int KEY_1 = 0x02;
72 | public static final int KEY_2 = 0x03;
73 | public static final int KEY_3 = 0x04;
74 | public static final int KEY_4 = 0x05;
75 | public static final int KEY_5 = 0x06;
76 | public static final int KEY_6 = 0x07;
77 | public static final int KEY_7 = 0x08;
78 | public static final int KEY_8 = 0x09;
79 | public static final int KEY_9 = 0x0A;
80 | public static final int KEY_0 = 0x0B;
81 | public static final int KEY_MINUS = 0x0C; /* - on main keyboard */
82 | public static final int KEY_EQUALS = 0x0D;
83 | public static final int KEY_BACK = 0x0E; /* backspace */
84 | public static final int KEY_TAB = 0x0F;
85 | public static final int KEY_Q = 0x10;
86 | public static final int KEY_W = 0x11;
87 | public static final int KEY_E = 0x12;
88 | public static final int KEY_R = 0x13;
89 | public static final int KEY_T = 0x14;
90 | public static final int KEY_Y = 0x15;
91 | public static final int KEY_U = 0x16;
92 | public static final int KEY_I = 0x17;
93 | public static final int KEY_O = 0x18;
94 | public static final int KEY_P = 0x19;
95 | public static final int KEY_LBRACKET = 0x1A;
96 | public static final int KEY_RBRACKET = 0x1B;
97 | public static final int KEY_RETURN = 0x1C; /* Enter on main keyboard */
98 | public static final int KEY_LCONTROL = 0x1D;
99 | public static final int KEY_A = 0x1E;
100 | public static final int KEY_S = 0x1F;
101 | public static final int KEY_D = 0x20;
102 | public static final int KEY_F = 0x21;
103 | public static final int KEY_G = 0x22;
104 | public static final int KEY_H = 0x23;
105 | public static final int KEY_J = 0x24;
106 | public static final int KEY_K = 0x25;
107 | public static final int KEY_L = 0x26;
108 | public static final int KEY_SEMICOLON = 0x27;
109 | public static final int KEY_APOSTROPHE = 0x28;
110 | public static final int KEY_GRAVE = 0x29; /* accent grave */
111 | public static final int KEY_LSHIFT = 0x2A;
112 | public static final int KEY_BACKSLASH = 0x2B;
113 | public static final int KEY_Z = 0x2C;
114 | public static final int KEY_X = 0x2D;
115 | public static final int KEY_C = 0x2E;
116 | public static final int KEY_V = 0x2F;
117 | public static final int KEY_B = 0x30;
118 | public static final int KEY_N = 0x31;
119 | public static final int KEY_M = 0x32;
120 | public static final int KEY_COMMA = 0x33;
121 | public static final int KEY_PERIOD = 0x34; /* . on main keyboard */
122 | public static final int KEY_SLASH = 0x35; /* / on main keyboard */
123 | public static final int KEY_RSHIFT = 0x36;
124 | public static final int KEY_MULTIPLY = 0x37; /* * on numeric keypad */
125 | public static final int KEY_LMENU = 0x38; /* left Alt */
126 | public static final int KEY_SPACE = 0x39;
127 | public static final int KEY_CAPITAL = 0x3A;
128 | public static final int KEY_F1 = 0x3B;
129 | public static final int KEY_F2 = 0x3C;
130 | public static final int KEY_F3 = 0x3D;
131 | public static final int KEY_F4 = 0x3E;
132 | public static final int KEY_F5 = 0x3F;
133 | public static final int KEY_F6 = 0x40;
134 | public static final int KEY_F7 = 0x41;
135 | public static final int KEY_F8 = 0x42;
136 | public static final int KEY_F9 = 0x43;
137 | public static final int KEY_F10 = 0x44;
138 | public static final int KEY_NUMLOCK = 0x45;
139 | public static final int KEY_SCROLL = 0x46; /* Scroll Lock */
140 | public static final int KEY_NUMPAD7 = 0x47;
141 | public static final int KEY_NUMPAD8 = 0x48;
142 | public static final int KEY_NUMPAD9 = 0x49;
143 | public static final int KEY_SUBTRACT = 0x4A; /* - on numeric keypad */
144 | public static final int KEY_NUMPAD4 = 0x4B;
145 | public static final int KEY_NUMPAD5 = 0x4C;
146 | public static final int KEY_NUMPAD6 = 0x4D;
147 | public static final int KEY_ADD = 0x4E; /* + on numeric keypad */
148 | public static final int KEY_NUMPAD1 = 0x4F;
149 | public static final int KEY_NUMPAD2 = 0x50;
150 | public static final int KEY_NUMPAD3 = 0x51;
151 | public static final int KEY_NUMPAD0 = 0x52;
152 | public static final int KEY_DECIMAL = 0x53; /* . on numeric keypad */
153 | public static final int KEY_F11 = 0x57;
154 | public static final int KEY_F12 = 0x58;
155 | public static final int KEY_F13 = 0x64; /* (NEC PC98) */
156 | public static final int KEY_F14 = 0x65; /* (NEC PC98) */
157 | public static final int KEY_F15 = 0x66; /* (NEC PC98) */
158 | public static final int KEY_F16 = 0x67; /* Extended Function keys - (Mac) */
159 | public static final int KEY_F17 = 0x68;
160 | public static final int KEY_F18 = 0x69;
161 | public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */
162 | public static final int KEY_F19 = 0x71; /* Extended Function keys - (Mac) */
163 | public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */
164 | public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */
165 | public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */
166 | public static final int KEY_NUMPADEQUALS = 0x8D; /* = on numeric keypad (NEC PC98) */
167 | public static final int KEY_CIRCUMFLEX = 0x90; /* (Japanese keyboard) */
168 | public static final int KEY_AT = 0x91; /* (NEC PC98) */
169 | public static final int KEY_COLON = 0x92; /* (NEC PC98) */
170 | public static final int KEY_UNDERLINE = 0x93; /* (NEC PC98) */
171 | public static final int KEY_KANJI = 0x94; /* (Japanese keyboard) */
172 | public static final int KEY_STOP = 0x95; /* (NEC PC98) */
173 | public static final int KEY_AX = 0x96; /* (Japan AX) */
174 | public static final int KEY_UNLABELED = 0x97; /* (J3100) */
175 | public static final int KEY_NUMPADENTER = 0x9C; /* Enter on numeric keypad */
176 | public static final int KEY_RCONTROL = 0x9D;
177 | public static final int KEY_SECTION = 0xA7; /* Section symbol (Mac) */
178 | public static final int KEY_NUMPADCOMMA = 0xB3; /* , on numeric keypad (NEC PC98) */
179 | public static final int KEY_DIVIDE = 0xB5; /* / on numeric keypad */
180 | public static final int KEY_SYSRQ = 0xB7;
181 | public static final int KEY_RMENU = 0xB8; /* right Alt */
182 | public static final int KEY_FUNCTION = 0xC4; /* Function (Mac) */
183 | public static final int KEY_PAUSE = 0xC5; /* Pause */
184 | public static final int KEY_HOME = 0xC7; /* Home on arrow keypad */
185 | public static final int KEY_UP = 0xC8; /* UpArrow on arrow keypad */
186 | public static final int KEY_PRIOR = 0xC9; /* PgUp on arrow keypad */
187 | public static final int KEY_LEFT = 0xCB; /* LeftArrow on arrow keypad */
188 | public static final int KEY_RIGHT = 0xCD; /* RightArrow on arrow keypad */
189 | public static final int KEY_END = 0xCF; /* End on arrow keypad */
190 | public static final int KEY_DOWN = 0xD0; /* DownArrow on arrow keypad */
191 | public static final int KEY_NEXT = 0xD1; /* PgDn on arrow keypad */
192 | public static final int KEY_INSERT = 0xD2; /* Insert on arrow keypad */
193 | public static final int KEY_DELETE = 0xD3; /* Delete on arrow keypad */
194 | public static final int KEY_CLEAR = 0xDA; /* Clear key (Mac) */
195 | public static final int KEY_LMETA = 0xDB; /* Left Windows/Option key */
196 | /**
197 | * The left windows key, mapped to KEY_LMETA
198 | *
199 | * @deprecated Use KEY_LMETA instead
200 | */
201 | public static final int KEY_LWIN = KEY_LMETA; /* Left Windows key */
202 | public static final int KEY_RMETA = 0xDC; /* Right Windows/Option key */
203 | /**
204 | * The right windows key, mapped to KEY_RMETA
205 | *
206 | * @deprecated Use KEY_RMETA instead
207 | */
208 | public static final int KEY_RWIN = KEY_RMETA; /* Right Windows key */
209 | public static final int KEY_APPS = 0xDD; /* AppMenu key */
210 | public static final int KEY_POWER = 0xDE;
211 | public static final int KEY_SLEEP = 0xDF;
212 |
213 | /* public static final int STATE_ON = 0;
214 | public static final int STATE_OFF = 1;
215 | public static final int STATE_UNKNOWN = 2;
216 | */
217 | public static final int KEYBOARD_SIZE = 256;
218 |
219 | /** Buffer size in events */
220 | private static final int BUFFER_SIZE = 50;
221 |
222 | /** Key names */
223 | private static final String[] keyName = new String[KEYBOARD_SIZE];
224 | private static final Map keyMap = new HashMap(253);
225 | private static int counter;
226 |
227 | static {
228 | // Use reflection to find out key names
229 | Field[] fields = Keyboard.class.getFields();
230 | try {
231 | for ( Field field : fields ) {
232 | if ( Modifier.isStatic(field.getModifiers())
233 | && Modifier.isPublic(field.getModifiers())
234 | && Modifier.isFinal(field.getModifiers())
235 | && field.getType().equals(int.class)
236 | && field.getName().startsWith("KEY_")
237 | && !field.getName().endsWith("WIN") ) { /* Don't use deprecated names */
238 |
239 | int key = field.getInt(null);
240 | String name = field.getName().substring(4);
241 | keyName[key] = name;
242 | keyMap.put(name, key);
243 | counter++;
244 | }
245 |
246 | }
247 | } catch (Exception e) {
248 | }
249 |
250 | }
251 |
252 | /** The number of keys supported */
253 | private static final int keyCount = counter;
254 |
255 | /** Has the keyboard been created? */
256 | private static boolean created;
257 |
258 | /** Are repeat events enabled? */
259 | private static boolean repeat_enabled;
260 |
261 | /** The keys status from the last poll */
262 | private static final ByteBuffer keyDownBuffer = BufferUtils.createByteBuffer(KEYBOARD_SIZE);
263 |
264 | /**
265 | * The key events from the last read: a sequence of pairs of key number,
266 | * followed by state. The state is followed by
267 | * a 4 byte code point representing the translated character.
268 | */
269 | private static ByteBuffer readBuffer;
270 |
271 | /** current event */
272 | private static KeyEvent current_event = new KeyEvent();
273 |
274 | /** scratch event */
275 | private static KeyEvent tmp_event = new KeyEvent();
276 |
277 | /** One time initialization */
278 | private static boolean initialized;
279 |
280 | /**
281 | * Keyboard cannot be constructed.
282 | */
283 | private Keyboard() {
284 | }
285 |
286 | private static void reset() {
287 | readBuffer.limit(0);
288 | for (int i = 0; i < keyDownBuffer.remaining(); i++)
289 | keyDownBuffer.put(i, (byte)0);
290 | current_event.reset();
291 | }
292 |
293 | /**
294 | * Checks whether one of the state keys are "active"
295 | *
296 | * @param key State key to test (KEY_CAPITAL | KEY_NUMLOCK | KEY_SYSRQ)
297 | * @return STATE_ON if on, STATE_OFF if off and STATE_UNKNOWN if the state is unknown
298 | */
299 | /* public static int isStateKeySet(int key) {
300 | if (!created)
301 | throw new IllegalStateException("Keyboard must be created before you can query key state");
302 | return implementation.isStateKeySet(key);
303 | }
304 | */
305 | /**
306 | * Gets a key's name
307 | * @param key The key
308 | * @return a String with the key's human readable name in it or null if the key is unnamed
309 | */
310 | public static synchronized String getKeyName(int key) {
311 | return keyName[key];
312 | }
313 |
314 | /**
315 | * Get's a key's index. If the key is unrecognised then KEY_NONE is returned.
316 | * @param keyName The key name
317 | */
318 | public static synchronized int getKeyIndex(String keyName) {
319 | Integer ret = keyMap.get(keyName);
320 | if (ret == null)
321 | return KEY_NONE;
322 | else
323 | return ret;
324 | }
325 |
326 | private static boolean readNext(KeyEvent event) {
327 | if (readBuffer.hasRemaining()) {
328 | event.key = readBuffer.getInt() & 0xFF;
329 | event.state = readBuffer.get() != 0;
330 | event.character = readBuffer.getInt();
331 | event.nanos = readBuffer.getLong();
332 | event.repeat = readBuffer.get() == 1;
333 | return true;
334 | } else
335 | return false;
336 | }
337 |
338 | /**
339 | * @return Number of keys on this keyboard
340 | */
341 | public static int getKeyCount() {
342 | return keyCount;
343 | }
344 |
345 | private static final class KeyEvent {
346 | /** The current keyboard character being examined */
347 | private int character;
348 |
349 | /** The current keyboard event key being examined */
350 | private int key;
351 |
352 | /** The current state of the key being examined in the event queue */
353 | private boolean state;
354 |
355 | /** The current event time */
356 | private long nanos;
357 |
358 | /** Is the current event a repeated event? */
359 | private boolean repeat;
360 |
361 | private void reset() {
362 | character = 0;
363 | key = 0;
364 | state = false;
365 | repeat = false;
366 | }
367 | }
368 | }
369 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/util/Setting.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.util;
2 |
3 | import com.evaan.frostburn.module.Module;
4 |
5 | import java.util.ArrayList;
6 |
7 | /**
8 | * @Author evaan
9 | * https://github.com/evaan
10 | */
11 | public class Setting {
12 | String name;
13 | Module parent;
14 | T value, min, max, defaultVal;
15 | ArrayList options;
16 | Type type;
17 |
18 | public String getName() {return name;}
19 | public Module getParent() {return parent;}
20 | public T getValue() {return value;}
21 | public T getDefaultVal() {return defaultVal;}
22 | public T getMin() {return min;}
23 | public T getMax() {return max;}
24 | public ArrayList getOptions() {return options;}
25 | public Type getType() {return type;}
26 |
27 | public void setValue(T value) {this.value = value;}
28 |
29 | public Setting(String name, Module parent, T value) {
30 | this.name = name;
31 | this.parent = parent;
32 | this.value = value;
33 | this.defaultVal = value;
34 | this.type = Type.BOOLEAN;
35 | }
36 |
37 | public Setting(String name, Module parent, T value, T min, T max) {
38 | this.name = name;
39 | this.parent = parent;
40 | this.value = value;
41 | this.defaultVal = value;
42 | this.min = min;
43 | this.max = max;
44 | if (value instanceof Float) this.type = Type.FLOAT;
45 | else this.type = Type.INTEGER;
46 | }
47 |
48 | public Setting(String name, Module parent, ArrayList options, T value) {
49 | this.name = name;
50 | this.parent = parent;
51 | this.value = value;
52 | this.defaultVal = value;
53 | this.options = options;
54 | this.type = Type.STRING;
55 | }
56 |
57 | public String getCorrectString(String stringIn) {
58 | if (this.value instanceof String) {
59 | for (String s : (ArrayList) options) {
60 | if (s.equalsIgnoreCase(stringIn)) return s;
61 | }
62 | return null;
63 | }
64 | return null;
65 | }
66 |
67 | public enum Type {BOOLEAN, FLOAT, INTEGER, STRING}
68 | }
69 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/util/SettingsManager.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.util;
2 |
3 | import com.evaan.frostburn.module.Module;
4 |
5 | import java.util.ArrayList;
6 |
7 | /**
8 | * @Author evaan
9 | * https://github.com/evaan
10 | */
11 | public class SettingsManager {
12 | public static ArrayList settings;
13 |
14 | public static void init() {
15 | settings = new ArrayList<>();
16 | }
17 |
18 | public static void register(Setting setting) {
19 | settings.add(setting);
20 | }
21 |
22 | public static Setting getSetting(Module parent, String name) {
23 | for (Setting setting : settings) {
24 | if (parent.equals(setting.parent) && name.equalsIgnoreCase(setting.name)) return setting;
25 | }
26 | return null;
27 | }
28 |
29 | public static ArrayList getSettings(Module parent) {
30 | ArrayList sets = new ArrayList<>();
31 | for (Setting setting : settings) {
32 | if (setting.parent.equals(parent)) sets.add(setting);
33 | }
34 | return sets;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/util/Wrapper.java:
--------------------------------------------------------------------------------
1 | package com.evaan.frostburn.util;
2 |
3 | import net.minecraft.client.MinecraftClient;
4 | import net.minecraft.client.font.TextRenderer;
5 | /**
6 | * @author Gopro336
7 | */
8 | public interface Wrapper {
9 | MinecraftClient mc = MinecraftClient.getInstance();
10 | TextRenderer textRenderer = mc.textRenderer;
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/com/evaan/frostburn/util/packet/PlayerInteractEntityC2SUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the BleachHack distribution (https://github.com/BleachDrinker420/BleachHack/).
3 | * Copyright (c) 2021 Bleach and contributors.
4 | *
5 | * This source code is subject to the terms of the GNU General Public
6 | * License, version 3. If a copy of the GPL was not distributed with this
7 | * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
8 | */
9 | package com.evaan.frostburn.util.packet;
10 |
11 | import io.netty.buffer.Unpooled;
12 | import net.minecraft.client.MinecraftClient;
13 | import net.minecraft.entity.Entity;
14 | import net.minecraft.network.PacketByteBuf;
15 | import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
16 |
17 | // real talk why the fuck did mojang do this
18 | //also yoinked from bleachhack because i dont fuck with no reading docs
19 | public class PlayerInteractEntityC2SUtils {
20 |
21 | public static Entity getEntity(PlayerInteractEntityC2SPacket packet) {
22 | PacketByteBuf packetBuf = new PacketByteBuf(Unpooled.buffer());
23 | packet.write(packetBuf);
24 |
25 | return MinecraftClient.getInstance().world.getEntityById(packetBuf.readVarInt());
26 | }
27 |
28 | public static InteractType getInteractType(PlayerInteractEntityC2SPacket packet) {
29 | PacketByteBuf packetBuf = new PacketByteBuf(Unpooled.buffer());
30 | packet.write(packetBuf);
31 |
32 | packetBuf.readVarInt();
33 | return packetBuf.readEnumConstant(InteractType.class);
34 | }
35 |
36 | public static enum InteractType {
37 | INTERACT,
38 | ATTACK,
39 | INTERACT_AT
40 | }
41 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/frostburn/16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evaan/FrostBurn/7379a4bfa153432e15e4db496e74d097969db6ba/src/main/resources/assets/frostburn/16.png
--------------------------------------------------------------------------------
/src/main/resources/assets/frostburn/32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/evaan/FrostBurn/7379a4bfa153432e15e4db496e74d097969db6ba/src/main/resources/assets/frostburn/32.png
--------------------------------------------------------------------------------
/src/main/resources/fabric.mod.json:
--------------------------------------------------------------------------------
1 | {
2 | "schemaVersion": 1,
3 | "id": "frostburn",
4 | "version": "1.0",
5 | "name": "FrostBurn",
6 | "description": "A free and open source 1.16 client",
7 | "authors": [
8 | "Evaan",
9 | "majorsopa",
10 | "Gopro336",
11 | "burrit0z"
12 | ],
13 | "contact": {
14 | "homepage": "https://github.com/evaan/",
15 | "sources": "https://github.com/evaan/frostburn"
16 | },
17 | "license": "GPL-3.0",
18 | "environment": "*",
19 | "entrypoints": {
20 | "main": [
21 | "com.evaan.frostburn.FrostBurn"
22 | ]
23 | },
24 | "mixins": [
25 | "frostburn.mixins.json"
26 | ]
27 | }
--------------------------------------------------------------------------------
/src/main/resources/frostburn.mixins.json:
--------------------------------------------------------------------------------
1 | {
2 | "required": true,
3 | "minVersion": "0.8",
4 | "package": "com.evaan.frostburn.mixins",
5 | "compatibilityLevel": "JAVA_8",
6 | "mixins": [
7 | ],
8 | "client": [
9 | "MixinClientConnection",
10 | "MixinClientPlayerEntity",
11 | "MixinGameRenderer",
12 | "MixinKeyboard",
13 | "MixinMinecraftClient",
14 | "MixinFluidBlock",
15 | "MixinWorldRenderer",
16 | "MixinPlayerEntity",
17 | "MixinInGameHud"
18 | ],
19 | "injectors": {
20 | "defaultRequire": 1
21 | }
22 | }
23 |
--------------------------------------------------------------------------------