Skip to content

Commit 92def58

Browse files
author
Matsv
committed
Push everything to GitHub
Reformat code / Optimize imports Rewrite blocks correctly. Cleanup and organize code. Create a basic Entity tracker system. It works like shit, but hey. It is the start. Release first version.
1 parent 2968286 commit 92def58

25 files changed

+2197
-0
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
##### What version of ViaBackwards are you using? Type /ver ViaBackwards:
2+
3+
4+
##### What version of ViaVersion are you using? Type /ver ViaVersion:
5+
6+
7+
##### What version of Spigot are you using? Type /ver:
8+
9+
10+
##### What plugins are you using? Type /plugins:
11+
12+
13+
##### How/when does this error happen? login?:
14+
15+
16+
##### Is there an error in the console? Use pastebin.com. Is there a kick message?:
17+

.gitignore

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Maven template
3+
target/
4+
pom.xml.tag
5+
pom.xml.releaseBackup
6+
pom.xml.versionsBackup
7+
pom.xml.next
8+
release.properties
9+
dependency-reduced-pom.xml
10+
buildNumber.properties
11+
.mvn/timing.properties
12+
### NetBeans template
13+
nbproject/private/
14+
build/
15+
nbbuild/
16+
dist/
17+
nbdist/
18+
nbactions.xml
19+
.nb-gradle/
20+
### Eclipse template
21+
22+
.metadata
23+
bin/
24+
tmp/
25+
*.tmp
26+
*.bak
27+
*.swp
28+
*~.nib
29+
local.properties
30+
.settings/
31+
.loadpath
32+
.recommenders
33+
34+
# Eclipse Core
35+
.project
36+
37+
# External tool builders
38+
.externalToolBuilders/
39+
40+
# Locally stored "Eclipse launch configurations"
41+
*.launch
42+
43+
# PyDev specific (Python IDE for Eclipse)
44+
*.pydevproject
45+
46+
# CDT-specific (C/C++ Development Tooling)
47+
.cproject
48+
49+
# JDT-specific (Eclipse Java Development Tools)
50+
.classpath
51+
52+
# Java annotation processor (APT)
53+
.factorypath
54+
55+
# PDT-specific (PHP Development Tools)
56+
.buildpath
57+
58+
# sbteclipse plugin
59+
.target
60+
61+
# Tern plugin
62+
.tern-project
63+
64+
# TeXlipse plugin
65+
.texlipse
66+
67+
# STS (Spring Tool Suite)
68+
.springBeans
69+
70+
# Code Recommenders
71+
.recommenders/
72+
### JetBrains template
73+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
74+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
75+
76+
# User-specific stuff:
77+
.idea/workspace.xml
78+
.idea/tasks.xml
79+
.idea/dictionaries
80+
.idea/vcs.xml
81+
.idea/jsLibraryMappings.xml
82+
83+
# Sensitive or high-churn files:
84+
.idea/dataSources.ids
85+
.idea/dataSources.xml
86+
.idea/dataSources.local.xml
87+
.idea/sqlDataSources.xml
88+
.idea/dynamic.xml
89+
.idea/uiDesigner.xml
90+
91+
# Gradle:
92+
.idea/gradle.xml
93+
.idea/libraries
94+
95+
# Mongo Explorer plugin:
96+
.idea/mongoSettings.xml
97+
98+
## File-based project format:
99+
*.iws
100+
101+
## Plugin-specific files:
102+
103+
# IntelliJ
104+
/out/
105+
106+
# mpeltonen/sbt-idea plugin
107+
.idea_modules/
108+
109+
# JIRA plugin
110+
atlassian-ide-plugin.xml
111+
112+
# Crashlytics plugin (for Android Studio and IntelliJ)
113+
com_crashlytics_export_strings.xml
114+
crashlytics.properties
115+
crashlytics-build.properties
116+
fabric.properties
117+
### Java template
118+
*.class
119+
120+
# Mobile Tools for Java (J2ME)
121+
.mtj.tmp/
122+
123+
# Package Files #
124+
*.jar
125+
*.war
126+
*.ear
127+
128+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
129+
hs_err_pid*
130+

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# ViaBackwards
2+
3+
Allows 1.9.x on a 1.10 Spigot server.
4+
Requires [ViaVersion](http://viaversion.com) to be installed
5+
6+
TODO:
7+
- [ ] Cleanup code
8+
- [ ] Improve the rewriters
9+
- [ ] Make it possible to send metadata with the rewriteEntityId
10+
- [ ] Add support for sound names
11+
- [ ] Create JavaDocs
12+
- [ ] Improve the Entity tracker system to work good with multiple versions.
13+
- [ ] Make it possible to choose your own replacement blocks

pom.xml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~
4+
~ Copyright (C) 2016 Matsv
5+
~
6+
~ This program is free software: you can redistribute it and/or modify
7+
~ it under the terms of the GNU General Public License as published by
8+
~ the Free Software Foundation, either version 3 of the License, or
9+
~ (at your option) any later version.
10+
~
11+
~ This program is distributed in the hope that it will be useful,
12+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
~ GNU General Public License for more details.
15+
~
16+
~ You should have received a copy of the GNU General Public License
17+
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
-->
19+
20+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xmlns="http://maven.apache.org/POM/4.0.0"
22+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23+
<modelVersion>4.0.0</modelVersion>
24+
25+
<groupId>nl.matsv</groupId>
26+
<artifactId>viabackwards</artifactId>
27+
<version>1.0</version>
28+
29+
<repositories>
30+
<repository>
31+
<id>spigot-repo</id>
32+
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
33+
</repository>
34+
<repository>
35+
<id>viaversion-repo</id>
36+
<url>https://repo.viaversion.com/</url>
37+
</repository>
38+
</repositories>
39+
40+
<dependencies>
41+
<dependency>
42+
<groupId>org.spigotmc</groupId>
43+
<artifactId>spigot-api</artifactId>
44+
<version>1.10.2-R0.1-SNAPSHOT</version>
45+
<scope>provided</scope>
46+
</dependency>
47+
<dependency>
48+
<groupId>us.myles</groupId>
49+
<artifactId>viaversion</artifactId>
50+
<version>0.9.8-SNAPSHOT</version>
51+
</dependency>
52+
<!-- Netty (Network Library) -->
53+
<dependency>
54+
<groupId>io.netty</groupId>
55+
<artifactId>netty-all</artifactId>
56+
<version>4.0.20.Final</version>
57+
<scope>provided</scope>
58+
<optional>true</optional>
59+
</dependency>
60+
<!-- Lombok -->
61+
<dependency>
62+
<groupId>org.projectlombok</groupId>
63+
<artifactId>lombok</artifactId>
64+
<version>1.16.6</version>
65+
<scope>provided</scope>
66+
</dependency>
67+
</dependencies>
68+
69+
<build>
70+
<finalName>${project.name}-${project.version}</finalName>
71+
<sourceDirectory>src/main/java</sourceDirectory>
72+
<defaultGoal>clean install</defaultGoal>
73+
74+
<resources>
75+
<resource>
76+
<targetPath>.</targetPath>
77+
<filtering>false</filtering>
78+
<directory>.</directory>
79+
<includes>
80+
<include>LICENSE</include>
81+
</includes>
82+
</resource>
83+
<resource>
84+
<targetPath>.</targetPath>
85+
<filtering>true</filtering>
86+
<directory>src/main/resources/</directory>
87+
<includes>
88+
<include>*</include>
89+
</includes>
90+
</resource>
91+
</resources>
92+
<plugins>
93+
<plugin>
94+
<groupId>org.apache.maven.plugins</groupId>
95+
<artifactId>maven-compiler-plugin</artifactId>
96+
<version>3.3</version>
97+
<configuration>
98+
<source>1.8</source>
99+
<target>1.8</target>
100+
<showWarnings>false</showWarnings>
101+
<showDeprecation>false</showDeprecation>
102+
</configuration>
103+
</plugin>
104+
</plugins>
105+
</build>
106+
</project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
*
3+
* Copyright (C) 2016 Matsv
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
package nl.matsv.viabackwards;
20+
21+
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.Protocol1_9To1_10;
22+
import org.bukkit.plugin.java.JavaPlugin;
23+
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
24+
import us.myles.ViaVersion.api.protocol.ProtocolVersion;
25+
26+
import java.util.Collections;
27+
28+
public class ViaBackwards extends JavaPlugin {
29+
30+
@Override
31+
public void onEnable() {
32+
// Register the protocol
33+
ProtocolRegistry.registerProtocol(new Protocol1_9To1_10(), Collections.singletonList(ProtocolVersion.v1_9_3.getId()), ProtocolVersion.v1_10.getId());
34+
}
35+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
*
3+
* Copyright (C) 2016 Matsv
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
package nl.matsv.viabackwards.api;
20+
21+
import us.myles.ViaVersion.api.protocol.Protocol;
22+
23+
public abstract class BackwardsProtocol extends Protocol {
24+
25+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
*
3+
* Copyright (C) 2016 Matsv
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
package nl.matsv.viabackwards.api;
20+
21+
import nl.matsv.viabackwards.api.exceptions.RemovedValueException;
22+
import us.myles.ViaVersion.api.minecraft.metadata.Metadata;
23+
24+
public interface MetaRewriter {
25+
Metadata handleMetadata(boolean isObject, int entityType, Metadata data) throws RemovedValueException;
26+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
*
3+
* Copyright (C) 2016 Matsv
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
package nl.matsv.viabackwards.api.exceptions;
20+
21+
import java.io.IOException;
22+
23+
public class RemovedValueException extends IOException {
24+
}

0 commit comments

Comments
 (0)