Update Forge + mappings
This commit is contained in:
parent
b408234ab0
commit
d550513f0a
98 changed files with 313 additions and 296 deletions
|
@ -148,19 +148,19 @@ public class Utils
|
|||
switch (component)
|
||||
{
|
||||
case GLOWSTONE:
|
||||
return Blocks.glowstone;
|
||||
return Blocks.GLOWSTONE;
|
||||
case BLOODSTONE:
|
||||
return ModBlocks.bloodStoneBrick;
|
||||
case BEACON:
|
||||
return Blocks.beacon;
|
||||
return Blocks.BEACON;
|
||||
case BLOODRUNE:
|
||||
return ModBlocks.bloodRune;
|
||||
case CRYSTAL:
|
||||
return ModBlocks.crystal;
|
||||
case NOTAIR:
|
||||
return Blocks.stonebrick;
|
||||
return Blocks.STONEBRICK;
|
||||
default:
|
||||
return Blocks.air;
|
||||
return Blocks.AIR;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ public class Utils
|
|||
|
||||
public static float applyPotionDamageCalculations(EntityLivingBase attackedEntity, DamageSource source, float damage)
|
||||
{
|
||||
Potion resistance = MobEffects.resistance;
|
||||
Potion resistance = MobEffects.RESISTANCE;
|
||||
|
||||
if (source.isDamageAbsolute())
|
||||
{
|
||||
|
@ -694,11 +694,11 @@ public class Utils
|
|||
BlockStack initialStack = BlockStack.getStackFromPos(initialWorld, initialPos);
|
||||
BlockStack finalStack = BlockStack.getStackFromPos(finalWorld, finalPos);
|
||||
|
||||
if ((initialStack.getBlock().equals(Blocks.air) && finalStack.getBlock().equals(Blocks.air)) || initialStack.getBlock() instanceof BlockPortal || finalStack.getBlock() instanceof BlockPortal)
|
||||
if ((initialStack.getBlock().equals(Blocks.AIR) && finalStack.getBlock().equals(Blocks.AIR)) || initialStack.getBlock() instanceof BlockPortal || finalStack.getBlock() instanceof BlockPortal)
|
||||
return false;
|
||||
|
||||
initialWorld.playSound(initialPos.getX(), initialPos.getY(), initialPos.getZ(), SoundEvents.entity_endermen_teleport, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
|
||||
finalWorld.playSound(finalPos.getX(), finalPos.getY(), finalPos.getZ(), SoundEvents.entity_endermen_teleport, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
|
||||
initialWorld.playSound(initialPos.getX(), initialPos.getY(), initialPos.getZ(), SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
|
||||
finalWorld.playSound(finalPos.getX(), finalPos.getY(), finalPos.getZ(), SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
|
||||
|
||||
//Finally, we get to do something! (CLEARING TILES)
|
||||
if (finalStack.getBlock() != null)
|
||||
|
|
|
@ -313,7 +313,7 @@ public class EventHandler
|
|||
|
||||
if (percentIncrease > 0 && (player.onGround || player.capabilities.isFlying) && player.moveForward > 0F)
|
||||
{
|
||||
player.moveFlying(0F, 1F, player.capabilities.isFlying ? (percentIncrease / 2.0f) : percentIncrease);
|
||||
player.moveRelative(0F, 1F, player.capabilities.isFlying ? (percentIncrease / 2.0f) : percentIncrease);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void onBucketFill(FillBucketEvent event)
|
||||
{
|
||||
if (event.getEmptyBucket().getItem() != Items.bucket)
|
||||
if (event.getEmptyBucket().getItem() != Items.BUCKET)
|
||||
return;
|
||||
|
||||
ItemStack result = null;
|
||||
|
@ -682,7 +682,7 @@ public class EventHandler
|
|||
StatTrackerSprintAttack.incrementCounter(armour, amount);
|
||||
}
|
||||
|
||||
boolean isCritical = lastPlayerSwingStrength > 0.9 && player.fallDistance > 0.0F && !player.onGround && !player.isOnLadder() && !player.isInWater() && !player.isPotionActive(MobEffects.blindness) && !player.isRiding() && !player.isSprinting();
|
||||
boolean isCritical = lastPlayerSwingStrength > 0.9 && player.fallDistance > 0.0F && !player.onGround && !player.isOnLadder() && !player.isInWater() && !player.isPotionActive(MobEffects.BLINDNESS) && !player.isRiding() && !player.isSprinting();
|
||||
if (isCritical)
|
||||
{
|
||||
StatTrackerCriticalStrike.incrementCounter(armour, amount);
|
||||
|
@ -734,8 +734,8 @@ public class EventHandler
|
|||
int numberExtra = ((LivingArmourUpgradeArrowShot) upgrade).getExtraArrows();
|
||||
for (int n = 0; n < numberExtra; n++)
|
||||
{
|
||||
ItemArrow itemarrow = (ItemArrow) Items.arrow;
|
||||
EntityArrow entityarrow = itemarrow.createArrow(world, new ItemStack(Items.arrow), player);
|
||||
ItemArrow itemarrow = (ItemArrow) Items.ARROW;
|
||||
EntityArrow entityarrow = itemarrow.createArrow(world, new ItemStack(Items.ARROW), player);
|
||||
|
||||
double velocityModifier = 0.6 * f;
|
||||
entityarrow.motionX += (random.nextDouble() - 0.5) * velocityModifier;
|
||||
|
@ -747,26 +747,26 @@ public class EventHandler
|
|||
entityarrow.setIsCritical(true);
|
||||
}
|
||||
|
||||
int j = EnchantmentHelper.getEnchantmentLevel(Enchantments.power, stack);
|
||||
int j = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack);
|
||||
|
||||
if (j > 0)
|
||||
{
|
||||
entityarrow.setDamage(entityarrow.getDamage() + (double) j * 0.5D + 0.5D);
|
||||
}
|
||||
|
||||
int k = EnchantmentHelper.getEnchantmentLevel(Enchantments.punch, stack);
|
||||
int k = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack);
|
||||
|
||||
if (k > 0)
|
||||
{
|
||||
entityarrow.setKnockbackStrength(k);
|
||||
}
|
||||
|
||||
if (EnchantmentHelper.getEnchantmentLevel(Enchantments.flame, stack) > 0)
|
||||
if (EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, stack) > 0)
|
||||
{
|
||||
entityarrow.setFire(100);
|
||||
}
|
||||
|
||||
entityarrow.canBePickedUp = EntityArrow.PickupStatus.CREATIVE_ONLY;
|
||||
entityarrow.pickupStatus = EntityArrow.PickupStatus.CREATIVE_ONLY;
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
|
|
|
@ -5,7 +5,9 @@ import WayofTime.bloodmagic.util.Utils;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.event.FMLInterModComms;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IMCHandler
|
||||
|
@ -37,7 +39,7 @@ public class IMCHandler
|
|||
String[] splitInfo = message.getStringValue().split(":");
|
||||
if (splitInfo.length == 2)
|
||||
{
|
||||
Block block = GameRegistry.findBlock(splitInfo[0], splitInfo[1]);
|
||||
Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(splitInfo[0], splitInfo[1]));
|
||||
if (block != null)
|
||||
BloodMagicAPI.blacklistFromGreenGrove(block);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue