-
-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3edf741
Showing
544 changed files
with
198,600 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
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,20 @@ | ||
# Arclight | ||
|
||
A Bukkit server implementation utilizing Mixin. | ||
|
||
 | ||
|
||
## Installing | ||
|
||
1. Download the jar from release page or build server. | ||
2. Install Forge 28.2.0 in the folder. | ||
3. Keep forge jar name as `forge-1.14.4-28.2.0.jar` | ||
4. Launch with command `java -jar arclight-coremod-xxx.jar` | ||
|
||
## Contributing | ||
|
||
To setup development workspace, clone this repository and import the project. | ||
|
||
## License | ||
|
||
This project in licensed under [GPL v3](LICENSE). |
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,129 @@ | ||
buildscript { | ||
repositories { | ||
maven { url = 'https://files.minecraftforge.net/maven' } | ||
maven { url = 'https://repo.spongepowered.org/maven' } | ||
jcenter() | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true | ||
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT' | ||
} | ||
} | ||
|
||
apply plugin: 'net.minecraftforge.gradle' | ||
apply plugin: 'org.spongepowered.mixin' | ||
apply plugin: 'java' | ||
|
||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' | ||
|
||
configurations { | ||
embed | ||
embedJar | ||
compile.extendsFrom(embed, embedJar) | ||
} | ||
|
||
minecraft { | ||
mappings channel: 'stable', version: '58-1.14.4' | ||
accessTransformer = project.file('src/main/resources/META-INF/accesstransformer.cfg') | ||
runs { | ||
server { | ||
workingDirectory project.file('run') | ||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' | ||
property 'forge.logging.console.level', 'debug' | ||
mods { | ||
arclight { | ||
source sourceSets.main | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
maven { | ||
name = 'sponge-repo' | ||
url = 'https://repo.spongepowered.org/maven' | ||
} | ||
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots/' } | ||
maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' } | ||
maven { url = 'https://repo.codemc.io/repository/nms/' } | ||
maven { url = 'https://files.minecraftforge.net/maven/' } | ||
} | ||
|
||
def embedLibs = ['org.spongepowered:mixin:0.8', 'org.ow2.asm:asm-util:6.2', | ||
'org.ow2.asm:asm-analysis:6.2', 'org.yaml:snakeyaml:1.23', | ||
'net.md-5:bungeecord-chat:1.13-SNAPSHOT', 'org.xerial:sqlite-jdbc:3.28.0', | ||
'mysql:mysql-connector-java:5.1.47', 'commons-lang:commons-lang:2.6', | ||
'jline:jline:2.12.1', 'com.googlecode.json-simple:json-simple:1.1.1', | ||
'org.apache.logging.log4j:log4j-jul:2.11.2', 'net.md-5:SpecialSource:1.8.6', | ||
'net.minecraftforge:eventbus:2.0.0-milestone.1:service'] | ||
|
||
dependencies { | ||
minecraft 'net.minecraftforge:forge:1.14.4-28.2.0' | ||
compile group: 'org.jetbrains', name: 'annotations', version: '19.0.0' | ||
for (def lib : embedLibs) { | ||
embedJar "$lib@jar" | ||
} | ||
embed 'org.spigotmc:spigot-api:1.14.4-R0.1-SNAPSHOT@jar' | ||
embed files("$projectDir/libs/spigot-1.14.4-mapped-deobf.jar") | ||
} | ||
|
||
def getGitHash = { -> | ||
def stdout = new ByteArrayOutputStream() | ||
exec { | ||
commandLine 'git', 'rev-parse', '--short', 'HEAD' | ||
standardOutput = stdout | ||
} | ||
return stdout.toString().trim() | ||
} | ||
|
||
processResources { | ||
filesNotMatching("**/accesstransformer.cfg") { | ||
expand 'version': "1.14.4-${project.version}-${getGitHash()}" | ||
} | ||
} | ||
|
||
def classpath = { | ||
"libraries/org/ow2/asm/asm/6.2/asm-6.2.jar libraries/org/ow2/asm/asm-commons/6.2/asm-commons-6.2.jar libraries/org/ow2/asm/asm-tree/6.2/asm-tree-6.2.jar libraries/cpw/mods/modlauncher/4.1.0/modlauncher-4.1.0.jar libraries/cpw/mods/grossjava9hacks/1.1.0/grossjava9hacks-1.1.0.jar libraries/net/minecraftforge/accesstransformers/1.0.1-milestone.0.1+94458e7-shadowed/accesstransformers-1.0.1-milestone.0.1+94458e7-shadowed.jar libraries/net/minecraftforge/forgespi/1.5.0/forgespi-1.5.0.jar libraries/net/minecraftforge/coremods/1.0.0/coremods-1.0.0.jar libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar libraries/com/electronwill/night-config/core/3.6.0/core-3.6.0.jar libraries/com/electronwill/night-config/toml/3.6.0/toml-3.6.0.jar libraries/org/jline/jline/3.12.1/jline-3.12.1.jar libraries/org/apache/maven/maven-artifact/3.6.0/maven-artifact-3.6.0.jar libraries/net/jodah/typetools/0.6.0/typetools-0.6.0.jar libraries/java3d/vecmath/1.5.2/vecmath-1.5.2.jar libraries/org/apache/logging/log4j/log4j-api/2.11.2/log4j-api-2.11.2.jar libraries/org/apache/logging/log4j/log4j-core/2.11.2/log4j-core-2.11.2.jar libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar libraries/net/minecraft/server/1.14.4/server-1.14.4-extra-stable.jar " + | ||
embedLibs.collect { | ||
def arr = it.split(':') | ||
if (arr.length == 3) { | ||
return "libraries/${arr[0].replace('.', '/')}/${arr[1]}/${arr[2]}/${arr[1]}-${arr[2]}.jar" | ||
} else if (arr.length == 4) { | ||
return "libraries/${arr[0].replace('.', '/')}/${arr[1]}/${arr[2]}/${arr[1]}-${arr[2]}-${arr[3]}.jar" | ||
} else return "" | ||
}.join(' ') + " forge-1.14.4-28.2.0.jar" | ||
} | ||
|
||
jar { | ||
manifest.attributes 'MixinConnector': 'io.izzel.arclight.mod.ArclightConnector' | ||
manifest.attributes 'Main-Class': 'io.izzel.arclight.server.Main' | ||
manifest.attributes 'Class-Path': classpath() | ||
manifest.attributes 'Implementation-Title': 'Arclight' | ||
manifest.attributes 'Implementation-Version': "arclight-${project.version}-${getGitHash()}" | ||
manifest.attributes 'Implementation-Vendor': 'Arclight Team' | ||
from(configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }) { | ||
exclude "META-INF/MANIFEST.MF" | ||
exclude "META-INF/*.SF" | ||
exclude "META-INF/*.DSA" | ||
exclude "META-INF/*.RSA" | ||
exclude "LICENSE.txt" | ||
} | ||
into('libs') { | ||
from(configurations.embedJar.collect()) | ||
} | ||
into('META-INF') { | ||
from(files("${project(':scripts').projectDir}/bukkit_srg.srg")) | ||
from(files("${project(':scripts').projectDir}/resources/inheritanceMap.txt")) | ||
} | ||
} | ||
|
||
mixin { | ||
add sourceSets.main, 'mixins.arclight.refmap.json' | ||
} | ||
|
||
compileJava { | ||
options.compilerArgs << '-XDignore.symbol.file' << '-XDenableSunApiLintControl' | ||
} |
Binary file not shown.
9 changes: 9 additions & 0 deletions
9
arclight-coremod/src/main/java/io/izzel/arclight/bridge/advancement/AdvancementBridge.java
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,9 @@ | ||
package io.izzel.arclight.bridge.advancement; | ||
|
||
import org.bukkit.advancement.Advancement; | ||
|
||
public interface AdvancementBridge { | ||
|
||
Advancement bridge$getBukkit(); | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
arclight-coremod/src/main/java/io/izzel/arclight/bridge/block/BlockBridge.java
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,11 @@ | ||
package io.izzel.arclight.bridge.block; | ||
|
||
import net.minecraft.block.BlockState; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
|
||
public interface BlockBridge { | ||
|
||
int bridge$getExpDrop(BlockState blockState, World world, BlockPos blockPos, ItemStack itemStack); | ||
} |
9 changes: 9 additions & 0 deletions
9
arclight-coremod/src/main/java/io/izzel/arclight/bridge/block/NetherPortalBlockBridge.java
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,9 @@ | ||
package io.izzel.arclight.bridge.block; | ||
|
||
public interface NetherPortalBlockBridge { | ||
|
||
interface SizeBridge { | ||
|
||
boolean bridge$createPortal(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
arclight-coremod/src/main/java/io/izzel/arclight/bridge/bukkit/JavaPluginLoaderBridge.java
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,14 @@ | ||
package io.izzel.arclight.bridge.bukkit; | ||
|
||
|
||
import java.net.URLClassLoader; | ||
import java.util.List; | ||
|
||
public interface JavaPluginLoaderBridge { | ||
|
||
List<URLClassLoader> bridge$getLoaders(); | ||
|
||
Class<?> bridge$getClassByName(final String name); | ||
|
||
void bridge$setClass(final String name, final Class<?> clazz); | ||
} |
14 changes: 14 additions & 0 deletions
14
arclight-coremod/src/main/java/io/izzel/arclight/bridge/bukkit/MaterialBridge.java
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,14 @@ | ||
package io.izzel.arclight.bridge.bukkit; | ||
|
||
import org.bukkit.NamespacedKey; | ||
|
||
public interface MaterialBridge { | ||
|
||
void bridge$setKey(NamespacedKey namespacedKey); | ||
|
||
void bridge$setInternal(net.minecraft.block.material.Material internal); | ||
|
||
void bridge$setItem(); | ||
|
||
void bridge$setBlock(); | ||
} |
12 changes: 12 additions & 0 deletions
12
arclight-coremod/src/main/java/io/izzel/arclight/bridge/command/CommandSourceBridge.java
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,12 @@ | ||
package io.izzel.arclight.bridge.command; | ||
|
||
import com.mojang.brigadier.tree.CommandNode; | ||
|
||
public interface CommandSourceBridge { | ||
|
||
CommandNode<?> bridge$getCurrentCommand(); | ||
|
||
void bridge$setCurrentCommand(CommandNode<?> node); | ||
|
||
boolean bridge$hasPermission(int i, String bukkitPermission); | ||
} |
9 changes: 9 additions & 0 deletions
9
arclight-coremod/src/main/java/io/izzel/arclight/bridge/command/ICommandSourceBridge.java
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,9 @@ | ||
package io.izzel.arclight.bridge.command; | ||
|
||
import net.minecraft.command.CommandSource; | ||
import org.bukkit.command.CommandSender; | ||
|
||
public interface ICommandSourceBridge { | ||
|
||
CommandSender bridge$getBukkitSender(CommandSource wrapper); | ||
} |
10 changes: 10 additions & 0 deletions
10
...oremod/src/main/java/io/izzel/arclight/bridge/command/arguments/EntityArgumentBridge.java
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,10 @@ | ||
package io.izzel.arclight.bridge.command.arguments; | ||
|
||
import com.mojang.brigadier.StringReader; | ||
import com.mojang.brigadier.exceptions.CommandSyntaxException; | ||
import net.minecraft.command.arguments.EntitySelector; | ||
|
||
public interface EntityArgumentBridge { | ||
|
||
EntitySelector bridge$parse(StringReader reader, boolean overridePermissions) throws CommandSyntaxException; | ||
} |
11 changes: 11 additions & 0 deletions
11
.../src/main/java/io/izzel/arclight/bridge/command/arguments/EntitySelectorParserBridge.java
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,11 @@ | ||
package io.izzel.arclight.bridge.command.arguments; | ||
|
||
import com.mojang.brigadier.exceptions.CommandSyntaxException; | ||
import net.minecraft.command.arguments.EntitySelector; | ||
|
||
public interface EntitySelectorParserBridge { | ||
|
||
EntitySelector bridge$parse(boolean overridePermissions) throws CommandSyntaxException; | ||
|
||
void bridge$parseSelector(boolean overridePermissions) throws CommandSyntaxException; | ||
} |
13 changes: 13 additions & 0 deletions
13
...ht-coremod/src/main/java/io/izzel/arclight/bridge/entity/AreaEffectCloudEntityBridge.java
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,13 @@ | ||
package io.izzel.arclight.bridge.entity; | ||
|
||
public interface AreaEffectCloudEntityBridge { | ||
|
||
void bridge$refreshEffects(); | ||
|
||
interface Hack { | ||
|
||
String getType(); | ||
|
||
void setType(final String string); | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
arclight-coremod/src/main/java/io/izzel/arclight/bridge/entity/EntityBridge.java
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,55 @@ | ||
package io.izzel.arclight.bridge.entity; | ||
|
||
import io.izzel.arclight.bridge.command.ICommandSourceBridge; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.dimension.DimensionType; | ||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity; | ||
import org.bukkit.projectiles.ProjectileSource; | ||
|
||
import java.util.List; | ||
|
||
public interface EntityBridge extends ICommandSourceBridge { | ||
|
||
Entity bridge$teleportTo(DimensionType type, BlockPos blockPos); | ||
|
||
void bridge$setOnFire(int tick, boolean callEvent); | ||
|
||
CraftEntity bridge$getBukkitEntity(); | ||
|
||
void bridge$setBukkitEntity(CraftEntity craftEntity); | ||
|
||
boolean bridge$isPersist(); | ||
|
||
void bridge$setPersist(boolean persist); | ||
|
||
boolean bridge$isValid(); | ||
|
||
void bridge$setValid(boolean valid); | ||
|
||
ProjectileSource bridge$getProjectileSource(); | ||
|
||
void bridge$setProjectileSource(ProjectileSource projectileSource); | ||
|
||
float bridge$getBukkitYaw(); | ||
|
||
boolean bridge$isChunkLoaded(); | ||
|
||
boolean bridge$isForceExplosionKnockback(); | ||
|
||
void bridge$setForceExplosionKnockback(boolean forceExplosionKnockback); | ||
|
||
void bridge$postTick(); | ||
|
||
void bridge$burn(float amount); | ||
|
||
boolean bridge$removePassenger(Entity passenger); | ||
|
||
boolean bridge$addPassenger(Entity entity); | ||
|
||
List<Entity> bridge$getPassengers(); | ||
|
||
void bridge$setRideCooldown(int rideCooldown); | ||
|
||
int bridge$getRideCooldown(); | ||
} |
17 changes: 17 additions & 0 deletions
17
arclight-coremod/src/main/java/io/izzel/arclight/bridge/entity/EntityTypeBridge.java
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,17 @@ | ||
package io.izzel.arclight.bridge.entity; | ||
|
||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.SpawnReason; | ||
import net.minecraft.entity.player.PlayerEntity; | ||
import net.minecraft.nbt.CompoundNBT; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.util.text.ITextComponent; | ||
import net.minecraft.world.World; | ||
import org.bukkit.event.entity.CreatureSpawnEvent; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
public interface EntityTypeBridge<T extends Entity> { | ||
|
||
T bridge$spawnCreature(World worldIn, @Nullable CompoundNBT compound, @Nullable ITextComponent customName, @Nullable PlayerEntity playerIn, BlockPos pos, SpawnReason reason, boolean flag, boolean flag1, CreatureSpawnEvent.SpawnReason spawnReason); | ||
} |
8 changes: 8 additions & 0 deletions
8
arclight-coremod/src/main/java/io/izzel/arclight/bridge/entity/InternalEntityBridge.java
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,8 @@ | ||
package io.izzel.arclight.bridge.entity; | ||
|
||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity; | ||
|
||
public interface InternalEntityBridge { | ||
|
||
CraftEntity internal$getBukkitEntity(); | ||
} |
39 changes: 39 additions & 0 deletions
39
arclight-coremod/src/main/java/io/izzel/arclight/bridge/entity/LivingEntityBridge.java
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,39 @@ | ||
package io.izzel.arclight.bridge.entity; | ||
|
||
import net.minecraft.potion.Effect; | ||
import net.minecraft.potion.EffectInstance; | ||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftLivingEntity; | ||
import org.bukkit.event.entity.EntityPotionEffectEvent; | ||
import org.bukkit.event.entity.EntityRegainHealthEvent; | ||
|
||
import java.util.Optional; | ||
|
||
public interface LivingEntityBridge extends EntityBridge { | ||
|
||
boolean bridge$canPickUpLoot(); | ||
|
||
boolean bridge$isForceDrops(); | ||
|
||
int bridge$getExpReward(); | ||
|
||
void bridge$setExpToDrop(int amount); | ||
|
||
void bridge$pushHealReason(EntityRegainHealthEvent.RegainReason regainReason); | ||
|
||
void bridge$heal(float healAmount, EntityRegainHealthEvent.RegainReason regainReason); | ||
|
||
void bridge$pushEffectCause(EntityPotionEffectEvent.Cause cause); | ||
|
||
boolean bridge$addEffect(EffectInstance effect, EntityPotionEffectEvent.Cause cause); | ||
|
||
boolean bridge$removeEffect(Effect effect, EntityPotionEffectEvent.Cause cause); | ||
|
||
boolean bridge$removeAllEffects(EntityPotionEffectEvent.Cause cause); | ||
|
||
Optional<EntityPotionEffectEvent.Cause> bridge$getEffectCause(); | ||
|
||
EntityPotionEffectEvent.Action bridge$getAndResetAction(); | ||
|
||
@Override | ||
CraftLivingEntity bridge$getBukkitEntity(); | ||
} |
Oops, something went wrong.