mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 02:25:49 +01:00
Removed final parts of chunk loading for beacons
This commit is contained in:
parent
dbf101bb4e
commit
af2ded09b5
@ -4,7 +4,7 @@ apply plugin: 'idea'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
group = 'com.sekwah.advancedportals'
|
||||
version = '0.0.49-snapshot'
|
||||
version = '0.0.50-snapshot'
|
||||
|
||||
description = ""
|
||||
|
||||
@ -27,7 +27,7 @@ repositories {
|
||||
|
||||
// includeLibs just says to include the library in the final jar
|
||||
dependencies {
|
||||
compile "org.bukkit:bukkit:1.13-R0.1-SNAPSHOT"
|
||||
compile "org.bukkit:bukkit:1.14.1-R0.1-SNAPSHOT"
|
||||
compile "io.netty:netty-all:4.0.4.Final"
|
||||
}
|
||||
|
||||
|
@ -39,9 +39,10 @@ public class AdvancedPortalsPlugin extends JavaPlugin {
|
||||
|
||||
ConfigAccessor config = new ConfigAccessor(this, "config.yml");
|
||||
|
||||
if(config.getConfig().getBoolean("DisableGatewayBeam", true)) {
|
||||
// TODO reenable and finish but probably focus on the recode first
|
||||
/*if(config.getConfig().getBoolean("DisableGatewayBeam", true)) {
|
||||
new PacketInjector(this, version);
|
||||
}
|
||||
}*/
|
||||
|
||||
ConfigAccessor portalConfig = new ConfigAccessor(this, "portals.yml");
|
||||
portalConfig.saveDefaultConfig();
|
||||
|
@ -34,15 +34,6 @@ public class CraftBukkit {
|
||||
private Method sendPacket;
|
||||
|
||||
|
||||
// Data for beacon
|
||||
private Class<?> endGatewayClass;
|
||||
private Class<?> tileEntityEndGatewayClass;
|
||||
private Constructor<?> blockPositionConstructor;
|
||||
private Method getWorldHandleMethod;
|
||||
private Method getTileEntityMethod;
|
||||
private Field getEntityTimeoutField;
|
||||
|
||||
|
||||
public CraftBukkit(AdvancedPortalsPlugin plugin, String bukkitImpl) throws ClassNotFoundException, NoSuchFieldException, NoSuchMethodException {
|
||||
|
||||
this.plugin = plugin;
|
||||
@ -70,23 +61,6 @@ public class CraftBukkit {
|
||||
Class<?> packet = Class.forName(minecraftPackage + "Packet");
|
||||
this.sendPacket = playerConnection.getType().getMethod("sendPacket", packet);
|
||||
|
||||
// Data for beacon
|
||||
this.endGatewayClass = Class.forName(craftBukkitPackage + "block.CraftEndGateway");
|
||||
this.tileEntityEndGatewayClass = Class.forName(minecraftPackage + "TileEntityEndGateway");
|
||||
|
||||
Class<?> blockPos = Class.forName(minecraftPackage + "BlockPosition");
|
||||
|
||||
this.blockPositionConstructor = blockPos.getConstructor(int.class, int.class, int.class);
|
||||
|
||||
getWorldHandleMethod = Class.forName(craftBukkitPackage + "CraftWorld").getMethod("getHandle");
|
||||
|
||||
//getTileEntityMethod = Class.forName(minecraftPackage + "WorldServer").getMethod("getTileEntity", blockPos);
|
||||
|
||||
/*getEntityTimeoutField = ReflectionHelper.getFieldByType(Class.forName(minecraftPackage + "TileEntityEndGateway"), int.class, false);
|
||||
if(getEntityTimeoutField != null) {
|
||||
this.plugin.getLogger().info("Got field " + getEntityTimeoutField.getName() + " from TileEntityEndGateway");
|
||||
}*/
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
plugin.getLogger().warning("Attempting to use backup porekit locations");
|
||||
|
@ -12,7 +12,6 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.world.ChunkLoadEvent;
|
||||
|
||||
public class PortalPlacer implements Listener {
|
||||
|
||||
@ -61,18 +60,6 @@ public class PortalPlacer implements Listener {
|
||||
|
||||
}
|
||||
|
||||
/*@EventHandler
|
||||
public void onChunkLoad(ChunkLoadEvent event) {
|
||||
if(!this.DISABLE_GATEWAY_BEAM) {
|
||||
return;
|
||||
}
|
||||
BlockState[] tileEntities = event.getChunk().getTileEntities();
|
||||
for(BlockState block : tileEntities) {
|
||||
this.plugin.compat.setGatewayAgeHigh(block.getBlock());
|
||||
}
|
||||
//event.getHandlers();
|
||||
}*/
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onBlockPhysics(BlockPhysicsEvent event) {
|
||||
Block block = event.getBlock();
|
||||
|
@ -1,6 +1,6 @@
|
||||
main: com.sekwah.advancedportals.AdvancedPortalsPlugin
|
||||
name: AdvancedPortals
|
||||
version: 0.0.49
|
||||
version: 0.0.50
|
||||
author: sekwah41
|
||||
description: An advanced portals plugin for bukkit.
|
||||
api-version: 1.13
|
||||
|
Loading…
Reference in New Issue
Block a user