mirror of
https://github.com/GTNewHorizons/Hardcore-Ender-Expansion.git
synced 2026-10-26 14:24:03 +00:00
1.8 fixes part 8
This commit is contained in:
1 parent
b4574960ac
commit
53e237515b
30 files changed
+98
-188
No files matched your search
@@ -60,7 +60,7 @@ public class BlockDragonEggCustom extends BlockDragonEgg{
|
||||
}
|
||||
|
||||
private void fallIfPossible(World world, BlockPos pos){
|
||||
if (BlockFalling.canFallInto(world,pos.down()) && pos.getY() >= 0){ // OBFUSCATED can fall?
|
||||
if (BlockFalling.canFallInto(world,pos.down()) && pos.getY() >= 0){
|
||||
byte checkRange = 32;
|
||||
|
||||
if (!BlockFalling.fallInstantly && world.checkChunksExist(x-checkRange,y-checkRange,z-checkRange,x+checkRange,y+checkRange,z+checkRange)){
|
||||
|
||||
@@ -12,6 +12,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import chylex.hee.entity.fx.EntityEnergyClusterFX;
|
||||
import chylex.hee.system.logging.Stopwatch;
|
||||
import chylex.hee.system.savedata.WorldDataHandler;
|
||||
@@ -19,13 +21,11 @@ import chylex.hee.system.savedata.types.EnergySavefile;
|
||||
import chylex.hee.system.util.DragonUtil;
|
||||
import chylex.hee.system.util.MathUtil;
|
||||
import chylex.hee.tileentity.TileEntityEnergyCluster;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockEnergyCluster extends BlockContainer{
|
||||
public static final SoundType soundTypeEnergyCluster = new SoundType("holycrapthisisloud",5F,1.6F){
|
||||
@Override
|
||||
public String getStepResourcePath(){
|
||||
public String getStepSound(){
|
||||
return "dig.glass";
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class BlockEnergyCluster extends BlockContainer{
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_150496_b(){ // OBFUSCATED placed block sound
|
||||
public String getPlaceSound(){
|
||||
return "dig.glass";
|
||||
}
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BlockReplaceHelper{
|
||||
|
||||
FMLControlledNamespacedRegistry<Block> registryBlocks = GameData.getBlockRegistry();
|
||||
registryBlocks.registryObjects.put(registryName,replacement);
|
||||
registryBlocks.underlyingIntegerMap.func_148746_a(replacement,id); // OBFUSCATED put object
|
||||
registryBlocks.underlyingIntegerMap.put(replacement,id);
|
||||
|
||||
blockField.setAccessible(true);
|
||||
Unfinalizer.unfinalizeField(blockField);
|
||||
@@ -41,7 +41,7 @@ public class BlockReplaceHelper{
|
||||
ItemBlock itemBlock = itemBlockClass.getConstructor(Block.class).newInstance(replacement);
|
||||
FMLControlledNamespacedRegistry<Item> registryItems = GameData.getItemRegistry();
|
||||
registryItems.registryObjects.put(registryName,itemBlock);
|
||||
registryItems.underlyingIntegerMap.func_148746_a(itemBlock,id); // OBFUSCATED put object
|
||||
registryItems.underlyingIntegerMap.put(itemBlock,id);
|
||||
|
||||
int itemID = Item.getIdFromItem(itemBlock);
|
||||
StatBase stat = StatList.mineBlockStatArray[itemID];
|
||||
|
||||
@@ -13,12 +13,12 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import chylex.hee.entity.fx.FXType;
|
||||
import chylex.hee.packets.PacketPipeline;
|
||||
import chylex.hee.packets.client.C20Effect;
|
||||
import chylex.hee.proxy.ModCommonProxy;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockSpookyLeaves extends BlockLeaves{
|
||||
@Override
|
||||
@@ -107,7 +107,7 @@ public class BlockSpookyLeaves extends BlockLeaves{
|
||||
public void registerBlockIcons(IIconRegister iconRegister){
|
||||
blockIcon = iconRegister.registerIcon(getTextureName());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String[] func_150125_e(){ // OBFUSCATED
|
||||
return new String[]{ getUnlocalizedName() };
|
||||
|
||||
@@ -4,9 +4,9 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.boss.EntityDragon;
|
||||
import net.minecraft.entity.item.EntityFallingBlock;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import chylex.hee.block.BlockDragonEggCustom;
|
||||
import chylex.hee.system.util.BlockPosM;
|
||||
import chylex.hee.system.util.MathUtil;
|
||||
|
||||
public class EntityBlockFallingDragonEgg extends EntityFallingBlock{
|
||||
@@ -15,7 +15,7 @@ public class EntityBlockFallingDragonEgg extends EntityFallingBlock{
|
||||
}
|
||||
|
||||
public EntityBlockFallingDragonEgg(World world, double x, double y, double z){
|
||||
super(world,x,y,z,Blocks.dragon_egg);
|
||||
super(world,x,y,z,Blocks.dragon_egg.getDefaultState());
|
||||
preventEntitySpawning = true;
|
||||
setSize(0.98F,0.98F);
|
||||
yOffset = height/2F;
|
||||
@@ -28,7 +28,9 @@ public class EntityBlockFallingDragonEgg extends EntityFallingBlock{
|
||||
|
||||
@Override
|
||||
public void onUpdate(){
|
||||
if (func_145805_f().getMaterial() == Material.air){ // OBFUSCATED get block
|
||||
Block block = getBlock().getBlock();
|
||||
|
||||
if (block.getMaterial() == Material.air){ // OBFUSCATED get block
|
||||
setDead();
|
||||
return;
|
||||
}
|
||||
@@ -42,12 +44,10 @@ public class EntityBlockFallingDragonEgg extends EntityFallingBlock{
|
||||
motionX *= 0.9D;
|
||||
motionY *= 0.9D;
|
||||
motionZ *= 0.9D;
|
||||
int i = MathHelper.floor_double(posX);
|
||||
int j = MathHelper.floor_double(posY);
|
||||
int k = MathHelper.floor_double(posZ);
|
||||
BlockPosM pos = new BlockPosM(this);
|
||||
|
||||
if (fallTime == 1 && worldObj.getBlock(i,j,k) == func_145805_f()){ // OBFUSCATED get block
|
||||
worldObj.setBlockToAir(i,j,k);
|
||||
if (fallTime == 1 && pos.getBlock(worldObj) == block){ // OBFUSCATED get block
|
||||
worldObj.setBlockToAir(pos);
|
||||
}
|
||||
else if (!worldObj.isRemote && fallTime == 1){
|
||||
die();
|
||||
@@ -58,13 +58,13 @@ public class EntityBlockFallingDragonEgg extends EntityFallingBlock{
|
||||
motionZ *= 0.7D;
|
||||
motionY *= -0.5D;
|
||||
|
||||
if (worldObj.getBlock(i,j,k) != Blocks.piston_extension && worldObj.getEntitiesWithinAABB(EntityDragon.class,this.boundingBox.expand(1,1,1)).isEmpty()){
|
||||
if (worldObj.setBlock(i,j,k,func_145805_f()))setDead(); // OBFUSCATED get block
|
||||
if (pos.getBlock(worldObj) != Blocks.piston_extension && worldObj.getEntitiesWithinAABB(EntityDragon.class,this.boundingBox.expand(1,1,1)).isEmpty()){
|
||||
if (pos.setBlock(worldObj,getBlock()))setDead(); // OBFUSCATED get block
|
||||
else die();
|
||||
}
|
||||
else die();
|
||||
}
|
||||
else if (fallTime > 100 && !worldObj.isRemote && (j < 1 || j > 256) || fallTime > 600){
|
||||
else if (fallTime > 100 && !worldObj.isRemote && (pos.y < 1 || pos.y > 256) || fallTime > 600){
|
||||
die();
|
||||
}
|
||||
}
|
||||
@@ -76,9 +76,4 @@ public class EntityBlockFallingDragonEgg extends EntityFallingBlock{
|
||||
|
||||
setDead();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block func_145805_f(){ // OBFUSCATED get block
|
||||
return Blocks.dragon_egg;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import chylex.hee.block.BlockList;
|
||||
import chylex.hee.system.util.BlockPosM;
|
||||
|
||||
public class EntityBlockFallingObsidian extends EntityFallingBlock{
|
||||
public EntityBlockFallingObsidian(World world){
|
||||
@@ -18,12 +19,14 @@ public class EntityBlockFallingObsidian extends EntityFallingBlock{
|
||||
}
|
||||
|
||||
public EntityBlockFallingObsidian(World world, double x, double y, double z){
|
||||
super(world,x,y,z,BlockList.obsidian_falling);
|
||||
super(world,x,y,z,BlockList.obsidian_falling.getDefaultState());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(){
|
||||
if (func_145805_f().getMaterial() == Material.air){ // OBFUSCATED get block
|
||||
Block block = getBlock().getBlock();
|
||||
|
||||
if (block.getMaterial() == Material.air){ // OBFUSCATED get block
|
||||
setDead();
|
||||
return;
|
||||
}
|
||||
@@ -37,30 +40,27 @@ public class EntityBlockFallingObsidian extends EntityFallingBlock{
|
||||
motionX *= 0.9D;
|
||||
motionY *= 0.9D;
|
||||
motionZ *= 0.9D;
|
||||
|
||||
int ix = MathHelper.floor_double(posX),
|
||||
iy = MathHelper.floor_double(posY),
|
||||
iz = MathHelper.floor_double(posZ);
|
||||
BlockPosM pos = new BlockPosM(this);
|
||||
|
||||
if (fallTime == 1 && worldObj.getBlock(ix,iy,iz) == func_145805_f())worldObj.setBlockToAir(ix,iy,iz);
|
||||
if (fallTime == 1 && pos.getBlock(worldObj) == block)worldObj.setBlockToAir(pos);
|
||||
|
||||
if (onGround){
|
||||
motionX *= 0.7D;
|
||||
motionZ *= 0.7D;
|
||||
motionY *= -0.5D;
|
||||
|
||||
if (fallTime > 5 && worldObj.getBlock(ix,iy,iz) != Blocks.piston_extension && worldObj.getEntitiesWithinAABB(EntityDragon.class,this.boundingBox.expand(1,1,1)).isEmpty()){
|
||||
if (worldObj.setBlock(ix,iy,iz,func_145805_f()))setDead();
|
||||
if (fallTime > 5 && pos.getBlock(worldObj) != Blocks.piston_extension && worldObj.getEntitiesWithinAABB(EntityDragon.class,this.boundingBox.expand(1,1,1)).isEmpty()){
|
||||
if (pos.setBlock(worldObj,getBlock()))setDead();
|
||||
}
|
||||
}
|
||||
else if (!worldObj.isRemote && ((fallTime > 100 && (iy < 1 || iy > 256)) || fallTime > 600)){
|
||||
else if (!worldObj.isRemote && ((fallTime > 100 && (pos.y < 1 || pos.y > 256)) || fallTime > 600)){
|
||||
dropItem(Item.getItemFromBlock(Blocks.obsidian),1);
|
||||
setDead();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fall(float distance){
|
||||
public void fall(float distance, float damageMp){
|
||||
int i = MathHelper.ceiling_float_int(distance-1F);
|
||||
|
||||
if (i > 0){
|
||||
@@ -69,9 +69,4 @@ public class EntityBlockFallingObsidian extends EntityFallingBlock{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block func_145805_f(){
|
||||
return BlockList.obsidian_falling;
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public class EntityBlockTempleDragonEgg extends EntityFallingBlock{
|
||||
if (++fallTime == 1 && !worldObj.isRemote){
|
||||
BlockPosM pos = new BlockPosM(this);
|
||||
|
||||
if (pos.getBlock(worldObj) != Blocks.dragon_egg){ // OBFUSCATED get block
|
||||
if (pos.getBlock(worldObj) != Blocks.dragon_egg){
|
||||
setDead();
|
||||
return;
|
||||
}
|
||||
@@ -62,8 +62,9 @@ public class EntityBlockTempleDragonEgg extends EntityFallingBlock{
|
||||
double deltaY = posY-ItemTempleCaller.templeY-2;
|
||||
|
||||
if (!worldObj.isRemote){
|
||||
if (deltaY>4D && rand.nextInt(6-(deltaY>6D?2 : 0)) == 0){
|
||||
double xx = -5D,zz = -5D;
|
||||
if (deltaY > 4D && rand.nextInt(6-(deltaY>6D?2 : 0)) == 0){
|
||||
double xx = -5D, zz = -5D;
|
||||
|
||||
switch(rand.nextInt(4)){
|
||||
case 0: zz = ItemTempleCaller.templeZ;
|
||||
case 1: xx = ItemTempleCaller.templeX+rand.nextFloat()*18D;
|
||||
|
||||
@@ -736,9 +736,9 @@ public class EntityBossDragon extends EntityLiving implements IBossDisplayData,
|
||||
public boolean canBeCollidedWith(){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public World func_82194_d(){ // OBFUSCATED get world obj
|
||||
public World getWorld(){
|
||||
return worldObj;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public class EntityBossEnderDemon extends EntityFlying implements IBossDisplayDa
|
||||
|
||||
@Override
|
||||
protected void updateEntityActionState(){
|
||||
if (lastAttacker != null && (lastAttacker.isDead || !lastAttacker.playerNetServerHandler.getNetworkManager().isChannelOpen()))lastAttacker = null; // OBFUSCATED get network manager
|
||||
if (lastAttacker != null && (lastAttacker.isDead || !lastAttacker.playerNetServerHandler.getNetworkManager().isChannelOpen()))lastAttacker = null;
|
||||
|
||||
float health = getHealth();
|
||||
if (health <= 0)return;
|
||||
|
||||
@@ -81,7 +81,7 @@ public class DragonAchievementManager{
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound tag){
|
||||
for(String key:(Set<String>)tag.getKeySet()){ // OBFUSCATED get keys
|
||||
for(String key:(Set<String>)tag.getKeySet()){
|
||||
NBTBase b = tag.getTag(key);
|
||||
|
||||
if (b instanceof NBTTagCompound){
|
||||
|
||||
@@ -127,7 +127,7 @@ public class EntityProjectileEnhancedEnderPearl extends EntityEnderPearl{
|
||||
if (getThrower() != null && getThrower() instanceof EntityPlayerMP){
|
||||
EntityPlayerMP player = (EntityPlayerMP)getThrower();
|
||||
|
||||
if (player.playerNetServerHandler.getNetworkManager().isChannelOpen() && player.worldObj == worldObj){ // OBFUSCATED get network manager
|
||||
if (player.playerNetServerHandler.getNetworkManager().isChannelOpen() && player.worldObj == worldObj){
|
||||
EnderTeleportEvent event = new EnderTeleportEvent(player,posX,posY,posZ,5F);
|
||||
|
||||
if (!MinecraftForge.EVENT_BUS.post(event)){
|
||||
|
||||
@@ -12,14 +12,14 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import chylex.hee.HardcoreEnderExpansion;
|
||||
import chylex.hee.entity.fx.FXType;
|
||||
import chylex.hee.packets.PacketPipeline;
|
||||
import chylex.hee.packets.client.C20Effect;
|
||||
import chylex.hee.packets.client.C21EffectEntity;
|
||||
import chylex.hee.system.util.MathUtil;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class EntityProjectileSpatialDash extends EntityThrowable{
|
||||
private byte ticks = 0;
|
||||
@@ -108,7 +108,7 @@ public class EntityProjectileSpatialDash extends EntityThrowable{
|
||||
|
||||
PacketPipeline.sendToAllAround(player,64D,new C21EffectEntity(FXType.Entity.GEM_TELEPORT_FROM,player));
|
||||
|
||||
if (player.playerNetServerHandler.getNetworkManager().isChannelOpen() && player.worldObj == worldObj){ // OBFUSCATED get network manager
|
||||
if (player.playerNetServerHandler.getNetworkManager().isChannelOpen() && player.worldObj == worldObj){
|
||||
if (player.isRiding())player.mountEntity((Entity)null);
|
||||
|
||||
int x,y,z;
|
||||
|
||||
@@ -132,7 +132,7 @@ public class ItemScorchingPickaxe extends Item{
|
||||
|
||||
int fortune = 0;
|
||||
for(int a = 0; a < 5; a++)fortune += 1+rand.nextInt(3+rand.nextInt(3));
|
||||
fortune = 1+MathUtil.floor(fortune*(0.35D*rand.nextDouble()*rand.nextDouble()*Math.pow(FurnaceRecipes.instance().getSmeltingExperience(result),2.6D)+(fortune*0.06D))/6.4D); // OBFUSCATED getExperience
|
||||
fortune = 1+MathUtil.floor(fortune*(0.35D*rand.nextDouble()*rand.nextDouble()*Math.pow(FurnaceRecipes.instance().getSmeltingExperience(result),2.6D)+(fortune*0.06D))/6.4D);
|
||||
result.stackSize = fortune;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class PotionTypes{
|
||||
mapItemToIndex(Items.ghast_tear,9);
|
||||
mapItemToIndex(Items.spider_eye,10);
|
||||
mapItemToIndex(Items.magma_cream,11);
|
||||
mapItemToIndex(Items.fish,(short)FishType.PUFFERFISH.func_150976_a(),new int[]{ 12 }); // OBFUSCATED get fish damage
|
||||
mapItemToIndex(Items.fish,(short)FishType.PUFFERFISH.getMetadata(),new int[]{ 12 });
|
||||
mapItemToIndex(Items.fermented_spider_eye,2,4,6,8/*,16*/);
|
||||
/*mapItemToIndex(Item.rottenFlesh,13);
|
||||
mapItemToIndex(Item.flint,14);
|
||||
|
||||
@@ -17,13 +17,13 @@ import net.minecraft.item.crafting.ShapedRecipes;
|
||||
import net.minecraft.item.crafting.ShapelessRecipes;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import chylex.hee.system.logging.Log;
|
||||
import chylex.hee.system.logging.Stopwatch;
|
||||
import chylex.hee.system.util.DragonUtil;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
public final class OrbAcquirableItems{
|
||||
public static boolean overrideRemoveBrokenRecipes = false;
|
||||
@@ -39,17 +39,17 @@ public final class OrbAcquirableItems{
|
||||
if (biome == null)continue;
|
||||
else if (biome.biomeID >= 128)break;
|
||||
|
||||
idList.add(new WeightedItem(biome.topBlock,0,34));
|
||||
idList.add(new WeightedItem(biome.fillerBlock,0,34));
|
||||
idList.add(new WeightedItem(biome.topBlock.getBlock(),0,34));
|
||||
idList.add(new WeightedItem(biome.fillerBlock.getBlock(),0,34));
|
||||
}
|
||||
|
||||
Throwable lastThrowable = null;
|
||||
|
||||
for(Iterator<Entry<ItemStack,ItemStack>> iter = FurnaceRecipes.smelting().getSmeltingList().entrySet().iterator(); iter.hasNext();){
|
||||
for(Iterator<Entry<ItemStack,ItemStack>> iter = FurnaceRecipes.instance().getSmeltingList().entrySet().iterator(); iter.hasNext();){
|
||||
Entry<ItemStack,ItemStack> entry = iter.next();
|
||||
|
||||
try{
|
||||
int weight = 30-(int)(7F*FurnaceRecipes.smelting().func_151398_b(entry.getValue())); // OBFUSCATED get experience amount
|
||||
int weight = 30-(int)(7F*FurnaceRecipes.instance().getSmeltingExperience(entry.getValue()));
|
||||
idList.add(new WeightedItem(entry.getKey().getItem(),0,weight));
|
||||
idList.add(new WeightedItem(entry.getValue().getItem(),0,weight));
|
||||
}catch(Throwable t){
|
||||
|
||||
@@ -66,7 +66,7 @@ public class RenderMiniBossEnderEye extends RenderLiving{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean func_110813_b(EntityLiving entity){ // OBFUSCATED show mob name
|
||||
protected boolean canRenderName(EntityLiving entity){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class RenderMiniBossFireFiend extends RenderLiving{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean func_110813_b(EntityLiving entity){ // OBFUSCATED show mob name
|
||||
protected boolean canRenderName(EntityLiving entity){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
package chylex.hee.render.entity;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.RendererLivingEntity;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderMobCorporealMirage extends RendererLivingEntity{
|
||||
private static final double angleStep = 0.01745329251994327D;
|
||||
|
||||
public RenderMobCorporealMirage(RenderManager renderManager){
|
||||
super(renderManager,new ModelBiped(),0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderModel(EntityLivingBase entity, float limbSwing, float limbSwingAngle, float entityTickTime, float rotationYaw, float rotationPitch, float unitPixel){
|
||||
if (entity.ticksExisted < 2){
|
||||
entity.prevRotationYaw = entity.renderYawOffset = entity.prevRenderYawOffset = entity.rotationYaw;
|
||||
return;
|
||||
}
|
||||
|
||||
float alpha = Math.min(0.15F,(entity.ticksExisted-2)*0.006F);
|
||||
|
||||
bindEntityTexture(entity);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(1F,1F,1F,alpha*(0.25F+(entity.getHealth()*0.75F/entity.getMaxHealth())));
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER,0.003921569F);
|
||||
|
||||
GL11.glTranslated(0F,Math.cos(((EntityMobCorporealMirage)entity).angle += angleStep)*alpha,0F);
|
||||
mainModel.render(entity,limbSwing,limbSwingAngle,entityTickTime,rotationYaw,rotationPitch,unitPixel);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER,0.1F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float renderSwingProgress(EntityLivingBase entity, float partialTickTime){
|
||||
return 0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float handleRotationFloat(EntityLivingBase entity, float partialTickTime){
|
||||
return 0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getDeathMaxRotation(EntityLivingBase entity){
|
||||
return 0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity){
|
||||
return ((EntityMobCorporealMirage)entity).getMirageSkin();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean func_110813_b(EntityLivingBase entity){ // OBFUSCATED show mob name
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,18 @@
|
||||
package chylex.hee.render.tileentity;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import chylex.hee.tileentity.TileEntityCustomSpawner;
|
||||
import chylex.hee.tileentity.spawner.CustomSpawnerLogic;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderTileCustomSpawner extends TileEntitySpecialRenderer{
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTickTime){
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTickTime, int what){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x+0.5F,(float)y,(float)z+0.5F);
|
||||
|
||||
@@ -27,7 +27,7 @@ public class RenderTileCustomSpawner extends TileEntitySpecialRenderer{
|
||||
GL11.glTranslatef(0F,-0.4F,0F);
|
||||
GL11.glScalef(0.4375F,0.4375F,0.4375F);
|
||||
entity.setLocationAndAngles(x,y,z,0F,0F);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entity,0D,0D,0D,0F,partialTickTime);
|
||||
Minecraft.getMinecraft().getRenderManager().renderEntityWithPosYaw(entity,0D,0D,0D,0F,partialTickTime);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@@ -12,7 +12,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -204,9 +203,4 @@ public class RenderTileEssenceAltar extends TileEntitySpecialRenderer{
|
||||
IIcon icon = item.getIconFromDamage(damage);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.instance,icon.getMaxU(),icon.getMinV(),icon.getMinU(),icon.getMaxV(),icon.getIconWidth(),icon.getIconHeight(),0.0625F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_147496_a(World world){ // OBFUSCATED create block renderer
|
||||
blockRenderer = new RenderBlocks(world);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package chylex.hee.system.util;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
@@ -42,6 +43,14 @@ public class BlockPosM extends BlockPos{
|
||||
return z;
|
||||
}
|
||||
|
||||
public boolean setBlock(World world, IBlockState state){
|
||||
return world.setBlockState(this,state);
|
||||
}
|
||||
|
||||
public boolean setBlock(World world, IBlockState state, int flags){
|
||||
return world.setBlockState(this,state,flags);
|
||||
}
|
||||
|
||||
public Block getBlock(World world){
|
||||
return world.getBlockState(this).getBlock();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import chylex.hee.mechanics.energy.EnergyChunkData;
|
||||
import chylex.hee.packets.PacketPipeline;
|
||||
import chylex.hee.packets.client.C10ParticleEnergyTransfer;
|
||||
@@ -18,8 +20,6 @@ import chylex.hee.system.logging.Stopwatch;
|
||||
import chylex.hee.system.savedata.WorldDataHandler;
|
||||
import chylex.hee.system.savedata.types.EnergySavefile;
|
||||
import chylex.hee.system.util.MathUtil;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public abstract class TileEntityAbstractEnergyInventory extends TileEntityAbstractInventory{
|
||||
protected static final byte[] chunkOffX = new byte[]{ -1, -1, -1, 0, 0, 0, 1, 1, 1 },
|
||||
@@ -114,13 +114,13 @@ public abstract class TileEntityAbstractEnergyInventory extends TileEntityAbstra
|
||||
public Packet getDescriptionPacket(){
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setBoolean("engInsuf",hasInsufficientEnergy);
|
||||
return new S35PacketUpdateTileEntity(xCoord,yCoord,zCoord,0,nbt);
|
||||
return new S35PacketUpdateTileEntity(pos,0,nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet){
|
||||
hasInsufficientEnergy = packet.func_148857_g().getBoolean("engInsuf"); // OBFUSCATED get tag data
|
||||
worldObj.markBlockRangeForRenderUpdate(xCoord,yCoord,zCoord,xCoord,yCoord,zCoord);
|
||||
hasInsufficientEnergy = packet.getNbtCompound().getBoolean("engInsuf");
|
||||
worldObj.markBlockRangeForRenderUpdate(pos,pos);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -10,18 +10,18 @@ public abstract class TileEntityAbstractSynchronized extends TileEntity{
|
||||
public abstract void readTileFromNBT(NBTTagCompound nbt);
|
||||
|
||||
public final void synchronize(){
|
||||
if (!worldObj.isRemote)worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
|
||||
if (!worldObj.isRemote)worldObj.markBlockForUpdate(pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket(){
|
||||
return new S35PacketUpdateTileEntity(xCoord,yCoord,zCoord,0,writeTileToNBT(new NBTTagCompound()));
|
||||
return new S35PacketUpdateTileEntity(pos,0,writeTileToNBT(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet){
|
||||
readTileFromNBT(packet.func_148857_g()); // OBFUSCATED get tag data
|
||||
worldObj.markBlockRangeForRenderUpdate(xCoord,yCoord,zCoord,xCoord,yCoord,zCoord);
|
||||
readTileFromNBT(packet.getNbtCompound()); // OBFUSCATED get tag data
|
||||
worldObj.markBlockRangeForRenderUpdate(pos,pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,15 +5,17 @@ import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.MobSpawnerBaseLogic;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import chylex.hee.tileentity.TileEntityCustomSpawner;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import chylex.hee.tileentity.TileEntityCustomSpawner;
|
||||
|
||||
public abstract class CustomSpawnerLogic extends MobSpawnerBaseLogic{
|
||||
protected TileEntityCustomSpawner spawnerTile;
|
||||
protected Entity entityCache;
|
||||
|
||||
protected int spawnDelay = 20;
|
||||
protected int minSpawnDelay = 200;
|
||||
protected int maxSpawnDelay = 800;
|
||||
protected byte spawnRange;
|
||||
@@ -35,9 +37,8 @@ public abstract class CustomSpawnerLogic extends MobSpawnerBaseLogic{
|
||||
|
||||
public void onBlockBreak(){}
|
||||
|
||||
@Override
|
||||
public boolean isActivated(){
|
||||
return getSpawnerWorld().getClosestPlayer(getSpawnerX()+0.5D,getSpawnerY()+0.5D,getSpawnerZ()+0.5D,activatingRangeFromPlayer) != null;
|
||||
return getSpawnerWorld().getClosestPlayer(spawnerTile.getPos().getX()+0.5D,spawnerTile.getPos().getY()+0.5D,spawnerTile.getPos().getZ()+0.5D,activatingRangeFromPlayer) != null;
|
||||
}
|
||||
|
||||
protected void resetTimer(){
|
||||
@@ -47,7 +48,7 @@ public abstract class CustomSpawnerLogic extends MobSpawnerBaseLogic{
|
||||
}
|
||||
|
||||
protected AxisAlignedBB getSpawnerCheckBB(){
|
||||
return AxisAlignedBB.getBoundingBox(getSpawnerX(),getSpawnerY(),getSpawnerZ(),getSpawnerX()+1,getSpawnerY()+1,getSpawnerZ()+1).expand(spawnRange*2D,4D,spawnRange*2D);
|
||||
return new AxisAlignedBB(spawnerTile.getPos(),spawnerTile.getPos().add(1,1,1)).expand(spawnRange*2D,4D,spawnRange*2D);
|
||||
}
|
||||
|
||||
protected boolean checkSpawnerConditions(){
|
||||
@@ -66,7 +67,7 @@ public abstract class CustomSpawnerLogic extends MobSpawnerBaseLogic{
|
||||
|
||||
@Override
|
||||
public final void func_98267_a(int i){
|
||||
spawnerTile.getWorld().addBlockEvent(spawnerTile.xCoord,spawnerTile.yCoord,spawnerTile.zCoord,Blocks.mob_spawner,i,0);
|
||||
spawnerTile.getWorld().addBlockEvent(spawnerTile.getPos(),Blocks.mob_spawner,i,0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -133,24 +134,14 @@ public abstract class CustomSpawnerLogic extends MobSpawnerBaseLogic{
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getSpawnerX(){
|
||||
return spawnerTile.xCoord;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getSpawnerY(){
|
||||
return spawnerTile.yCoord;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getSpawnerZ(){
|
||||
return spawnerTile.zCoord;
|
||||
public BlockPos func_177221_b(){ // OBFUSCATED getPos
|
||||
return spawnerTile.getPos();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public final Entity func_98281_h(){
|
||||
if (entityCache == null)entityCache = func_98265_a(createMob(null)); // OBFUSCATED spawn entity
|
||||
public final Entity func_180612_a(World world){
|
||||
if (entityCache == null)entityCache = func_98265_a(createMob(world)); // OBFUSCATED spawn entity
|
||||
return entityCache;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ public final class DimensionOverride{
|
||||
overrideWorldGen();
|
||||
|
||||
MapGenStructureIO.registerStructure(StructureTower.class,"hardcoreenderdragon_EndTower");
|
||||
MapGenStructureIO.func_143031_a(ComponentTower.class,"hardcoreenderdragon_EndTowerC"); // OBFUSCATED register structure component
|
||||
MapGenStructureIO.registerStructureComponent(ComponentTower.class,"hardcoreenderdragon_EndTowerC");
|
||||
MapGenStructureIO.registerStructure(StructureIsland.class,"hardcoreenderdragon_EndIsland");
|
||||
MapGenStructureIO.func_143031_a(ComponentIsland.class,"hardcoreenderdragon_EndIslandC");
|
||||
MapGenStructureIO.registerStructureComponent(ComponentIsland.class,"hardcoreenderdragon_EndIslandC");
|
||||
|
||||
if (BiomeGenHardcoreEnd.overrideWorldGen)MinecraftForge.EVENT_BUS.register(new DimensionOverride());
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ public abstract class MapGenScatteredFeatureCustom extends MapGenScatteredFeatur
|
||||
}
|
||||
|
||||
protected abstract boolean canStructureSpawn(int x, int z, double dist, Random rand);
|
||||
protected abstract String getStructureName();
|
||||
|
||||
@Override
|
||||
protected final boolean canSpawnStructureAtCoords(int x, int z){
|
||||
@@ -49,11 +48,6 @@ public abstract class MapGenScatteredFeatureCustom extends MapGenScatteredFeatur
|
||||
else return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String func_143025_a(){ // OBFUSCATED get structure name
|
||||
return getStructureName();
|
||||
}
|
||||
|
||||
public static final HeeTest $debugTest = new HeeTest(){
|
||||
@Override
|
||||
public void run(String...args){
|
||||
|
||||
@@ -148,8 +148,8 @@ public class ComponentIsland extends ComponentScatteredFeatureCustom{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_143012_a(NBTTagCompound nbt){ // OBFUSCATED writeToNBT
|
||||
super.func_143012_a(nbt);
|
||||
protected void writeStructureToNBT(NBTTagCompound nbt){
|
||||
super.writeStructureToNBT(nbt);
|
||||
nbt.setInteger("startX",startX);
|
||||
nbt.setInteger("startZ",startZ);
|
||||
nbt.setByte("bottomY",(byte)islandBottomY);
|
||||
@@ -157,8 +157,8 @@ public class ComponentIsland extends ComponentScatteredFeatureCustom{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_143011_b(NBTTagCompound nbt){ // OBFUSCATED readFromNBT
|
||||
super.func_143011_b(nbt);
|
||||
protected void readStructureFromNBT(NBTTagCompound nbt){
|
||||
super.readStructureFromNBT(nbt);
|
||||
startX = nbt.getInteger("startX");
|
||||
startZ = nbt.getInteger("startZ");
|
||||
islandBottomY = nbt.getByte("bottomY");
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ public class StructureSilverfishDungeon extends AbstractIslandStructure implemen
|
||||
ItemUtil.addLore(is,EnumChatFormatting.DARK_PURPLE.toString()+EnumChatFormatting.ITALIC+"It smells fishy...");
|
||||
}
|
||||
else if (is.getItem() == Items.enchanted_book){
|
||||
is.func_150996_a(Items.book); // OBFUSCATED set item
|
||||
is.setItem(Items.book);
|
||||
EnchantmentHelper.addRandomEnchantment(rand,is,13+rand.nextInt(7));
|
||||
}
|
||||
else if (is.isItemEnchantable() && is.getItem() != Items.book){
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ final class RavagedDungeonLoot{
|
||||
}
|
||||
}
|
||||
else if (is.getItem() == Items.enchanted_book){
|
||||
is.func_150996_a(Items.book); // OBFUSCATED set item
|
||||
is.setItem(Items.book);
|
||||
EnchantmentHelper.addRandomEnchantment(rand,is,15+rand.nextInt(10));
|
||||
}
|
||||
|
||||
|
||||
@@ -784,14 +784,16 @@ public class ComponentTower extends ComponentScatteredFeatureCustom{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_143012_a(NBTTagCompound nbt){ // OBFUSCATED writeToNBT
|
||||
protected void writeStructureToNBT(NBTTagCompound nbt){
|
||||
super.writeStructureToNBT(nbt);
|
||||
nbt.setInteger("startX",startX);
|
||||
nbt.setInteger("startZ",startZ);
|
||||
nbt.setByte("lastRoomUsed",lastRoomUsed);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_143011_b(NBTTagCompound nbt){ // OBFUSCATED readFromNBT
|
||||
protected void readStructureFromNBT(NBTTagCompound nbt){
|
||||
super.readStructureFromNBT(nbt);
|
||||
startX = nbt.getInteger("startX");
|
||||
startZ = nbt.getInteger("startZ");
|
||||
lastRoomUsed = nbt.getByte("lastRoomUsed");
|
||||
|
||||
Reference in new issue
Block a user