[Bleeding] Set dependency for dev-module to CB 1.5.2-R0.1.

This commit is contained in:
asofold 2013-05-01 20:36:16 +02:00
parent 00a240ff9a
commit 5e8cf481a1
4 changed files with 40 additions and 39 deletions

View File

@ -22,7 +22,7 @@
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId> <artifactId>craftbukkit</artifactId>
<version>1.5.1-R0.3-SNAPSHOT</version> <version>1.5.2-R0.1-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -3,16 +3,16 @@ package fr.neatmonster.nocheatplus.compat.cbdev;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import net.minecraft.server.v1_5_R2.AxisAlignedBB; import net.minecraft.server.v1_5_R3.AxisAlignedBB;
import net.minecraft.server.v1_5_R2.EntityBoat; import net.minecraft.server.v1_5_R3.EntityBoat;
import net.minecraft.server.v1_5_R2.IBlockAccess; import net.minecraft.server.v1_5_R3.IBlockAccess;
import net.minecraft.server.v1_5_R2.Material; import net.minecraft.server.v1_5_R3.Material;
import net.minecraft.server.v1_5_R2.TileEntity; import net.minecraft.server.v1_5_R3.TileEntity;
import net.minecraft.server.v1_5_R2.Vec3DPool; import net.minecraft.server.v1_5_R3.Vec3DPool;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.craftbukkit.v1_5_R2.CraftWorld; import org.bukkit.craftbukkit.v1_5_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_5_R2.entity.CraftEntity; import org.bukkit.craftbukkit.v1_5_R3.entity.CraftEntity;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import fr.neatmonster.nocheatplus.utilities.BlockCache; import fr.neatmonster.nocheatplus.utilities.BlockCache;
@ -22,7 +22,7 @@ public class BlockCacheCBDev extends BlockCache implements IBlockAccess{
/** Box for one time use, no nesting, no extra storing this(!). */ /** Box for one time use, no nesting, no extra storing this(!). */
protected static final AxisAlignedBB useBox = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); protected static final AxisAlignedBB useBox = AxisAlignedBB.a(0, 0, 0, 0, 0, 0);
protected net.minecraft.server.v1_5_R2.World world; protected net.minecraft.server.v1_5_R3.World world;
public BlockCacheCBDev(World world) { public BlockCacheCBDev(World world) {
setAccess(world); setAccess(world);
@ -48,7 +48,7 @@ public class BlockCacheCBDev extends BlockCache implements IBlockAccess{
// TODO: change api for this / use nodes (!) // TODO: change api for this / use nodes (!)
final int id = getTypeId(x, y, z); final int id = getTypeId(x, y, z);
final net.minecraft.server.v1_5_R2.Block block = net.minecraft.server.v1_5_R2.Block.byId[id]; final net.minecraft.server.v1_5_R3.Block block = net.minecraft.server.v1_5_R3.Block.byId[id];
if (block == null) return null; if (block == null) return null;
block.updateShape(this, x, y, z); // TODO: use THIS instead of world. block.updateShape(this, x, y, z); // TODO: use THIS instead of world.
@ -61,7 +61,7 @@ public class BlockCacheCBDev extends BlockCache implements IBlockAccess{
try{ try{
// TODO: Probably check other ids too before doing this ? // TODO: Probably check other ids too before doing this ?
final net.minecraft.server.v1_5_R2.Entity mcEntity = ((CraftEntity) entity).getHandle(); final net.minecraft.server.v1_5_R3.Entity mcEntity = ((CraftEntity) entity).getHandle();
final AxisAlignedBB box = useBox.b(minX, minY, minZ, maxX, maxY, maxZ); final AxisAlignedBB box = useBox.b(minX, minY, minZ, maxX, maxY, maxZ);
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
@ -69,7 +69,7 @@ public class BlockCacheCBDev extends BlockCache implements IBlockAccess{
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
final Iterator iterator = list.iterator(); final Iterator iterator = list.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
final net.minecraft.server.v1_5_R2.Entity other = (net.minecraft.server.v1_5_R2.Entity) iterator.next(); final net.minecraft.server.v1_5_R3.Entity other = (net.minecraft.server.v1_5_R3.Entity) iterator.next();
if (!(other instanceof EntityBoat)){ // && !(other instanceof EntityMinecart)) continue; if (!(other instanceof EntityBoat)){ // && !(other instanceof EntityMinecart)) continue;
continue; continue;
} }

View File

@ -1,19 +1,19 @@
package fr.neatmonster.nocheatplus.compat.cbdev; package fr.neatmonster.nocheatplus.compat.cbdev;
import net.minecraft.server.v1_5_R2.AxisAlignedBB; import net.minecraft.server.v1_5_R3.AxisAlignedBB;
import net.minecraft.server.v1_5_R2.Block; import net.minecraft.server.v1_5_R3.Block;
import net.minecraft.server.v1_5_R2.DamageSource; import net.minecraft.server.v1_5_R3.DamageSource;
import net.minecraft.server.v1_5_R2.EntityComplexPart; import net.minecraft.server.v1_5_R3.EntityComplexPart;
import net.minecraft.server.v1_5_R2.EntityPlayer; import net.minecraft.server.v1_5_R3.EntityPlayer;
import net.minecraft.server.v1_5_R2.MobEffectList; import net.minecraft.server.v1_5_R3.MobEffectList;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.command.CommandMap; import org.bukkit.command.CommandMap;
import org.bukkit.craftbukkit.v1_5_R2.CraftServer; import org.bukkit.craftbukkit.v1_5_R3.CraftServer;
import org.bukkit.craftbukkit.v1_5_R2.entity.CraftEntity; import org.bukkit.craftbukkit.v1_5_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_5_R2.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_5_R3.entity.CraftPlayer;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -31,18 +31,18 @@ public class MCAccessCBDev implements MCAccess{
*/ */
public MCAccessCBDev(){ public MCAccessCBDev(){
getCommandMap(); getCommandMap();
ReflectionUtil.checkMembers("net.minecraft.server.v1_5_R2.", new String[]{"Entity" , "dead"}); ReflectionUtil.checkMembers("net.minecraft.server.v1_5_R3.", new String[]{"Entity" , "dead"});
} }
@Override @Override
public String getMCVersion() { public String getMCVersion() {
// 1_5_R2 // 1_5_R3
return "1.5.1"; return "1.5.2";
} }
@Override @Override
public String getServerVersionTag() { public String getServerVersionTag() {
return "CB2691-DEV"; return "CB2763-DEV";
} }
@Override @Override
@ -57,7 +57,7 @@ public class MCAccessCBDev implements MCAccess{
@Override @Override
public double getHeight(final Entity entity) { public double getHeight(final Entity entity) {
final net.minecraft.server.v1_5_R2.Entity mcEntity = ((CraftEntity) entity).getHandle(); final net.minecraft.server.v1_5_R3.Entity mcEntity = ((CraftEntity) entity).getHandle();
final double entityHeight = Math.max(mcEntity.length, Math.max(mcEntity.height, mcEntity.boundingBox.e - mcEntity.boundingBox.b)); final double entityHeight = Math.max(mcEntity.length, Math.max(mcEntity.height, mcEntity.boundingBox.e - mcEntity.boundingBox.b));
if (entity instanceof LivingEntity) { if (entity instanceof LivingEntity) {
return Math.max(((LivingEntity) entity).getEyeHeight(), entityHeight); return Math.max(((LivingEntity) entity).getEyeHeight(), entityHeight);
@ -106,7 +106,7 @@ public class MCAccessCBDev implements MCAccess{
@Override @Override
public double getJumpAmplifier(final Player player) { public double getJumpAmplifier(final Player player) {
final net.minecraft.server.v1_5_R2.EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle(); final net.minecraft.server.v1_5_R3.EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle();
if (mcPlayer.hasEffect(MobEffectList.JUMP)) return mcPlayer.getEffect(MobEffectList.JUMP).getAmplifier(); if (mcPlayer.hasEffect(MobEffectList.JUMP)) return mcPlayer.getEffect(MobEffectList.JUMP).getAmplifier();
else return Double.NEGATIVE_INFINITY; else return Double.NEGATIVE_INFINITY;
@ -114,7 +114,7 @@ public class MCAccessCBDev implements MCAccess{
@Override @Override
public double getFasterMovementAmplifier(final Player player) { public double getFasterMovementAmplifier(final Player player) {
final net.minecraft.server.v1_5_R2.EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle(); final net.minecraft.server.v1_5_R3.EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle();
if (mcPlayer.hasEffect(MobEffectList.FASTER_MOVEMENT)) return mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier(); if (mcPlayer.hasEffect(MobEffectList.FASTER_MOVEMENT)) return mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier();
else return Double.NEGATIVE_INFINITY; else return Double.NEGATIVE_INFINITY;
} }
@ -141,13 +141,13 @@ public class MCAccessCBDev implements MCAccess{
@Override @Override
public boolean shouldBeZombie(final Player player) { public boolean shouldBeZombie(final Player player) {
final net.minecraft.server.v1_5_R2.EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle(); final net.minecraft.server.v1_5_R3.EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle();
return !mcPlayer.dead && mcPlayer.getHealth() <= 0 ; return !mcPlayer.dead && mcPlayer.getHealth() <= 0 ;
} }
@Override @Override
public void setDead(final Player player, final int deathTicks) { public void setDead(final Player player, final int deathTicks) {
final net.minecraft.server.v1_5_R2.EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle(); final net.minecraft.server.v1_5_R3.EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle();
mcPlayer.deathTicks = deathTicks; mcPlayer.deathTicks = deathTicks;
mcPlayer.dead = true; mcPlayer.dead = true;
} }

View File

@ -10,6 +10,7 @@ import fr.neatmonster.nocheatplus.compat.cb2545.MCAccessCB2545;
import fr.neatmonster.nocheatplus.compat.cb2602.MCAccessCB2602; import fr.neatmonster.nocheatplus.compat.cb2602.MCAccessCB2602;
import fr.neatmonster.nocheatplus.compat.cb2645.MCAccessCB2645; import fr.neatmonster.nocheatplus.compat.cb2645.MCAccessCB2645;
import fr.neatmonster.nocheatplus.compat.cb2691.MCAccessCB2691; import fr.neatmonster.nocheatplus.compat.cb2691.MCAccessCB2691;
import fr.neatmonster.nocheatplus.compat.cbdev.MCAccessCBDev;
import fr.neatmonster.nocheatplus.config.ConfPaths; import fr.neatmonster.nocheatplus.config.ConfPaths;
import fr.neatmonster.nocheatplus.config.ConfigManager; import fr.neatmonster.nocheatplus.config.ConfigManager;
import fr.neatmonster.nocheatplus.logging.LogUtil; import fr.neatmonster.nocheatplus.logging.LogUtil;
@ -49,14 +50,14 @@ public class MCAccessFactory {
if (!bukkitOnly){ if (!bukkitOnly){
// TEST // // TEST //
// // Only add as long as no stable module has been added. // Only add as long as no stable module has been added.
// // 1.5.1 // 1.5.2
// try{ try{
// return new MCAccessCBDev(); return new MCAccessCBDev();
// } }
// catch(Throwable t){ catch(Throwable t){
// throwables.add(t); throwables.add(t);
// }; };
// TEST END // // TEST END //
// 1.5.1 (cb beta) // 1.5.1 (cb beta)