autosigntext
This commit is contained in:
parent
cbf44cdd70
commit
050e3286f0
6 changed files with 77 additions and 6 deletions
|
@ -13,6 +13,7 @@ import com.baseband.client.module.render.ClickGUI;
|
|||
import com.baseband.client.module.render.Freecam;
|
||||
import com.baseband.client.module.render.HUD;
|
||||
import com.baseband.client.module.render.Nametags;
|
||||
import com.baseband.client.module.world.AutoSignText;
|
||||
|
||||
/**
|
||||
* @author TudbuT
|
||||
|
@ -38,7 +39,8 @@ public class Setup {
|
|||
new ElytraFly(),
|
||||
new ExtraChat(),
|
||||
new Velocity(),
|
||||
new Nametags()
|
||||
new Nametags(),
|
||||
new AutoSignText()
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
package com.baseband.client.mixins;
|
||||
|
||||
import com.baseband.client.init.BaseBand;
|
||||
import com.baseband.client.module.world.AutoSignText;
|
||||
import net.minecraft.client.gui.inventory.GuiEditSign;
|
||||
import net.minecraft.tileentity.TileEntitySign;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(value = GuiEditSign.class, priority = Integer.MAX_VALUE)
|
||||
public class MixinGuiEditSign {
|
||||
|
||||
@Final
|
||||
@Shadow
|
||||
private TileEntitySign tileSign;
|
||||
|
||||
@Inject(method = "initGui", at = @At("RETURN"))
|
||||
public void initGui(CallbackInfo callback) {
|
||||
if(BaseBand.getModule(AutoSignText.class).enabled) {
|
||||
tileSign.signText[0] = new TextComponentString(BaseBand.getModule(AutoSignText.class).signTextFirst);
|
||||
tileSign.signText[1] = new TextComponentString(BaseBand.getModule(AutoSignText.class).signTextSecond);
|
||||
tileSign.signText[2] = new TextComponentString(BaseBand.getModule(AutoSignText.class).signTextThird);
|
||||
tileSign.signText[3] = new TextComponentString(BaseBand.getModule(AutoSignText.class).signTextFourth);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,7 +17,8 @@ public enum Category {
|
|||
CHAT("Chat", Chat.class),
|
||||
CLIENT("Client", Client.class),
|
||||
COMBAT("Combat", Combat.class),
|
||||
MOVEMENT("Movement", Movement.class)
|
||||
MOVEMENT("Movement", Movement.class),
|
||||
WORLD("World", World.class)
|
||||
|
||||
;
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
package com.baseband.client.module.category;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface World {
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.baseband.client.module.world;
|
||||
|
||||
import com.baseband.client.configuration.annotation.Config;
|
||||
import com.baseband.client.module.Feature;
|
||||
import com.baseband.client.module.category.World;
|
||||
|
||||
@World
|
||||
public class AutoSignText extends Feature {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AutoSignText";
|
||||
}
|
||||
|
||||
@Config("Line 1")
|
||||
public String signTextFirst = "Try editing this";
|
||||
|
||||
@Config("Line 2")
|
||||
public String signTextSecond = "In the GUI!";
|
||||
|
||||
@Config("Line 3")
|
||||
public String signTextThird = "Try editing this";
|
||||
|
||||
@Config("Line 4")
|
||||
public String signTextFourth = "In the GUI!";
|
||||
}
|
|
@ -4,13 +4,14 @@
|
|||
"package": "com.baseband.client.mixins",
|
||||
"minVersion": "0",
|
||||
"refmap": "mixins.baseband.refmap.json",
|
||||
"mixins": [
|
||||
"client": [
|
||||
"ICPacketChat",
|
||||
"IMinecraft",
|
||||
"IRenderManager",
|
||||
"MixinNetworkManager",
|
||||
"MixinFMLNetworkRegistry",
|
||||
"MixinEntityPlayerSP",
|
||||
"MixinGuiNewChat"
|
||||
"MixinFMLNetworkRegistry",
|
||||
"MixinGuiNewChat",
|
||||
"MixinNetworkManager",
|
||||
"MixinGuiEditSign"
|
||||
]
|
||||
}
|
Loading…
Add table
Reference in a new issue