}
}
+ @Override
protected void initGui() {
this.title = ClientProxy.Name;
private void initGui(CallbackInfo ci) {
//shuffle middle buttons up by 12 px to make space
int top = this.height / 6 + 42;
+ int bottom = this.height / 6 + 168;
for (GuiButton button : buttons) {
- if (button.id != 200 && button.y >= top)
+ if (button.y >= top && button.y < bottom)
button.y -= 12;
}
this.addButton(new SettingsScreenButton(200, this.width / 2 - 155, top + 84, 150, "BBOR", this));
public class MixinDedicatedServer {
@Inject(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/dedicated/DedicatedServer;loadAllWorlds(Ljava/lang/String;Ljava/lang/String;JLnet/minecraft/world/WorldType;Lcom/google/gson/JsonElement;)V"))
private void init(CallbackInfoReturnable<Boolean> cir) {
- File gameDir = ((DedicatedServer) (Object) this).getDataDirectory();
- ConfigManager.loadConfig(gameDir);
+ ConfigManager.loadConfig(new File("."));
new CommonProxy().init();
}
}
@Inject(method = "tryHarvestBlock", at = @At("HEAD"))
private void tryHarvestBlock(BlockPos pos, CallbackInfoReturnable<Boolean> cir) {
Block block = this.world.getBlockState(pos).getBlock();
- TypeHelper.doIfType(block, BlockMobSpawner.class, ms -> {
- EventBus.publish(new MobSpawnerBroken(this.world.dimension.getType().getId(), new Coords(pos)));
- });
+ TypeHelper.doIfType(block, BlockMobSpawner.class, ms ->
+ EventBus.publish(new MobSpawnerBroken(this.world.dimension.getType().getId(), new Coords(pos))));
}
}