This commit is contained in:
brandon committed 2016-05-30 13:21:16 +10:00
1 parent 3943000ccb
commit c06423aac5
13 files changed
+43 -16

No files matched your search

@@ -162,7 +162,7 @@ public class ClientEventHandler {
@SubscribeEvent
public void renderArmorEvent(RenderPlayerEvent.SetArmorModel event) {
if (ConfigHandler.useOriginal3DArmorModel || ConfigHandler.useOldArmorModel) return;
if (ConfigHandler.useOriginal3DArmorModel || ConfigHandler.useOldArmorModel || event.isCanceled()) return;
if (event.stack != null && (event.stack.getItem() instanceof DraconicArmor || event.stack.getItem() instanceof WyvernArmor))
{
ItemArmor itemarmor = (ItemArmor)event.stack.getItem();
@@ -82,6 +82,7 @@ public class RenderTileCrystal extends TileEntitySpecialRenderer {
//--- Post Render ---//
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glDisable(GL11.GL_BLEND);
RenderHelper.enableStandardItemLighting();
GL11.glPopMatrix();
@@ -154,6 +155,7 @@ public class RenderTileCrystal extends TileEntitySpecialRenderer {
GL11.glDisable(GL11.GL_BLEND);
// RenderHelper.enableStandardItemLighting();
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glPopMatrix();
}
@@ -6,6 +6,7 @@ import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.IIcon;
import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockAccess;
@@ -27,7 +28,7 @@ public class DraconicBlock extends BlockDE {
@Override
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
return false;
return entity instanceof EntityPlayer;
}
@Override
@@ -41,7 +41,7 @@ public class DraconiumBlock extends BlockDE {
@Override
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
return false;
return entity instanceof EntityPlayer;
}
@Override
@@ -11,6 +11,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
@@ -36,7 +37,7 @@ public class DraconiumOre extends BlockDE {
@Override
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
return false;
return entity instanceof EntityPlayer;
}
@Override
@@ -44,7 +44,7 @@ public class InfusedObsidian extends BlockDE {
@Override
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
return false;
return entity instanceof EntityPlayer;
}
@Override
@@ -119,7 +119,7 @@ public class CustomArmorHandler {
if (summery.protectionPoints > 0){
DraconicEvolution.network.sendToAllAround(new ShieldHitPacket(player, summery.protectionPoints / summery.maxProtectionPoints), new NetworkRegistry.TargetPoint(player.dimension, player.posX, player.posY, player.posZ, 64));
player.worldObj.playSoundEffect(player.posX + 0.5D, player.posY + 0.5D, player.posZ + 0.5D, "draconicevolution:shieldStrike", 10.0F, player.worldObj.rand.nextFloat() * 0.1F + 1.055F);
player.worldObj.playSoundEffect(player.posX + 0.5D, player.posY + 0.5D, player.posZ + 0.5D, "draconicevolution:shieldStrike", 0.9F, player.worldObj.rand.nextFloat() * 0.1F + 1.055F);
}
if (remainingPoints > 0) {
@@ -140,10 +140,10 @@ public class CustomArmorHandler {
if (summery == null || event.source == ADMIN_KILL) return;
if (summery.protectionPoints > 20){
if (summery.protectionPoints > 500){
event.setCanceled(true);
event.entityLiving.setHealth(10);
LogHelper.warn("Something is trying to bypass the draconic shield. [Culprit: {Damage Type=" + event.source.damageType + ", Damage Class=" + event.source.toString() + "]");
// LogHelper.warn("Something is trying to bypass the draconic shield. [Culprit: {Damage Type=" + event.source.damageType + ", Damage Class=" + event.source.toString() + "]");
return;
}
@@ -237,7 +237,6 @@ public class CustomArmorHandler {
}
} else {
if (!playersWithFlight.containsKey(player)) {
playersWithFlight.put(player, false);
}
@@ -249,11 +248,15 @@ public class CustomArmorHandler {
player.capabilities.allowFlying = false;
player.capabilities.isFlying = false;
player.sendPlayerAbilities();
LogHelper.info("Send Disable");
}
}
if (player.worldObj.isRemote && playersWithFlight.get(player)){
playersWithFlight.put(player, false);
player.capabilities.allowFlying = false;
player.capabilities.isFlying = false;
LogHelper.info("Put Client");
setPlayerFlySpeed(player, 0.05F);
}
}
@@ -5,7 +5,7 @@ package com.brandon3055.draconicevolution.common.lib;
*/
public class VersionHandler
{
public static final String VERSION = "1.0.2d";
public static final String VERSION = "1.0.2e";
public static final int SNAPSHOT = 0;
public static final String MCVERSION = "1.7.10";
@@ -252,7 +252,7 @@ public class TileEnergyPylon extends TileObjectSync implements IEnergyHandler, I
public Packet getDescriptionPacket(){
NBTTagCompound nbttagcompound = new NBTTagCompound();
writeToNBT(nbttagcompound);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
}
@Override
@@ -47,6 +47,7 @@ public class ModHelper {
}
public static float applyModDamageAdjustments(ArmorSummery summery, LivingAttackEvent event){
if (summery == null) return event.ammount;
EntityPlayer attacker = event.source.getEntity() instanceof EntityPlayer ? (EntityPlayer) event.source.getEntity() : null;
if (attacker == null){
@@ -57,8 +58,7 @@ public class ModHelper {
event.entityLiving.hurtResistantTime = 0;
return 300F;
}
if (isHoldingBedrockSword(attacker)){
else if (isHoldingBedrockSword(attacker)){
summery.entropy += 10;
if (summery.entropy > 100){
@@ -67,6 +67,15 @@ public class ModHelper {
return Math.max(event.ammount, Math.min(50F, summery.protectionPoints));
}
else if (event.source.isUnblockable() || event.source.canHarmInCreative()){
summery.entropy += 3;
if (summery.entropy > 100){
summery.entropy = 100;
}
return event.ammount * 2;
}
return event.ammount;
}