Jump to content

Krazykid1117

Members
  • Posts

    2
  • Joined

  • Last visited

Converted

  • Gender
    Male

Krazykid1117's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. How do I get this to happen on the server's side? (If this is something very simple that I am missing I am sorry I am new to coding.)
  2. I have a grenade in my mod which is thrown and on contact with an object or entity explodes. the explosion does not hurt entities and appears to break blocks but the blocks are only invisible. When you leave the world and get back on it the blocks revert to being visible again. If anyone could tell me how to fix this that would be great! Code for the grenade entity below. package com.krazykid1117.entity; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; public class EntityGrenade extends EntityThrowable{ public EntityGrenade(World p_i1776_1_) { super(p_i1776_1_); } public EntityGrenade(World world, EntityLivingBase entity){ super(world, entity); } @Override protected void onImpact(MovingObjectPosition p_70184_1_) { for(int i = 0; i < 10; i ++){ this.worldObj.spawnParticle("largesmoke", this.posX, this.posY, this.posZ, 0f, 0f, 0f); } if(!this.worldObj.isRemote); this.setDead(); if(this.worldObj.isRemote){ this.worldObj.createExplosion((Entity) null, this.posX, this.posY, this.posZ, 5.0f, true); } } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.