Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Is there any way to have an entity that emits light (no I don't mean like getBrightness)? Kind of like a moving glowstone? I know lightning does something like that but I don't know if that is what I'm looking for. Any ideas?

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

You could make an invisible block that emits light, and have your entity place/destroy it constantly at its position.

Maker of the Craft++ mod.

What kind of entity are you talking about? and item entity, living entity, ect??? I do have some code I could explain to you for  a living entity.

 

Also, what version are you doing this in?

  • Author

What kind of entity are you talking about? and item entity, living entity, ect??? I do have some code I could explain to you for  a living entity.

 

Also, what version are you doing this in?

 

1.7.10

It is a throwable entity but any code would help :)

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

what this does is it takes the location of your entity and sets the light of that block to 16 (with code as is) you can change this by changing the 16 to whatever you want the light level to be.

private void addLight() {
	this.worldObj.setLightValue(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ, 16);
	this.worldObj.markBlockRangeForRenderUpdate((int) this.posX,
			(int) this.posY, (int) this.posX, 12, 12, 12);
	this.worldObj.markBlockForUpdate((int) this.posX, (int) this.posY,
			(int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY + 1, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY - 1, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block,
			(int) this.posX + 1, (int) this.posY, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block,
			(int) this.posX - 1, (int) this.posY, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ + 1);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ - 1);
}

 

to call on it put this in your LivingUpdate method:

addLight();

 

also add this to the very end of your LivingUpdate to remove the light when you remove the entity

if (this.isDead) {
this.worldObj.updateLightByType(EnumSkyBlock.Block,
		(int) this.posX, (int) this.posY, (int) this.posZ);
}

this will force the block to update its light to where it should be.

  • Author

what this does is it takes the location of your entity and sets the light of that block to 16 (with code as is) you can change this by changing the 16 to whatever you want the light level to be.

private void addLight() {
	this.worldObj.setLightValue(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ, 16);
	this.worldObj.markBlockRangeForRenderUpdate((int) this.posX,
			(int) this.posY, (int) this.posX, 12, 12, 12);
	this.worldObj.markBlockForUpdate((int) this.posX, (int) this.posY,
			(int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY + 1, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY - 1, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block,
			(int) this.posX + 1, (int) this.posY, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block,
			(int) this.posX - 1, (int) this.posY, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ + 1);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ - 1);
}

 

to call on it put this in your LivingUpdate method:

addLight();

 

also add this to the very end of your LivingUpdate to remove the light when you remove the entity

if (this.isDead) {
this.worldObj.updateLightByType(EnumSkyBlock.Block,
		(int) this.posX, (int) this.posY, (int) this.posZ);
}

this will force the block to update its light to where it should be.

Thanks! This is along the lines of what I had, I just couldn't quite get there. Could you explain what the update light by type does?

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

it tells the block to update its light level based on the light level of blocks around it and the sky. for in the addLight() method, it updates the blocks around the block the entity is in to cause the light to reach out until it is at its limits. the call when the entity is dead causes the source block to check its light level based on the sky and block light sources, therefore causing it to reset.

 

to explain the code in detail

 

this.worldObj.setLightValue(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ, 16);

 

you should know what this.worldObj is. EnumSkyBlock.Block tell the server what type of light you are modifying, in this case, you are modifying block light. You really shouldn't need to change sky light because that will effect the whole world. (int) this.posX + 1, (int) this.posY, (int) this.posZ is the block position relative to the entity. 16 is the light level you are setting the block to.

 

this.worldObj.updateLightByType(EnumSkyBlock.Block,
			(int) this.posX + 1, (int) this.posY, (int) this.posZ);

 

this is pretty much the same as the setLightValue method, just without the 16, and shouldn't be the same block as the setLightValue, otherwise your block light level will reset.

  • Author

Wow thanks

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

What happens to the blocks that are previously set while the entity moves?  Do they automatically reset every tick, or will this leave a trail of lighted blocks?  Also, does the light value setting work on air blocks?

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Unless the entity is moving faster than 1 block per tick, then the light update lines will remove old light source blocks the entity created. Also, the light value works on all blocks. You can see the code working if you use my mod, Mo Chickens, and spawn in the glowing chicken. I made this bit of code to be the best option to giving entities light and not having to make an invisible block. Entities this should not be used on are any entities that teleport around. But you could use it if you modify the light updates to use entities previous position, which is stored by the game.

  • Author

So I tryed using that on my projectile, which just stays in place atm. I have the add light method in the onUpdate method and it doesn't light anything up. Is there anything I should change?

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

The issue is onUpdate is not called every tick, you need to put it in onLivingUpdate, which I am no sure if a projectile has a living update. It only works in onLivingUpdate because onLivingUpdate is called every tick, unlike onUpdate.

  • Author

Ok so I set up an addLight() thing for a player tick event, and everything is working but the addLight isn't doing anything. Here is my code:

 

@SubscribeEvent
public void onTick(TickEvent.PlayerTickEvent evt){
	this.addLight(evt.player.worldObj, evt.player);
}
private void addLight(World world, EntityPlayer player) {
	world.setLightValue(EnumSkyBlock.Block, (int) player.posX,
			(int) player.posY, (int) player.posZ, 16);
	world.markBlockRangeForRenderUpdate((int) player.posX,
			(int) player.posY, (int) player.posX, 12, 12, 12);
	world.markBlockForUpdate((int) player.posX, (int) player.posY,
			(int) player.posZ);
	world.updateLightByType(EnumSkyBlock.Block, (int) player.posX,
			(int) player.posY + 1, (int) player.posZ);
	world.updateLightByType(EnumSkyBlock.Block, (int) player.posX,
			(int) player.posY - 1, (int) player.posZ);
	world.updateLightByType(EnumSkyBlock.Block,
			(int) player.posX + 1, (int) player.posY, (int) player.posZ);
	world.updateLightByType(EnumSkyBlock.Block,
			(int) player.posX - 1, (int) player.posY, (int) player.posZ);
	world.updateLightByType(EnumSkyBlock.Block, (int) player.posX,
			(int) player.posY, (int) player.posZ + 1);
	world.updateLightByType(EnumSkyBlock.Block, (int) player.posX,
			(int) player.posY, (int) player.posZ - 1);
}

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

  • Author

Yes I said everything is working.

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

  • Author

No I'm using that tick handler just to see it work. Right now I haven't done anything with my entity

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

try adding

 

public void onEntityUpdate() {

super();

addlight();

}

 

This method is called in Entity.class every tick and may be what will allow your entity to produce light.

  • Author

Ok I tried that the addLight method IS being called, but its not lighting anything up. It is 2 blocks above the ground btw.

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

ok, could you share the class so I can see what is going on? It could just be a method not being right.

  • Author
package com.apmods.magicraft.entity;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;

import com.apmods.magicraft.main.SpellLib;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class EntitySpell extends EntityThrowable implements IProjectile{

   private int arrowShake;
   private Entity shootingEntity;
   public EntitySpell(World par1World) {
       super(par1World);
       this.setThrowableHeading(motionX, motionY, motionZ, 4.5f, 1F);
   }
   public EntitySpell(World par1World, EntityLivingBase player, int spell) {
       super(par1World, player);
       this.setSpell(spell);
       float speed = 4.5f;
       if(spell == 7){
    	   speed = 0;
       }
       this.shootingEntity = player;
       this.setThrowableHeading(motionX, motionY, motionZ, speed, 1F);
   }
   public EntitySpell(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5)
   {
       super(par1World);
       this.renderDistanceWeight = 10.0D;
       this.shootingEntity = par2EntityLivingBase;

       this.posY = par2EntityLivingBase.posY + (double)par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D;
       double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX;
       double d1 = par3EntityLivingBase.boundingBox.minY + (double)(par3EntityLivingBase.height / 3.0F) - this.posY;
       double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ;
       double d3 = (double)MathHelper.sqrt_double(d0 * d0 + d2 * d2);

       if (d3 >= 1.0E-7D)
       {
           float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
           float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI));
           double d4 = d0 / d3;
           double d5 = d2 / d3;
           this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3);
           this.yOffset = 0.0F;
           float f4 = (float)d3 * 0.2F;
           this.setThrowableHeading(d0, d1 + (double)f4, d2, par4, par5);
       }
   }

   @Override
   protected void entityInit() {
   //Spell
   this.dataWatcher.addObject(20, Integer.valueOf(1));
   
   

   }

   @Override
   public void readEntityFromNBT(NBTTagCompound nbt) {
   super.readEntityFromNBT(nbt);
   this.setSpell(nbt.getInteger("spell"));
   }

   @Override
   public void writeEntityToNBT(NBTTagCompound nbt) {
   super.writeEntityToNBT(nbt);
   nbt.setFloat("spell", this.getSpell());
   }

   @Override
   protected void onImpact(MovingObjectPosition mop) {
   Block block = this.worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ);
   if(mop.entityHit != null && mop.entityHit instanceof EntityLivingBase){
	   EntityLivingBase entity = (EntityLivingBase) mop.entityHit;
	   float f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
	   int damage = 0;
	   double knockback = 0;
	   if(this.getSpell() == SpellLib.STUPEFY){
		   entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 20, 0));
		   damage = 6;
		   knockback = 0.3;
	   }
	   else if(this.getSpell() == SpellLib.AVADA_KEDAVRA){
		   damage = 100;
		   knockback = 0.2;
	   }
	   else if(this.getSpell() == SpellLib.EXPELLIARMUS){
		   damage = 1;
		   knockback = 0.2;
		   if(entity instanceof EntityPlayer){
			   EntityPlayer player = (EntityPlayer) entity;
			   ItemStack item = player.getCurrentEquippedItem();
			   if(item != null){
				   player.setCurrentItemOrArmor(0, null);
				   this.dropItem(item.getItem(), item.stackSize);
			   }
//				   this.worldObj.spawnEntityInWorld(new EntityItem(this.worldObj, player.posX + rand.nextInt(), player.posY + 2, player.posZ + rand.nextInt(), item.copy()));
		   }
		   else{
			   if(entity.getEquipmentInSlot(0) != null){
				   ItemStack item = entity.getEquipmentInSlot(0);
				   if(item != null){
					   entity.setCurrentItemOrArmor(0, null);
					   this.dropItem(item.getItem(), item.stackSize);
				   }
			   }
		   }
	   }
	   else if(this.getSpell() == SpellLib.EXPULSO){
		   this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 3.0f, true);
	   }
	   else if(this.getSpell() == SpellLib.CONFRINGO){
		   this.worldObj.newExplosion(this, this.posX, this.posY, this.posZ, 3.0f, true, true);
	   }
	   else if(this.getSpell() == SpellLib.INCENDIO){
		   entity.setFire(5);
	   }
	   else if(this.getSpell() == SpellLib.AGUAMENTI){
		   entity.extinguish();
	   }
	   else if(this.getSpell() == SpellLib.ALARTE_ASCENDARE){
		   entity.addVelocity(0, 2.5, 0);
	   }
	   
	   entity.attackEntityFrom(DamageSource.magic, 1.0f * damage);
	   entity.addVelocity(this.motionX * knockback * 0.6000000238418579D / (double)f4, knockback, this.motionZ * knockback * 0.6000000238418579D / (double)f4);
   }

   else if( block != Blocks.air){
	   if(this.getSpell() == SpellLib.DURO){
		   this.worldObj.setBlock(mop.blockX, mop.blockY, mop.blockZ, Blocks.stone);
	   }
	   else if(this.getSpell() == SpellLib.EXPULSO){
		   this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 3.0f, true);
	   }
	   else if(this.getSpell() == SpellLib.CONFRINGO){
		   this.worldObj.newExplosion(this, this.posX, this.posY, this.posZ, 3.0f, true, true);
	   }
	   else if(this.getSpell() == SpellLib.INCENDIO){
		   if(mop.sideHit == 1){
			   this.worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ, Blocks.fire);
			   Random rand = new Random();
			   if(rand.nextInt(3) == 0){
				   if(this.worldObj.getBlock((int)this.posX + 1, (int)this.posY, (int)this.posZ) == Blocks.air){
					   this.worldObj.setBlock((int)this.posX + 1, (int)this.posY, (int)this.posZ, Blocks.fire);
				   }
			   }
			   if(rand.nextInt(3) == 0){
				   if(this.worldObj.getBlock((int)this.posX - 1, (int)this.posY, (int)this.posZ) == Blocks.air){
				   this.worldObj.setBlock((int)this.posX - 1, (int)this.posY, (int)this.posZ, Blocks.fire);
				   }
			   }
			   if(rand.nextInt(3) == 0){
				   if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ - 1) == Blocks.air){
				   this.worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ - 1, Blocks.fire);
				   }
			   }
			   if(rand.nextInt(3) == 0){
				   if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ + 1) == Blocks.air){
				   this.worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ + 1, Blocks.fire);
				   }
			   }
			   if(rand.nextInt(3) == 0){
				   if(this.worldObj.getBlock((int)this.posX + 1, (int)this.posY, (int)this.posZ + 1) == Blocks.air){
				   this.worldObj.setBlock((int)this.posX + 1, (int)this.posY, (int)this.posZ + 1, Blocks.fire);
				   }
			   }
			   if(rand.nextInt(3) == 0){
				   if(this.worldObj.getBlock((int)this.posX + 1, (int)this.posY, (int)this.posZ - 1) == Blocks.air){
				   this.worldObj.setBlock((int)this.posX + 1, (int)this.posY, (int)this.posZ - 1, Blocks.fire);
				   }
			   }
			   if(rand.nextInt(3) == 0){
				   if(this.worldObj.getBlock((int)this.posX - 1, (int)this.posY, (int)this.posZ + 1) == Blocks.air){
				   this.worldObj.setBlock((int)this.posX - 1, (int)this.posY, (int)this.posZ + 1, Blocks.fire);
				   }
			   }
			   if(rand.nextInt(3) == 0){
				   if(this.worldObj.getBlock((int)this.posX - 1, (int)this.posY, (int)this.posZ - 1) == Blocks.air){
				   this.worldObj.setBlock((int)this.posX - 1, (int)this.posY, (int)this.posZ - 1, Blocks.fire);
				   }
			   }
		   }
	   }
	   else if(this.getSpell() == SpellLib.AGUAMENTI){
//			   if(mop.sideHit == 1){
//				   this.worldObj.setBlock((int)this.posX, (int)this.posY + 1, (int)this.posZ, Blocks.flowing_water);
//			   }
//			   else if(mop.sideHit == 0){
//				   this.worldObj.setBlock((int)this.posX, (int)this.posY - 1, (int)this.posZ, Blocks.flowing_water);
//			   }
//			   else if(mop.sideHit == 2){
//				   this.worldObj.setBlock((int)this.posX + 1, (int)this.posY, (int)this.posZ, Blocks.flowing_water);
//			   }
//			   else if(mop.sideHit == 4){
//				   this.worldObj.setBlock((int)this.posX - 1, (int)this.posY, (int)this.posZ, Blocks.flowing_water);
//			   }
//			   else if(mop.sideHit == 3){
//				   this.worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ + 1, Blocks.flowing_water);
//			   }
//			   else if(mop.sideHit == 5){
//				   this.worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ - 1, Blocks.flowing_water);
//			   }
		   this.worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ, Blocks.flowing_water);
	   }
	   else{
		   this.setDead();
	   }
   }
       this.setDead();
   }
   

   
   @Override
   public float getGravityVelocity(){
   return 0;
   }
   @SideOnly(Side.CLIENT)
   public int getBrightnessForRender(float par1)
   {
       return 15728880;
   }

   /**
    * Gets how bright this entity is.
    */
   public float getBrightness(float par1)
   {
       return 1.0F;
   }
public void onUpdate(){
	super.onUpdate();
//		if(this.getSpell() == SpellLib.LUMOS){
//			this.addLight();
//			if (this.isDead) {
//				this.worldObj.updateLightByType(EnumSkyBlock.Block,
//						(int) this.posX, (int) this.posY, (int) this.posZ);
//			}
//		}
	Random rand = new Random();
	if(rand.nextInt(2) == 1){
	this.worldObj.spawnParticle("enchantmenttable", this.posX + rand.nextFloat()- 0.6f, this.posY , this.posZ + rand.nextFloat() - 0.6f, rand.nextFloat() - 0.5f, 0, rand.nextFloat() - 0.5f);
	}
	else{
		this.worldObj.spawnParticle("enchantmenttable", this.posX - rand.nextFloat(), this.posY, this.posZ - rand.nextFloat(), rand.nextFloat() - 0.5f, 0, rand.nextFloat() - 0.5f);
	}
}

public void onEntityUpdate(){
	super.onEntityUpdate();
	if(this.getSpell() == SpellLib.LUMOS){
		this.addLight();
	}
}
public int getSpell(){
	return this.dataWatcher.getWatchableObjectInt(20);
}
private void setSpell(int f){
	this.dataWatcher.updateObject(20, Integer.valueOf(f));
}
private void addLight() {
	System.out.println("light");
	this.worldObj.setLightValue(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ, 16);
	this.worldObj.markBlockRangeForRenderUpdate((int) this.posX,
			(int) this.posY, (int) this.posX, 12, 12, 12);
	this.worldObj.markBlockForUpdate((int) this.posX, (int) this.posY,
			(int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY + 1, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY - 1, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block,
			(int) this.posX + 1, (int) this.posY, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block,
			(int) this.posX - 1, (int) this.posY, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ + 1);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ - 1);
}
public void setShootingEntity(EntityLivingBase entity){
	this.shootingEntity = entity;
}



}

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

At this point, I am not sure why it is not working, I know it works with living entities, but I don't know why it's not working for your entity with the method it's in.

  • Author

Still not working, even though I made a living entity to test it:

 

package com.apmods.magicraft.entity;

import net.minecraft.entity.EntityLiving;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;

public class EntityLivingTest extends EntityLiving{

public EntityLivingTest(World p_i1594_1_) {
	super(p_i1594_1_);
	// TODO Auto-generated constructor stub
}
public void onLivingUpdate()
    {
	super.onLivingUpdate();
	addLight();
    }
private void addLight() {
	this.worldObj.setLightValue(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ, 16);
	this.worldObj.markBlockRangeForRenderUpdate((int) this.posX,
			(int) this.posY, (int) this.posX, 12, 12, 12);
	this.worldObj.markBlockForUpdate((int) this.posX, (int) this.posY,
			(int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY + 1, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY - 1, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block,
			(int) this.posX + 1, (int) this.posY, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block,
			(int) this.posX - 1, (int) this.posY, (int) this.posZ);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ + 1);
	this.worldObj.updateLightByType(EnumSkyBlock.Block, (int) this.posX,
			(int) this.posY, (int) this.posZ - 1);
}


}

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

  • Author

Ahhh yea I was wondering why it was 16 but I figured it probably has to be above 15 or something. Will try it out on see how it goes  :)

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.