Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ build
eclipse
run

*.bytelog*
*.bytelog*
logs
File renamed without changes.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Fast Log Block [![Build Status](https://travis-ci.org/LionZXY/FastLogBlock.svg?branch=master)](https://travis-ci.org/LionZXY/FastLogBlock) [![codecov](https://codecov.io/gh/LionZXY/FastLogBlock/branch/master/graph/badge.svg)](https://codecov.io/gh/LionZXY/FastLogBlock)
# Fast Log Block - Server Side Version

This is minecraft mod for easy and fast logging block place and break.
This is server-side only Minecraft Forge mod for easy and fast logging block place and break.

## How to use:
Simply type /blocklog when looking at a block to see the block's history.

## Event multithread handling
![](https://image.ibb.co/hyaPRw/Fast_Log_Block.png)
Expand Down
51 changes: 13 additions & 38 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
mavenCentral()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
}
}
repositories {
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.

apply plugin: 'net.minecraftforge.gradle'

version = "1.0.3"
group = "ru.lionzxy.fastlogblock" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "FastLogBlock"
group = "club.moddedminecraft.fastlogblockserver"
archivesBaseName = "FastLogBlockServer"

sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}

minecraft {
version = "1.12.2-14.23.1.2555"
runDir = "run"

// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "snapshot_20171003"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
mappings channel: 'snapshot', version: '20171003-1.12'
}

configurations {
Expand All @@ -41,9 +33,11 @@ configurations {
}

dependencies {
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2854'

embed "jline:jline:2.14.6"
embed "trove:trove:1.0.2"

// https://mvnrepository.com/artifact/org.mapdb/thread-weaver
testCompile 'junit:junit:4.12'
testCompile "org.mapdb:thread-weaver:3.0.mapdb"
}
Expand All @@ -56,25 +50,6 @@ jacocoTestReport {
}
}

processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'

// replace version and mcversion
expand 'version': project.version, 'mcversion': project.minecraft.version
}

// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}

jar {
from configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Sun Jan 26 20:15:46 MSK 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip
#Thu May 21 01:32:57 EDT 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
174 changes: 90 additions & 84 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright (c) 2020 LionZXY
* Copyright (c) 2020 132ikl
* This file is part of FastLogBlockServer.
*
* FastLogBlockServer is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FastLogBlockServer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with FastLogBlockServer. If not, see <https://www.gnu.org/licenses/>.
*/

package club.moddedminecraft.fastlogblockserver;

import club.moddedminecraft.fastlogblockserver.handlers.EventHandlingManager;
import club.moddedminecraft.fastlogblockserver.ui.InfoCommand;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.event.FMLServerStoppedEvent;

import java.io.IOException;

@Mod(modid = FastLogBlockServer.MODID, version = FastLogBlockServer.VERSION, updateJSON = "https://raw.githubusercontent.com/LionZXY/FastLogBlock/master/update.json", serverSideOnly = true, acceptableRemoteVersions = "*")
public class FastLogBlockServer {
public static final String MODID = "fastlogblockserver";
public static final String VERSION = "1.1.0";
private EventHandlingManager eventHandlingManager;

@EventHandler
public void preInit(FMLPreInitializationEvent event) throws IOException {
FMLLog.log.info("Initializing eventHandlingManager...");
eventHandlingManager = new EventHandlingManager();
FMLLog.log.info("Done!");
MinecraftForge.EVENT_BUS.register(eventHandlingManager);
MinecraftForge.EVENT_BUS.register(this);
}

@Mod.EventHandler
public void serverStarting(FMLServerStartingEvent event) {
event.registerServerCommand(new InfoCommand(eventHandlingManager));
}

@EventHandler
public void serverStopped(final FMLServerStoppedEvent event) {
eventHandlingManager.stop();
}
}
Loading