Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.hydramod.events.entities;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.nbt.NBTTagCompound;
- import net.minecraft.world.Explosion;
- import net.minecraft.world.World;
- public class EntityMeteorite extends Entity {
- public EntityMeteorite(World w) {
- super(w);
- this.setSize(50, 50);
- }
- @Override
- protected void entityInit() {
- }
- @Override
- public void onUpdate() {
- this.posX = this.posX - 0.5f;
- this.posY = this.posY - 1f;
- this.addVelocity(0, -50f, 0);
- if(this.onGround && !this.isDead)
- {
- this.setDead();
- this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 16f, true);
- }
- }
- @Override
- public boolean canRenderOnFire() {
- return true;
- }
- @Override
- public boolean canBePushed() {
- return false;
- }
- @Override
- public void onCollideWithPlayer(EntityPlayer p) {
- p.setDead();
- }
- @Override
- protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
- }
- @Override
- protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement