This commit is contained in:
brandon committed 2016-04-17 16:15:17 +10:00
1 parent 2ba4c1d65b
commit 5699f8fd79
12 files changed
+45 -25

No files matched your search

@@ -138,4 +138,12 @@ public class GUIFlowGate extends GuiScreen {
public boolean doesGuiPauseGame() {
return false;
}
protected void keyTyped(char p_73869_1_, int key) {
if (key == 1 || key == this.mc.gameSettings.keyBindInventory.getKeyCode()){
this.mc.displayGuiScreen(null);
this.mc.setIngameFocus();
}
}
}
@@ -26,8 +26,6 @@ public class ReactorStabilizer extends BlockDE {
public ReactorStabilizer() {
this.setCreativeTab(DraconicEvolution.tabBlocksItems);
this.setBlockName("reactorStabilizer");
this.setResistance(10F);
this.setHardness(10F);
ModBlocks.register(this);
}
@@ -1,5 +1,6 @@
package com.brandon3055.draconicevolution.common.entity;
import com.brandon3055.brandonscore.common.utills.LogHelper;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.client.handler.ParticleHandler;
import com.brandon3055.draconicevolution.client.render.particle.Particles;
@@ -19,6 +20,8 @@ import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.play.server.S2BPacketChangeGameState;
import net.minecraft.util.*;
@@ -402,19 +405,21 @@ public class EntityCustomArrow extends EntityArrow {
@Override
public void onCollideWithPlayer(EntityPlayer par1EntityPlayer)
{
// if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) {
// boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && par1EntityPlayer.capabilities.isCreativeMode;
//
// if (this.canBePickedUp == 1 && !par1EntityPlayer.inventory.addItemStackToInventory(new ItemStack(Items.arrow, 1))) {
// flag = false;
// }
//
// if (flag) {
// this.playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
// par1EntityPlayer.onItemPickup(this, 1);
// this.setDead();
// }
// }
if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) {
LogHelper.info("collide "+ canBePickedUp);
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && par1EntityPlayer.capabilities.isCreativeMode;
if (this.canBePickedUp == 1 && !par1EntityPlayer.inventory.addItemStackToInventory(new ItemStack(Items.arrow, 1))) {
flag = false;
}
if (flag) {
this.playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
par1EntityPlayer.onItemPickup(this, 1);
this.setDead();
}
}
}
public void onHitEntityLiving(EntityLivingBase entityLivingBase){
@@ -421,6 +421,7 @@ public class EntityDraconicArrow extends EntityArrow {
public void onCollideWithPlayer(EntityPlayer par1EntityPlayer)
{
if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) {
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && par1EntityPlayer.capabilities.isCreativeMode;
if (this.canBePickedUp == 1 && !par1EntityPlayer.inventory.addItemStackToInventory(new ItemStack(Items.arrow, 1))) {
@@ -387,6 +387,11 @@ public class MinecraftForgeEventHandler {
{
if (summery.flight[0]) newDigSpeed *= 5f;
}
if (event.newSpeed > 1){
newDigSpeed += event.newSpeed-1;
}
event.newSpeed = newDigSpeed;
}
}
@@ -23,7 +23,6 @@ import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import java.lang.reflect.Field;
import java.util.*;
/**
@@ -34,7 +33,6 @@ public class CustomArmorHandler {
private static final DamageSource ADMIN_KILL = new DamageSource("administrative.kill").setDamageAllowedInCreativeMode().setDamageBypassesArmor().setDamageIsAbsolute();
public static Map<EntityPlayer, Boolean> playersWithFlight = new WeakHashMap<EntityPlayer, Boolean>();
public static List<String> playersWithUphillStep = new ArrayList<String>();
public static Field walkSpeed;
public static void onPlayerHurt(LivingHurtEvent event) {
// EntityPlayer player = (EntityPlayer) event.entityLiving;
@@ -93,8 +91,6 @@ public class CustomArmorHandler {
}
if ((float)player.hurtResistantTime > (float)player.maxHurtResistantTime / 2.0F) return;
com.brandon3055.brandonscore.common.utills.LogHelper.info(1 + (hitAmount / 10));
float newEntropy = Math.min(summery.entropy + 1 + (hitAmount / 20), 100F);
//Divide the damage between the armor peaces based on how many of the protection points each peace has
@@ -89,7 +89,6 @@ public class BowHandler {
world.playSoundAtEntity(player, "random.bow", 1.0F, (1.0F / (world.rand.nextFloat() * 0.4F + 1.2F) + (drawArrowSpeedModifier + (velocity / 40F)) * 0.5F));
}
public static void enderShot(ItemStack stack, World world, EntityPlayer player, int count, Random itemRand, float pullSpeedModifier, float speedModifier, float soundPitchModifier, int minRelease)
{
int j = 72000 - count;
@@ -213,6 +212,10 @@ public class BowHandler {
return Math.max(62 - (drawTimeReduction * 10), 1);
}
/**
* Consumes energy for the shot and also consumes an arrow if the bow dose not have infinity
* Returns true if an arrow was consumed.
* */
public boolean consumeArrowAndEnergy(){
if (!player.capabilities.isCreativeMode)((IEnergyContainerItem)bow.getItem()).extractEnergy(bow, calculateEnergyCost(), false);
@@ -5,7 +5,7 @@ package com.brandon3055.draconicevolution.common.lib;
*/
public class VersionHandler
{
public static final String VERSION = "1.0.2a";
public static final String VERSION = "1.0.2b";
public static final int SNAPSHOT = 0;
public static final String MCVERSION = "1.7.10";
@@ -43,7 +43,6 @@ public class ModHelper {
return 300F;
}
return event.ammount;
}