add noclip
This commit is contained in:
parent
ba521b527c
commit
81be95c2c5
|
@ -13,7 +13,7 @@ apply plugin: 'java'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
apply plugin: 'io.github.zebalu.teavm-gradle-plugin'
|
apply plugin: 'io.github.zebalu.teavm-gradle-plugin'
|
||||||
|
|
||||||
sourceCompatibility = 1.7
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,6 +21,7 @@ public class GuiScreenModules extends GuiScreen {
|
||||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 6 + 124, "Give"));
|
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 6 + 124, "Give"));
|
||||||
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, this.height / 6 + 100, "Toggle Notebot"));
|
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, this.height / 6 + 100, "Toggle Notebot"));
|
||||||
this.buttonList.add(new GuiButton(3, this.width / 2 - 100, this.height / 6 + 76, "Toggle Legit mode"));
|
this.buttonList.add(new GuiButton(3, this.width / 2 - 100, this.height / 6 + 76, "Toggle Legit mode"));
|
||||||
|
this.buttonList.add(new GuiButton(4, this.width / 2 - 100, this.height / 6 + 52, "Toggle Noclip"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onGuiClosed() {
|
public void onGuiClosed() {
|
||||||
|
@ -77,6 +78,8 @@ public class GuiScreenModules extends GuiScreen {
|
||||||
}
|
}
|
||||||
}else if(par1GuiButton.id == 3){
|
}else if(par1GuiButton.id == 3){
|
||||||
NoteblockPlayer.legit=!NoteblockPlayer.legit;
|
NoteblockPlayer.legit=!NoteblockPlayer.legit;
|
||||||
|
}else if(par1GuiButton.id == 4){
|
||||||
|
mc.thePlayer.noClip=!mc.thePlayer.noClip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,31 +51,6 @@ public class NoteblockPlayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
private static void playSong(String[] songLines,HashMap<Integer,HashMap<Integer,Vec3>> instrNoteToBlock) throws InterruptedException {
|
|
||||||
int ticks=0;
|
|
||||||
for (String songLine : songLines) {
|
|
||||||
if(playing) {
|
|
||||||
String[] songInfo = songLine.split(":");
|
|
||||||
int tick = Integer.parseInt(songInfo[0]);
|
|
||||||
int note = Integer.parseInt(songInfo[1]);
|
|
||||||
int instr = Integer.parseInt(songInfo[2]);
|
|
||||||
if(instr!=-1) {
|
|
||||||
Vec3 blockPos=instrNoteToBlock.get(instr).get(note);
|
|
||||||
try {
|
|
||||||
mc.playerController.clickBlock((int) blockPos.xCoord, (int) (blockPos.yCoord - 1), (int) blockPos.zCoord, 1);
|
|
||||||
rotateToBlock(blockPos.addVector(0,-1,0));
|
|
||||||
}catch(NullPointerException e){}
|
|
||||||
Thread.sleep((tick - ticks) * 50L);
|
|
||||||
ticks=tick;
|
|
||||||
//mc.getNetHandler().addToSendQueue(new Packet14BlockDig(0, (int) blockPos.xCoord, (int) blockPos.yCoord, (int) blockPos.zCoord,1));
|
|
||||||
//mc.thePlayer.swingItem();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
public static void rotateToBlock(Vec3 block){
|
public static void rotateToBlock(Vec3 block){
|
||||||
block=block.addVector(0.5,0.5,0.5);
|
block=block.addVector(0.5,0.5,0.5);
|
||||||
|
|
||||||
|
@ -107,11 +82,6 @@ public class NoteblockPlayer {
|
||||||
instrNoteToBlocks=songBlocks;
|
instrNoteToBlocks=songBlocks;
|
||||||
tickPassed=0;
|
tickPassed=0;
|
||||||
playingSong=true;
|
playingSong=true;
|
||||||
/*
|
|
||||||
try {
|
|
||||||
playSong(songLines,songBlocks);
|
|
||||||
} catch (InterruptedException e) {}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +118,6 @@ public class NoteblockPlayer {
|
||||||
public static void placeAndTuneNoteblocks(HashMap<Integer, HashMap<Integer, Vec3>> instrNoteToBlock){
|
public static void placeAndTuneNoteblocks(HashMap<Integer, HashMap<Integer, Vec3>> instrNoteToBlock){
|
||||||
if(!playing)return;
|
if(!playing)return;
|
||||||
building=true;
|
building=true;
|
||||||
//mc.thePlayer.sendChatMessage("/gamemode 1");
|
|
||||||
try {
|
try {
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
} catch (InterruptedException e) {}
|
} catch (InterruptedException e) {}
|
||||||
|
@ -274,49 +243,6 @@ public class NoteblockPlayer {
|
||||||
blockDist=currPos.distanceTo(blockPos);
|
blockDist=currPos.distanceTo(blockPos);
|
||||||
}
|
}
|
||||||
correctNote=false;
|
correctNote=false;
|
||||||
/*
|
|
||||||
if(playing) {
|
|
||||||
ItemStack noteblocks = new ItemStack(instruments[instr]);
|
|
||||||
mc.thePlayer.inventory.clearInventory(-1,-1);
|
|
||||||
mc.thePlayer.inventory.currentItem=0;
|
|
||||||
mc.thePlayer.inventory.mainInventory[mc.thePlayer.inventory.currentItem]=noteblocks;
|
|
||||||
mc.playerController.sendSlotPacket(noteblocks,0);
|
|
||||||
try {
|
|
||||||
Thread.sleep(100);
|
|
||||||
//mc.thePlayer.inventoryContainer.detectAndSendChanges();
|
|
||||||
}catch(InterruptedException e){}
|
|
||||||
PlayerControllerMP.clickBlockCreative(mc,mc.playerController, (int) blockPos.xCoord, (int) (blockPos.yCoord-2), (int) blockPos.zCoord,1);
|
|
||||||
mc.thePlayer.swingItem();
|
|
||||||
try {
|
|
||||||
Thread.sleep(50);
|
|
||||||
mc.getNetHandler().addToSendQueue(new Packet15Place((int) blockPos.xCoord, (int) (blockPos.yCoord-1), (int) blockPos.zCoord,1,mc.thePlayer.inventory.getCurrentItem(),0,1,0));
|
|
||||||
Thread.sleep(50);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
}
|
|
||||||
noteblocks = new ItemStack(Block.music);
|
|
||||||
mc.thePlayer.inventory.clearInventory(-1,-1);
|
|
||||||
mc.thePlayer.inventory.currentItem=0;
|
|
||||||
mc.thePlayer.inventory.mainInventory[mc.thePlayer.inventory.currentItem]=noteblocks;
|
|
||||||
mc.getNetHandler().addToSendQueue(new Packet16BlockItemSwitch(0));
|
|
||||||
mc.playerController.sendSlotPacket(noteblocks,0);
|
|
||||||
try {
|
|
||||||
Thread.sleep(100);
|
|
||||||
//mc.thePlayer.inventoryContainer.detectAndSendChanges();
|
|
||||||
}catch(InterruptedException e){}
|
|
||||||
PlayerControllerMP.clickBlockCreative(mc,mc.playerController, (int) blockPos.xCoord, (int) (blockPos.yCoord-1), (int) blockPos.zCoord,1);
|
|
||||||
mc.thePlayer.swingItem();
|
|
||||||
try {
|
|
||||||
Thread.sleep(50);
|
|
||||||
mc.getNetHandler().addToSendQueue(new Packet15Place((int) blockPos.xCoord, (int) blockPos.yCoord, (int) blockPos.zCoord,1,mc.thePlayer.inventory.getCurrentItem(),0,1,0));
|
|
||||||
Thread.sleep(50);
|
|
||||||
for(int i=0;i<note;i++){
|
|
||||||
Thread.sleep(50);
|
|
||||||
mc.getNetHandler().addToSendQueue(new Packet15Place((int) blockPos.xCoord, (int) blockPos.yCoord, (int) blockPos.zCoord,1,mc.thePlayer.inventory.getCurrentItem(),0,1,0));
|
|
||||||
}
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user