put 1.7.10 in main folder

This commit is contained in:
Martin Robertz committed 2023-01-13 19:25:21 +01:00
1 parent f6dd34eb96
commit b3a9147a3c
1429 files changed
+1 -135029

No files matched your search

@@ -0,0 +1,49 @@
package ab.common.block;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import vazkii.botania.common.Botania;
public class BlockLuminousFreyrLiana extends BlockFreyrLiana {
public BlockLuminousFreyrLiana() {
this.setBlockName("BlockLuminousFreyrLiana");
this.setBlockTextureName("ab:freyrLuminousLiana");
this.setTickRandomly(true);
}
public int getLightValue() {
return 11;
}
public void updateTick(World world, int x, int y, int z, Random rand) {
super.updateTick(world, x, y, z, rand);
if(rand.nextInt(11) == 0)
world.setBlockMetadataWithNotify(x, y, z, 1, 3);
}
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
if(world.getBlockMetadata(x, y, z) == 1)
if(rand.nextInt(3) == 0)
Botania.proxy.wispFX(world, x + 0.1 + Math.random() * 0.8, y + Math.random() * 0.5, z + 0.1 + Math.random() * 0.8, 249 / 255f, 230 / 255f, 3 / 255f, 0.14f, -0.04f, 2);
}
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
Random rand = new Random();
if(world.getBlockMetadata(x, y, z) == 1) {
if (!world.isRemote)
(new EntityItem(world, x + 0.5, y, z + 0.5)).entityDropItem(new ItemStack(Items.gold_nugget, 1 + rand.nextInt(3)), 0.75f);
world.setBlockMetadataWithNotify(x, y, z, 0, 3);
return true;
}
return false;
}
}