-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial obfuscated mod: [1.9.2]v1.5.1
- Loading branch information
Showing
31 changed files
with
9,261 additions
and
12,749 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# To use, place this file inside the minecraft version directory, and run: | ||
# ./fixvers.sh [VERSION_DIR] | ||
# Where the actual minecraft jar file should be located at "./VERSION_DIR/VERSION_DIR.jar" | ||
|
||
# This script disassembles and fixes the internal name of net/minecraft/server/MinecraftServer | ||
# such that it becomes accessable to the modded classes. The 'fixed' classes are placed in '$out'. | ||
# The disassembler used here is the "Krakatau Bytecode Tools" by Robert Grosse. | ||
|
||
tmp="./tmp_deasm" | ||
out="./$1/fixclasses" | ||
krakatauDir="./Krakatau-master" | ||
|
||
unzip -q ./$1/$1.jar -d $out | ||
python $krakatauDir/disassemble.py -r $out -out $tmp 1>/dev/null | ||
rm -r $out/* | ||
rm $(grep -rL 'MinecraftServer' $tmp/* 2>/dev/null) 2>/dev/null | ||
mv $tmp/net/minecraft/server/MinecraftServer* $tmp | ||
find $tmp -type f -print0 | xargs -0 sed -i 's#net/minecraft/server/MinecraftServer#MinecraftServer#g' | ||
python $krakatauDir/assemble.py -q -r $tmp -out $out | ||
rm -r $tmp | ||
if [ ! -e ./$1/$1_ori.jar ] | ||
then | ||
cp ./$1/$1.jar ./$1/$1_ori.jar | ||
fi | ||
wdir=$(pwd) | ||
cd $out | ||
jar uf $wdir/$1/$1.jar ./*.class | ||
cd $wdir |
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,59 @@ | ||
import java.util.List; | ||
|
||
public class CommandRerender extends i | ||
{ | ||
@Override | ||
public String c() | ||
{ | ||
return "rerender"; | ||
} | ||
|
||
@Override | ||
public int a() | ||
{ | ||
return 0; | ||
} | ||
|
||
@Override | ||
public String b(m sender) | ||
{ | ||
return "/rerender [fromX fromY fromZ toX toY toZ]\n§7Marks a region to be rendered again (without reloading)\n§7Specifying no arguments will also reload and do the same as F3+A"; | ||
} | ||
|
||
@Override | ||
public void a(MinecraftServer server, m sender, String[] args) throws bz | ||
{ | ||
if(args.length == 0) { | ||
bcc.z().scheduledReload = true; | ||
} | ||
else if(args.length <= 5) { | ||
a(sender, this, "§cUsage:\n§c"+b(sender)); | ||
return; | ||
} else { | ||
cj pos1 = a(sender, args, 0, false); | ||
cj pos2 = a(sender, args, 3, false); | ||
|
||
cj from = new cj(Math.min(pos1.p(), pos2.p()), Math.min(pos1.q(), pos2.q()), Math.min(pos1.r(), pos2.r())); | ||
cj to = new cj(Math.max(pos1.p(), pos2.p()), Math.max(pos1.q(), pos2.q()), Math.max(pos1.r(), pos2.r())); | ||
sender.e().b(from, to); | ||
} | ||
} | ||
|
||
@Override | ||
public List<String> a(MinecraftServer server, m sender, String[] args, cj pos) | ||
{ | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean b(String[] args, int index) | ||
{ | ||
return index == 0; | ||
} | ||
|
||
@Override | ||
public int compareTo(k o) { | ||
// TODO Auto-generated method stub | ||
return 0; | ||
} | ||
} |
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,41 @@ | ||
public class CommandTickSync extends i | ||
{ | ||
public String c() | ||
{ | ||
return "ticksync"; | ||
} | ||
|
||
public int a() | ||
{ | ||
return 2; | ||
} | ||
|
||
public String b(m sender) | ||
{ | ||
return "/ticksync [true/false]"; | ||
} | ||
|
||
public void a(MinecraftServer server, m sender, String[] args) throws bz | ||
{ | ||
if(args.length < 1) { | ||
a(sender, this, (Cubitick.synctick) ? "Tickrate is currently synchronised" : "Tickrate is currently desynchronised"); | ||
return; | ||
} else { | ||
if(args[0].equals("true") || args[0].equals("on")) { | ||
Cubitick.synctick = true; | ||
a(sender, this, "Tickrate is now synchronised"); | ||
} else if(args[0].equals("false") || args[0].equals("off")) { | ||
Cubitick.synctick = false; | ||
a(sender, this, "Tickrate is now desynchronised"); | ||
} else { | ||
a(sender, this, "Tickrate synchronisation can only be true/on or false/off"); | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
public int compareTo(k o) { | ||
// TODO Auto-generated method stub | ||
return 0; | ||
} | ||
} |
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,41 @@ | ||
public class CommandTickrate extends i | ||
{ | ||
public String c() | ||
{ | ||
return "tickrate"; | ||
} | ||
|
||
public int a() | ||
{ | ||
return 2; | ||
} | ||
|
||
public String b(m sender) | ||
{ | ||
return "/tickrate [rate]"; | ||
} | ||
|
||
public void a(MinecraftServer server, m sender, String[] args) throws bz | ||
{ | ||
if(args.length < 1) { | ||
a(sender, this, "Tickrate is " + Cubitick.tickrateWorld + " ticks per second"); | ||
return; | ||
} else { | ||
float tickspeed = (float)a(args[0], 0F); | ||
if(tickspeed >= 0) { | ||
Cubitick.setTickWorld(tickspeed); | ||
a(sender, this, "Tickrate set to " + tickspeed); | ||
} else { | ||
a(sender, this, "Tickrate should be a non-negative floating point number"); | ||
return; | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
public int compareTo(k o) { | ||
// TODO Auto-generated method stub | ||
return 0; | ||
} | ||
} | ||
|
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,139 @@ | ||
public class GuiPacketOptionsList extends bdi | ||
{ | ||
private final GuiServerPackets guiServerPackets; | ||
private final bcc mc; | ||
private final bdi.a listEntries[]; | ||
private int maxListLabelWidth = 0; | ||
public static int lastBtnIndex; | ||
|
||
public boolean isActive[]; | ||
|
||
public GuiPacketOptionsList(GuiServerPackets guiServerPackets, bcc mcIn) | ||
{ | ||
super(mcIn, guiServerPackets.l, guiServerPackets.m, 63, guiServerPackets.m - 32, 20); | ||
this.guiServerPackets = guiServerPackets; | ||
this.mc = mcIn; | ||
this.listEntries = new bdi.a[ServerPacketData.isActive.length]; | ||
|
||
isActive = new boolean[this.listEntries.length]; | ||
isActive = ServerPacketData.isActive.clone(); | ||
|
||
for(int packetID = 0; packetID < this.listEntries.length; packetID++) | ||
{ | ||
this.listEntries[packetID] = new PacketOptionEntry(packetID); | ||
} | ||
} | ||
|
||
// getSize() | ||
@Override | ||
protected int b() | ||
{ | ||
return this.listEntries.length; | ||
} | ||
|
||
// getListEntry() | ||
@Override | ||
public bdi.a b(int idx) | ||
{ | ||
if(idx < 0 || idx >= this.b()) { | ||
System.err.println("[Cubitick]: index out of bounds in GuiPacketOptionsList.getListEntry()"); | ||
return null; | ||
} | ||
return this.listEntries[idx]; | ||
} | ||
|
||
// getScrollBarX() | ||
@Override | ||
protected int d() | ||
{ | ||
return super.d() + 15; | ||
} | ||
|
||
// getListWidth() | ||
@Override | ||
public int c() | ||
{ | ||
return super.c() + 32; | ||
} | ||
|
||
public void setAll(boolean state) | ||
{ | ||
for(int i = 0; i < listEntries.length; i++) | ||
{ | ||
isActive[i] = state; | ||
} | ||
} | ||
|
||
|
||
|
||
public class PacketOptionEntry implements bdi.a | ||
{ | ||
public final String baseLabel; | ||
public final bcw btn; | ||
public final int packetID; | ||
|
||
private PacketOptionEntry(int packetID) | ||
{ | ||
this.packetID = packetID; | ||
this.baseLabel = ServerPacketData.packetName[packetID]; | ||
this.btn = new bcw(0, 0, 0, 250, 18, this.baseLabel); | ||
} | ||
|
||
// drawEntry(..) | ||
public void a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) | ||
{ | ||
if(this.baseLabel == null) | ||
{ | ||
this.btn.j = ""; | ||
this.btn.l = false; | ||
} | ||
else | ||
{ | ||
this.btn.j = this.baseLabel + ": " + (isActive[this.packetID] ? "§aactive":"§cinactive"); | ||
this.btn.l = guiServerPackets.enabled; | ||
} | ||
|
||
this.btn.h = x; | ||
this.btn.i = y; | ||
|
||
this.btn.a(GuiPacketOptionsList.this.mc, mouseX, mouseY); | ||
} | ||
|
||
// mousePressed(..) | ||
public boolean a(int slotIndex, int x, int y, int mouseEvent, int relativeX, int relativeY) | ||
{ | ||
if(this.btn.l && this.btn.c(GuiPacketOptionsList.this.mc, x, y)) | ||
{ | ||
if(GuiPacketOptionsList.lastBtnIndex != slotIndex) | ||
{ | ||
GuiPacketOptionsList.lastBtnIndex = slotIndex; | ||
isActive[slotIndex] = !isActive[slotIndex]; | ||
} | ||
else { | ||
GuiPacketOptionsList.lastBtnIndex = -1; | ||
return false; | ||
} | ||
//GuiPacketOptionsList.this.guiServerPackets.buttonId = this.packetID; | ||
|
||
return true; | ||
} | ||
else | ||
{ | ||
return false; | ||
} | ||
} | ||
|
||
// mouseReleased(..) | ||
public void b(int slotIndex, int x, int y, int mouseEvent, int relativeX, int relativeY) | ||
{ | ||
this.btn.a(x, y); | ||
System.out.println("Release- Slot: " + slotIndex + ", Event: " + mouseEvent); | ||
} | ||
|
||
// setSelected | ||
@Override | ||
public void a(int arg0, int arg1, int arg2) { | ||
// TODO Auto-generated method stub | ||
} | ||
} | ||
} |
Oops, something went wrong.