This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from SkidwareMC/PR
yes
- Loading branch information
Showing
29 changed files
with
207 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include "CJesusModule.h" | ||
#include "CCheat.hpp" | ||
|
||
CJesusModule::CJesusModule() : CModule("Jesus", 'L', MOVEMENT, "Walk on water") | ||
{ | ||
} | ||
|
||
void CJesusModule::onEnable() | ||
{ | ||
CCheat::eventBus->registerListener(this); | ||
} | ||
|
||
void CJesusModule::onDisable() | ||
{ | ||
CCheat::eventBus->unregisterListener(this); | ||
} | ||
|
||
void CJesusModule::onEvent(const CSimpleEvent*) | ||
{ | ||
double jumpfactor = 0.0336; | ||
CMinecraft* mc = CCheat::theMinecraft; | ||
if (jesus_current_mode == "AAC 4.2.1") { | ||
if (mc->thePlayer->inWater) { | ||
mc->thePlayer->motionY = jumpfactor; | ||
} | ||
} | ||
} | ||
|
||
void CJesusModule::renderSettings() | ||
{ | ||
ImGui::Separator(); | ||
if (ImGui::BeginCombo("##kombo", jesus_current_mode)) // The second parameter is the label previewed before opening the combo. | ||
{ | ||
for (int n = 0; n < IM_ARRAYSIZE(jesus_modes); n++) | ||
{ | ||
bool is_selected = (jesus_current_mode == jesus_modes[n]); // You can store your selection however you want, outside or inside your objects | ||
if (ImGui::Selectable(jesus_modes[n], is_selected)) | ||
jesus_current_mode = jesus_modes[n]; | ||
if (is_selected) | ||
ImGui::SetItemDefaultFocus(); // You may set the initial focus when opening the combo (scrolling + for keyboard navigation support) | ||
} | ||
ImGui::EndCombo(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef CJesusModule_HPP_GUARD | ||
#define CJesusModule_HPP_GUARD | ||
#pragma once | ||
|
||
#include "CModule.hpp" | ||
|
||
typedef struct CJesusModule : CModule { | ||
CJesusModule(); | ||
virtual void onEnable() override; | ||
virtual void onDisable() override; | ||
virtual void onEvent(const CSimpleEvent*) override; | ||
virtual void renderSettings(); | ||
}; | ||
static const char* jesus_modes[] = { "AAC 4.2.1", "Dolphin"}; | ||
static const char* jesus_current_mode = "AAC 4.2.1"; | ||
|
||
#endif //CNoFallModule_HPP_GUARD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.