Removed final parts of chunk loading for beacons

This commit is contained in:
Sekwah 2019-05-25 02:31:38 +01:00
parent dbf101bb4e
commit af2ded09b5
5 changed files with 6 additions and 44 deletions

View File

@ -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"
}

View File

@ -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();

View File

@ -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");

View File

@ -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();

View File

@ -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