From 3efcf8059ff2d04d44b42ff41f386a58833fb1c8 Mon Sep 17 00:00:00 2001 From: Forstride Date: Thu, 25 Jul 2019 18:37:45 -0400 Subject: [PATCH] Removed tiny cacti and mud ball entity, fixed stack sizes for mud balls/music disc --- .../client/render/RenderMudBall.java | 12 --- .../entity/projectile/EntityMudBall.java | 77 ------------------- .../common/item/ItemMudBall.java | 47 ----------- 3 files changed, 136 deletions(-) delete mode 100644 src/main/java/biomesoplenty/client/render/RenderMudBall.java delete mode 100644 src/main/java/biomesoplenty/common/entity/projectile/EntityMudBall.java delete mode 100644 src/main/java/biomesoplenty/common/item/ItemMudBall.java diff --git a/src/main/java/biomesoplenty/client/render/RenderMudBall.java b/src/main/java/biomesoplenty/client/render/RenderMudBall.java deleted file mode 100644 index 101a6f8cb..000000000 --- a/src/main/java/biomesoplenty/client/render/RenderMudBall.java +++ /dev/null @@ -1,12 +0,0 @@ -/******************************************************************************* - * Copyright 2014-2019, the Biomes O' Plenty Team - * - * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. - * - * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. - ******************************************************************************/ -package biomesoplenty.client.render; - -public class RenderMudBall -{ -} diff --git a/src/main/java/biomesoplenty/common/entity/projectile/EntityMudBall.java b/src/main/java/biomesoplenty/common/entity/projectile/EntityMudBall.java deleted file mode 100644 index ea2f79763..000000000 --- a/src/main/java/biomesoplenty/common/entity/projectile/EntityMudBall.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright 2014-2019, the Biomes O' Plenty Team - * - * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. - * - * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. - ******************************************************************************/ -package biomesoplenty.common.entity.projectile; - -import biomesoplenty.api.entity.BOPEntities; -import biomesoplenty.api.item.BOPItems; -import biomesoplenty.api.particle.BOPParticleTypes; -import biomesoplenty.core.BiomesOPlenty; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityType; -import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.projectile.ProjectileItemEntity; -import net.minecraft.item.Item; -import net.minecraft.util.DamageSource; -import net.minecraft.util.math.EntityRayTraceResult; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; - -public class EntityMudBall extends ProjectileItemEntity -{ - public EntityMudBall(EntityType type, World world) - { - super(type, world); - } - - public EntityMudBall(World world, double x, double y, double z) - { - super((EntityType)BOPEntities.mud_ball, x, y, z, world); - } - - public EntityMudBall(World world, LivingEntity thrower) - { - super((EntityType)BOPEntities.mud_ball, thrower, world); - } - - @Override - protected Item func_213885_i() - { - return BOPItems.mud_ball; - } - - @OnlyIn(Dist.CLIENT) - @Override - public void handleStatusUpdate(byte id) - { - if (id == 3) - { - for (int i = 0; i < 8; ++i) - { - BiomesOPlenty.proxy.spawnParticle(BOPParticleTypes.MUD, this.world, this.posX, this.posY, this.posZ); - } - } - } - - @Override - protected void onImpact(RayTraceResult hit) - { - if (hit.getType() == RayTraceResult.Type.ENTITY) - { - Entity entity = ((EntityRayTraceResult)hit).getEntity(); - entity.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 0.0F); - } - - if (!this.world.isRemote) - { - this.world.setEntityState(this, (byte)3); - this.remove(); - } - } -} diff --git a/src/main/java/biomesoplenty/common/item/ItemMudBall.java b/src/main/java/biomesoplenty/common/item/ItemMudBall.java deleted file mode 100644 index 7c62f8a80..000000000 --- a/src/main/java/biomesoplenty/common/item/ItemMudBall.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright 2014-2019, the Biomes O' Plenty Team - * - * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. - * - * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. - ******************************************************************************/ -package biomesoplenty.common.item; - -import biomesoplenty.common.entity.projectile.EntityMudBall; -import biomesoplenty.common.util.inventory.ItemGroupBOP; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.Stats; -import net.minecraft.util.*; -import net.minecraft.world.World; - -public class ItemMudBall extends Item -{ - public ItemMudBall() - { - super(new Item.Properties().group(ItemGroupBOP.instance).maxStackSize(16)); - } - - @Override - public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) - { - ItemStack stack = player.getHeldItem(hand); - if (!player.abilities.isCreativeMode) - { - stack.setCount(stack.getCount() - 1); - } - - world.playSound(player, player.getPosition(), SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F)); - - if (!world.isRemote) - { - EntityMudBall mud_ball = new EntityMudBall(world, player); - mud_ball.shoot(player, player.rotationPitch, player.rotationYaw, 0.0F, 1.5F, 1.0F); - world.addEntity(mud_ball); - } - - player.addStat(Stats.ITEM_USED.get(this)); - return new ActionResult(ActionResultType.SUCCESS, stack); - } -}