Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ForgeSubscribe
- public void onUpdate(LivingUpdateEvent event) {
- EntityLivingBase entity = event.entityLiving;
- if (entity instanceof EntityPlayer) {
- if (((EntityPlayer) entity).capabilities.isCreativeMode == true) {
- return;
- } else if (((EntityPlayer) entity).capabilities.isCreativeMode == false) {
- BiomeGenBase location = event.entityLiving.worldObj.getBiomeGenForCoords((int) event.entityLiving.posX, (int) event.entityLiving.posZ);
- if (location == BiomeGenBase.hell) {
- ((EntityPlayer) entity).addChatMessage("Vous devez retournez sur le rivage !");
- /**
- * Je n'ai pas trouv� comment attendre 10 secondes, d�sol�
- * :)
- */
- if (location == BiomeGenBase.hell) {
- entity.addPotionEffect(new PotionEffect(Potion.blindness.id, 2000, 4));
- entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 2000, 4));
- entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2000, 4));
- }
- /**
- * Ici pareil
- */
- BiomeGenBase nextLocationPos = entity.worldObj.getBiomeGenForCoords((int) entity.posX + 51, (int) entity.posZ + 51);
- BiomeGenBase nextLocationNeg = entity.worldObj.getBiomeGenForCoords((int) entity.posX - 51, (int) entity.posZ - 51);
- if (nextLocationPos != BiomeGenBase.hell) {
- entity.posX += 51;
- entity.posZ += 51;
- ((EntityPlayer) entity).addChatMessage("La mer vous a rejet� ici...");
- } else if (nextLocationNeg != BiomeGenBase.hell) {
- entity.posX -= 51;
- entity.posZ -= 51;
- ((EntityPlayer) entity).addChatMessage("La mer vous a rejet� ici...");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment