diff --git a/src/main/java/biomesoplenty/api/item/BOPItems.java b/src/main/java/biomesoplenty/api/item/BOPItems.java index 9b95f05c8..a54bc1708 100644 --- a/src/main/java/biomesoplenty/api/item/BOPItems.java +++ b/src/main/java/biomesoplenty/api/item/BOPItems.java @@ -48,6 +48,23 @@ public class BOPItems public static Item pinecone; public static Item other_slab; + public static Item boat_sacred_oak; + public static Item boat_cherry; + public static Item boat_umbran; + public static Item boat_fir; + public static Item boat_ethereal; + public static Item boat_magic; + public static Item boat_mangrove; + public static Item boat_palm; + public static Item boat_redwood; + public static Item boat_willow; + public static Item boat_pine; + public static Item boat_hellbark; + public static Item boat_jacaranda; + public static Item boat_mahogany; + public static Item boat_ebony; + public static Item boat_eucalyptus; + public static Item sacred_oak_door; public static Item cherry_door; public static Item umbran_door; diff --git a/src/main/java/biomesoplenty/common/entities/item/EntityBOPBoat.java b/src/main/java/biomesoplenty/common/entities/item/EntityBOPBoat.java new file mode 100644 index 000000000..b26f69847 --- /dev/null +++ b/src/main/java/biomesoplenty/common/entities/item/EntityBOPBoat.java @@ -0,0 +1,1083 @@ +/******************************************************************************* + * Copyright 2015-2016, 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.entities.item; + +import java.util.List; + +import javax.annotation.Nullable; + +import com.google.common.collect.Lists; + +import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.enums.BOPWoods; +import biomesoplenty.api.item.BOPItems; +import net.minecraft.block.BlockLiquid; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.MoverType; +import net.minecraft.entity.item.EntityBoat; +import net.minecraft.entity.passive.EntityAnimal; +import net.minecraft.entity.passive.EntityWaterMob; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.init.SoundEvents; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.datasync.DataParameter; +import net.minecraft.network.datasync.DataSerializers; +import net.minecraft.network.datasync.EntityDataManager; +import net.minecraft.network.play.client.CPacketSteerBoat; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EntityDamageSourceIndirect; +import net.minecraft.util.EntitySelectors; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.SoundEvent; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class EntityBOPBoat extends EntityBoat +{ + private static final DataParameter TIME_SINCE_HIT = EntityDataManager.createKey(EntityBOPBoat.class, DataSerializers.VARINT); + private static final DataParameter FORWARD_DIRECTION = EntityDataManager.createKey(EntityBOPBoat.class, DataSerializers.VARINT); + private static final DataParameter DAMAGE_TAKEN = EntityDataManager.createKey(EntityBOPBoat.class, DataSerializers.FLOAT); + private static final DataParameter BOAT_TYPE = EntityDataManager.createKey(EntityBOPBoat.class, DataSerializers.VARINT); + private static final DataParameter[] DATA_ID_PADDLE = new DataParameter[] {EntityDataManager.createKey(EntityBOPBoat.class, DataSerializers.BOOLEAN), EntityDataManager.createKey(EntityBOPBoat.class, DataSerializers.BOOLEAN)}; + private final float[] paddlePositions; + private float momentum; + private float outOfControlTicks; + private float deltaRotation; + private int lerpSteps; + private double lerpX; + private double lerpY; + private double lerpZ; + private double lerpYaw; + private double lerpPitch; + private boolean leftInputDown; + private boolean rightInputDown; + private boolean forwardInputDown; + private boolean backInputDown; + private double waterLevel; + private float boatGlide; + private EntityBOPBoat.Status status; + private EntityBOPBoat.Status previousStatus; + private double lastYd; + + public EntityBOPBoat(World worldIn) + { + super(worldIn); + this.paddlePositions = new float[2]; + this.preventEntitySpawning = true; + this.setSize(1.375F, 0.5625F); + } + + public EntityBOPBoat(World worldIn, double x, double y, double z) + { + this(worldIn); + this.setPosition(x, y, z); + this.motionX = 0.0D; + this.motionY = 0.0D; + this.motionZ = 0.0D; + this.prevPosX = x; + this.prevPosY = y; + this.prevPosZ = z; + } + + @Override + protected boolean canTriggerWalking() + { + return false; + } + + @Override + protected void entityInit() + { + this.dataManager.register(TIME_SINCE_HIT, Integer.valueOf(0)); + this.dataManager.register(FORWARD_DIRECTION, Integer.valueOf(1)); + this.dataManager.register(DAMAGE_TAKEN, Float.valueOf(0.0F)); + this.dataManager.register(BOAT_TYPE, Integer.valueOf(EntityBOPBoat.Type.SACRED_OAK.ordinal())); + + for (DataParameter dataparameter : DATA_ID_PADDLE) + { + this.dataManager.register(dataparameter, Boolean.valueOf(false)); + } + } + + @Nullable + @Override + public AxisAlignedBB getCollisionBox(Entity entityIn) + { + return entityIn.canBePushed() ? entityIn.getEntityBoundingBox() : null; + } + + @Nullable + @Override + public AxisAlignedBB getCollisionBoundingBox() + { + return this.getEntityBoundingBox(); + } + + @Override + public boolean canBePushed() + { + return true; + } + + @Override + public double getMountedYOffset() + { + return -0.1D; + } + + @Override + public boolean attackEntityFrom(DamageSource source, float amount) + { + if (this.isEntityInvulnerable(source)) + { + return false; + } + else if (!this.world.isRemote && !this.isDead) + { + if (source instanceof EntityDamageSourceIndirect && source.getTrueSource() != null && this.isPassenger(source.getTrueSource())) + { + return false; + } + else + { + this.setForwardDirection(-this.getForwardDirection()); + this.setTimeSinceHit(10); + this.setDamageTaken(this.getDamageTaken() + amount * 10.0F); + this.markVelocityChanged(); + boolean flag = source.getTrueSource() instanceof EntityPlayer && ((EntityPlayer)source.getTrueSource()).capabilities.isCreativeMode; + + if (flag || this.getDamageTaken() > 40.0F) + { + if (!flag && this.world.getGameRules().getBoolean("doEntityDrops")) + { + this.dropItemWithOffset(this.getItemBoat(), 1, 0.0F); + } + + this.setDead(); + } + + return true; + } + } + else + { + return true; + } + } + + @Override + public void applyEntityCollision(Entity entityIn) + { + if (entityIn instanceof EntityBOPBoat) + { + if (entityIn.getEntityBoundingBox().minY < this.getEntityBoundingBox().maxY) + { + super.applyEntityCollision(entityIn); + } + } + else if (entityIn.getEntityBoundingBox().minY <= this.getEntityBoundingBox().minY) + { + super.applyEntityCollision(entityIn); + } + } + + @Override + public Item getItemBoat() + { + switch (this.getBOPBoatType()) + { + case SACRED_OAK: + default: + return BOPItems.boat_sacred_oak; + case CHERRY: + return BOPItems.boat_cherry; + case UMBRAN: + return BOPItems.boat_umbran; + case FIR: + return BOPItems.boat_fir; + case ETHEREAL: + return BOPItems.boat_ethereal; + case MAGIC: + return BOPItems.boat_magic; + case MANGROVE: + return BOPItems.boat_mangrove; + case PALM: + return BOPItems.boat_palm; + case REDWOOD: + return BOPItems.boat_redwood; + case WILLOW: + return BOPItems.boat_willow; + case PINE: + return BOPItems.boat_pine; + case HELLBARK: + return BOPItems.boat_hellbark; + case JACARANDA: + return BOPItems.boat_jacaranda; + case MAHOGANY: + return BOPItems.boat_mahogany; + case EBONY: + return BOPItems.boat_ebony; + case EUCALYPTUS: + return BOPItems.boat_eucalyptus; + } + } + + @SideOnly(Side.CLIENT) + @Override + public void performHurtAnimation() + { + this.setForwardDirection(-this.getForwardDirection()); + this.setTimeSinceHit(10); + this.setDamageTaken(this.getDamageTaken() * 11.0F); + } + + @Override + public boolean canBeCollidedWith() + { + return !this.isDead; + } + + @SideOnly(Side.CLIENT) + @Override + public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport) + { + this.lerpX = x; + this.lerpY = y; + this.lerpZ = z; + this.lerpYaw = (double)yaw; + this.lerpPitch = (double)pitch; + this.lerpSteps = 10; + } + + @Override + public EnumFacing getAdjustedHorizontalFacing() + { + return this.getHorizontalFacing().rotateY(); + } + + @Override + public void onUpdate() + { + this.previousStatus = this.status; + this.status = this.getBoatStatus(); + + if (this.status != EntityBOPBoat.Status.UNDER_WATER && this.status != EntityBOPBoat.Status.UNDER_FLOWING_WATER) + { + this.outOfControlTicks = 0.0F; + } + else + { + ++this.outOfControlTicks; + } + + if (!this.world.isRemote && this.outOfControlTicks >= 60.0F) + { + this.removePassengers(); + } + + if (this.getTimeSinceHit() > 0) + { + this.setTimeSinceHit(this.getTimeSinceHit() - 1); + } + + if (this.getDamageTaken() > 0.0F) + { + this.setDamageTaken(this.getDamageTaken() - 1.0F); + } + + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + super.onUpdate(); + this.tickLerp(); + + if (this.canPassengerSteer()) + { + if (this.getPassengers().isEmpty() || !(this.getPassengers().get(0) instanceof EntityPlayer)) + { + this.setPaddleState(false, false); + } + + this.updateMotion(); + + if (this.world.isRemote) + { + this.controlBoat(); + this.world.sendPacketToServer(new CPacketSteerBoat(this.getPaddleState(0), this.getPaddleState(1))); + } + + this.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ); + } + else + { + this.motionX = 0.0D; + this.motionY = 0.0D; + this.motionZ = 0.0D; + } + + for (int i = 0; i <= 1; ++i) + { + if (this.getPaddleState(i)) + { + if (!this.isSilent() && (double)(this.paddlePositions[i] % ((float)Math.PI * 2F)) <= (Math.PI / 4D) && ((double)this.paddlePositions[i] + 0.39269909262657166D) % (Math.PI * 2D) >= (Math.PI / 4D)) + { + SoundEvent soundevent = this.getPaddleSound(); + + if (soundevent != null) + { + Vec3d vec3d = this.getLook(1.0F); + double d0 = i == 1 ? -vec3d.z : vec3d.z; + double d1 = i == 1 ? vec3d.x : -vec3d.x; + this.world.playSound((EntityPlayer)null, this.posX + d0, this.posY, this.posZ + d1, soundevent, this.getSoundCategory(), 1.0F, 0.8F + 0.4F * this.rand.nextFloat()); + } + } + + this.paddlePositions[i] = (float)((double)this.paddlePositions[i] + 0.39269909262657166D); + } + else + { + this.paddlePositions[i] = 0.0F; + } + } + + this.doBlockCollisions(); + List list = this.world.getEntitiesInAABBexcluding(this, this.getEntityBoundingBox().grow(0.20000000298023224D, -0.009999999776482582D, 0.20000000298023224D), EntitySelectors.getTeamCollisionPredicate(this)); + + if (!list.isEmpty()) + { + boolean flag = !this.world.isRemote && !(this.getControllingPassenger() instanceof EntityPlayer); + + for (int j = 0; j < list.size(); ++j) + { + Entity entity = list.get(j); + + if (!entity.isPassenger(this)) + { + if (flag && this.getPassengers().size() < 2 && !entity.isRiding() && entity.width < this.width && entity instanceof EntityLivingBase && !(entity instanceof EntityWaterMob) && !(entity instanceof EntityPlayer)) + { + entity.startRiding(this); + } + else + { + this.applyEntityCollision(entity); + } + } + } + } + } + + @Nullable + @Override + protected SoundEvent getPaddleSound() + { + switch (this.getBoatStatus()) + { + case IN_WATER: + case UNDER_WATER: + case UNDER_FLOWING_WATER: + return SoundEvents.ENTITY_BOAT_PADDLE_WATER; + case ON_LAND: + return SoundEvents.ENTITY_BOAT_PADDLE_LAND; + case IN_AIR: + default: + return null; + } + } + + private void tickLerp() + { + if (this.lerpSteps > 0 && !this.canPassengerSteer()) + { + double d0 = this.posX + (this.lerpX - this.posX) / (double)this.lerpSteps; + double d1 = this.posY + (this.lerpY - this.posY) / (double)this.lerpSteps; + double d2 = this.posZ + (this.lerpZ - this.posZ) / (double)this.lerpSteps; + double d3 = MathHelper.wrapDegrees(this.lerpYaw - (double)this.rotationYaw); + this.rotationYaw = (float)((double)this.rotationYaw + d3 / (double)this.lerpSteps); + this.rotationPitch = (float)((double)this.rotationPitch + (this.lerpPitch - (double)this.rotationPitch) / (double)this.lerpSteps); + --this.lerpSteps; + this.setPosition(d0, d1, d2); + this.setRotation(this.rotationYaw, this.rotationPitch); + } + } + + @Override + public void setPaddleState(boolean left, boolean right) + { + this.dataManager.set(DATA_ID_PADDLE[0], Boolean.valueOf(left)); + this.dataManager.set(DATA_ID_PADDLE[1], Boolean.valueOf(right)); + } + + @SideOnly(Side.CLIENT) + @Override + public float getRowingTime(int side, float limbSwing) + { + return this.getPaddleState(side) ? (float)MathHelper.clampedLerp((double)this.paddlePositions[side] - 0.39269909262657166D, (double)this.paddlePositions[side], (double)limbSwing) : 0.0F; + } + + private EntityBOPBoat.Status getBoatStatus() + { + EntityBOPBoat.Status entitybopboat$status = this.getUnderwaterStatus(); + + if (entitybopboat$status != null) + { + this.waterLevel = this.getEntityBoundingBox().maxY; + return entitybopboat$status; + } + else if (this.checkInWater()) + { + return EntityBOPBoat.Status.IN_WATER; + } + else + { + float f = this.getBoatGlide(); + + if (f > 0.0F) + { + this.boatGlide = f; + return EntityBOPBoat.Status.ON_LAND; + } + else + { + return EntityBOPBoat.Status.IN_AIR; + } + } + } + + @Override + public float getWaterLevelAbove() + { + AxisAlignedBB axisalignedbb = this.getEntityBoundingBox(); + int i = MathHelper.floor(axisalignedbb.minX); + int j = MathHelper.ceil(axisalignedbb.maxX); + int k = MathHelper.floor(axisalignedbb.maxY); + int l = MathHelper.ceil(axisalignedbb.maxY - this.lastYd); + int i1 = MathHelper.floor(axisalignedbb.minZ); + int j1 = MathHelper.ceil(axisalignedbb.maxZ); + BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.retain(); + + try + { + label108: + + for (int k1 = k; k1 < l; ++k1) + { + float f = 0.0F; + int l1 = i; + + while (true) + { + if (l1 >= j) + { + if (f < 1.0F) + { + float f2 = (float)blockpos$pooledmutableblockpos.getY() + f; + return f2; + } + + break; + } + + for (int i2 = i1; i2 < j1; ++i2) + { + blockpos$pooledmutableblockpos.setPos(l1, k1, i2); + IBlockState iblockstate = this.world.getBlockState(blockpos$pooledmutableblockpos); + + if (iblockstate.getMaterial() == Material.WATER) + { + f = Math.max(f, BlockLiquid.getBlockLiquidHeight(iblockstate, this.world, blockpos$pooledmutableblockpos)); + } + + if (f >= 1.0F) + { + continue label108; + } + } + + ++l1; + } + } + + float f1 = (float)(l + 1); + return f1; + } + finally + { + blockpos$pooledmutableblockpos.release(); + } + } + + @Override + public float getBoatGlide() + { + AxisAlignedBB axisalignedbb = this.getEntityBoundingBox(); + AxisAlignedBB axisalignedbb1 = new AxisAlignedBB(axisalignedbb.minX, axisalignedbb.minY - 0.001D, axisalignedbb.minZ, axisalignedbb.maxX, axisalignedbb.minY, axisalignedbb.maxZ); + int i = MathHelper.floor(axisalignedbb1.minX) - 1; + int j = MathHelper.ceil(axisalignedbb1.maxX) + 1; + int k = MathHelper.floor(axisalignedbb1.minY) - 1; + int l = MathHelper.ceil(axisalignedbb1.maxY) + 1; + int i1 = MathHelper.floor(axisalignedbb1.minZ) - 1; + int j1 = MathHelper.ceil(axisalignedbb1.maxZ) + 1; + List list = Lists.newArrayList(); + float f = 0.0F; + int k1 = 0; + BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.retain(); + + try + { + for (int l1 = i; l1 < j; ++l1) + { + for (int i2 = i1; i2 < j1; ++i2) + { + int j2 = (l1 != i && l1 != j - 1 ? 0 : 1) + (i2 != i1 && i2 != j1 - 1 ? 0 : 1); + + if (j2 != 2) + { + for (int k2 = k; k2 < l; ++k2) + { + if (j2 <= 0 || k2 != k && k2 != l - 1) + { + blockpos$pooledmutableblockpos.setPos(l1, k2, i2); + IBlockState iblockstate = this.world.getBlockState(blockpos$pooledmutableblockpos); + iblockstate.addCollisionBoxToList(this.world, blockpos$pooledmutableblockpos, axisalignedbb1, list, this, false); + + if (!list.isEmpty()) + { + f += iblockstate.getBlock().getSlipperiness(iblockstate, this.world, blockpos$pooledmutableblockpos, this); + ++k1; + } + + list.clear(); + } + } + } + } + } + } + finally + { + blockpos$pooledmutableblockpos.release(); + } + + return f / (float)k1; + } + + private boolean checkInWater() + { + AxisAlignedBB axisalignedbb = this.getEntityBoundingBox(); + int i = MathHelper.floor(axisalignedbb.minX); + int j = MathHelper.ceil(axisalignedbb.maxX); + int k = MathHelper.floor(axisalignedbb.minY); + int l = MathHelper.ceil(axisalignedbb.minY + 0.001D); + int i1 = MathHelper.floor(axisalignedbb.minZ); + int j1 = MathHelper.ceil(axisalignedbb.maxZ); + boolean flag = false; + this.waterLevel = Double.MIN_VALUE; + BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.retain(); + + try + { + for (int k1 = i; k1 < j; ++k1) + { + for (int l1 = k; l1 < l; ++l1) + { + for (int i2 = i1; i2 < j1; ++i2) + { + blockpos$pooledmutableblockpos.setPos(k1, l1, i2); + IBlockState iblockstate = this.world.getBlockState(blockpos$pooledmutableblockpos); + + if (iblockstate.getMaterial() == Material.WATER) + { + float f = BlockLiquid.getLiquidHeight(iblockstate, this.world, blockpos$pooledmutableblockpos); + this.waterLevel = Math.max((double)f, this.waterLevel); + flag |= axisalignedbb.minY < (double)f; + } + } + } + } + } + finally + { + blockpos$pooledmutableblockpos.release(); + } + + return flag; + } + + @Nullable + private EntityBOPBoat.Status getUnderwaterStatus() + { + AxisAlignedBB axisalignedbb = this.getEntityBoundingBox(); + double d0 = axisalignedbb.maxY + 0.001D; + int i = MathHelper.floor(axisalignedbb.minX); + int j = MathHelper.ceil(axisalignedbb.maxX); + int k = MathHelper.floor(axisalignedbb.maxY); + int l = MathHelper.ceil(d0); + int i1 = MathHelper.floor(axisalignedbb.minZ); + int j1 = MathHelper.ceil(axisalignedbb.maxZ); + boolean flag = false; + BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.retain(); + + try + { + for (int k1 = i; k1 < j; ++k1) + { + for (int l1 = k; l1 < l; ++l1) + { + for (int i2 = i1; i2 < j1; ++i2) + { + blockpos$pooledmutableblockpos.setPos(k1, l1, i2); + IBlockState iblockstate = this.world.getBlockState(blockpos$pooledmutableblockpos); + + if (iblockstate.getMaterial() == Material.WATER && d0 < (double)BlockLiquid.getLiquidHeight(iblockstate, this.world, blockpos$pooledmutableblockpos)) + { + if (((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() != 0) + { + EntityBOPBoat.Status entitybopboat$status = EntityBOPBoat.Status.UNDER_FLOWING_WATER; + return entitybopboat$status; + } + + flag = true; + } + } + } + } + } + finally + { + blockpos$pooledmutableblockpos.release(); + } + + return flag ? EntityBOPBoat.Status.UNDER_WATER : null; + } + + private void updateMotion() + { + double d0 = -0.03999999910593033D; + double d1 = this.hasNoGravity() ? 0.0D : -0.03999999910593033D; + double d2 = 0.0D; + this.momentum = 0.05F; + + if (this.previousStatus == EntityBOPBoat.Status.IN_AIR && this.status != EntityBOPBoat.Status.IN_AIR && this.status != EntityBOPBoat.Status.ON_LAND) + { + this.waterLevel = this.getEntityBoundingBox().minY + (double)this.height; + this.setPosition(this.posX, (double)(this.getWaterLevelAbove() - this.height) + 0.101D, this.posZ); + this.motionY = 0.0D; + this.lastYd = 0.0D; + this.status = EntityBOPBoat.Status.IN_WATER; + } + else + { + if (this.status == EntityBOPBoat.Status.IN_WATER) + { + d2 = (this.waterLevel - this.getEntityBoundingBox().minY) / (double)this.height; + this.momentum = 0.9F; + } + else if (this.status == EntityBOPBoat.Status.UNDER_FLOWING_WATER) + { + d1 = -7.0E-4D; + this.momentum = 0.9F; + } + else if (this.status == EntityBOPBoat.Status.UNDER_WATER) + { + d2 = 0.009999999776482582D; + this.momentum = 0.45F; + } + else if (this.status == EntityBOPBoat.Status.IN_AIR) + { + this.momentum = 0.9F; + } + else if (this.status == EntityBOPBoat.Status.ON_LAND) + { + this.momentum = this.boatGlide; + + if (this.getControllingPassenger() instanceof EntityPlayer) + { + this.boatGlide /= 2.0F; + } + } + + this.motionX *= (double)this.momentum; + this.motionZ *= (double)this.momentum; + this.deltaRotation *= this.momentum; + this.motionY += d1; + + if (d2 > 0.0D) + { + double d3 = 0.65D; + this.motionY += d2 * 0.06153846016296973D; + double d4 = 0.75D; + this.motionY *= 0.75D; + } + } + } + + private void controlBoat() + { + if (this.isBeingRidden()) + { + float f = 0.0F; + + if (this.leftInputDown) + { + this.deltaRotation += -1.0F; + } + + if (this.rightInputDown) + { + ++this.deltaRotation; + } + + if (this.rightInputDown != this.leftInputDown && !this.forwardInputDown && !this.backInputDown) + { + f += 0.005F; + } + + this.rotationYaw += this.deltaRotation; + + if (this.forwardInputDown) + { + f += 0.04F; + } + + if (this.backInputDown) + { + f -= 0.005F; + } + + this.motionX += (double)(MathHelper.sin(-this.rotationYaw * 0.017453292F) * f); + this.motionZ += (double)(MathHelper.cos(this.rotationYaw * 0.017453292F) * f); + this.setPaddleState(this.rightInputDown && !this.leftInputDown || this.forwardInputDown, this.leftInputDown && !this.rightInputDown || this.forwardInputDown); + } + } + + @Override + public void updatePassenger(Entity passenger) + { + if (this.isPassenger(passenger)) + { + float f = 0.0F; + float f1 = (float)((this.isDead ? 0.009999999776482582D : this.getMountedYOffset()) + passenger.getYOffset()); + + if (this.getPassengers().size() > 1) + { + int i = this.getPassengers().indexOf(passenger); + + if (i == 0) + { + f = 0.2F; + } + else + { + f = -0.6F; + } + + if (passenger instanceof EntityAnimal) + { + f = (float)((double)f + 0.2D); + } + } + + Vec3d vec3d = (new Vec3d((double)f, 0.0D, 0.0D)).rotateYaw(-this.rotationYaw * 0.017453292F - ((float)Math.PI / 2F)); + passenger.setPosition(this.posX + vec3d.x, this.posY + (double)f1, this.posZ + vec3d.z); + passenger.rotationYaw += this.deltaRotation; + passenger.setRotationYawHead(passenger.getRotationYawHead() + this.deltaRotation); + this.applyYawToEntity(passenger); + + if (passenger instanceof EntityAnimal && this.getPassengers().size() > 1) + { + int j = passenger.getEntityId() % 2 == 0 ? 90 : 270; + passenger.setRenderYawOffset(((EntityAnimal)passenger).renderYawOffset + (float)j); + passenger.setRotationYawHead(passenger.getRotationYawHead() + (float)j); + } + } + } + + @Override + protected void applyYawToEntity(Entity entityToUpdate) + { + entityToUpdate.setRenderYawOffset(this.rotationYaw); + float f = MathHelper.wrapDegrees(entityToUpdate.rotationYaw - this.rotationYaw); + float f1 = MathHelper.clamp(f, -105.0F, 105.0F); + entityToUpdate.prevRotationYaw += f1 - f; + entityToUpdate.rotationYaw += f1 - f; + entityToUpdate.setRotationYawHead(entityToUpdate.rotationYaw); + } + + @SideOnly(Side.CLIENT) + @Override + public void applyOrientationToEntity(Entity entityToUpdate) + { + this.applyYawToEntity(entityToUpdate); + } + + @Override + protected void writeEntityToNBT(NBTTagCompound compound) + { + compound.setString("Type", this.getBOPBoatType().getName()); + } + + @Override + protected void readEntityFromNBT(NBTTagCompound compound) + { + if (compound.hasKey("Type", 8)) + { + this.setBoatType(EntityBOPBoat.Type.getTypeFromString(compound.getString("Type"))); + } + } + + @Override + public boolean processInitialInteract(EntityPlayer player, EnumHand hand) + { + if (player.isSneaking()) + { + return false; + } + else + { + if (!this.world.isRemote && this.outOfControlTicks < 60.0F) + { + player.startRiding(this); + } + + return true; + } + } + + @Override + protected void updateFallState(double y, boolean onGroundIn, IBlockState state, BlockPos pos) + { + this.lastYd = this.motionY; + + if (!this.isRiding()) + { + if (onGroundIn) + { + if (this.fallDistance > 3.0F) + { + if (this.status != EntityBOPBoat.Status.ON_LAND) + { + this.fallDistance = 0.0F; + return; + } + + this.fall(this.fallDistance, 1.0F); + + if (!this.world.isRemote && !this.isDead) + { + this.setDead(); + + if (this.world.getGameRules().getBoolean("doEntityDrops")) + { + for (int i = 0; i < 3; ++i) + { + this.entityDropItem(new ItemStack(Item.getItemFromBlock(BOPBlocks.planks_0), 1, this.getBOPBoatType().getMetadata()), 0.0F); + } + + for (int j = 0; j < 2; ++j) + { + this.dropItemWithOffset(Items.STICK, 1, 0.0F); + } + } + } + } + + this.fallDistance = 0.0F; + } + else if (this.world.getBlockState((new BlockPos(this)).down()).getMaterial() != Material.WATER && y < 0.0D) + { + this.fallDistance = (float)((double)this.fallDistance - y); + } + } + } + + @Override + public boolean getPaddleState(int side) + { + return ((Boolean)this.dataManager.get(DATA_ID_PADDLE[side])).booleanValue() && this.getControllingPassenger() != null; + } + + @Override + public void setDamageTaken(float damageTaken) + { + this.dataManager.set(DAMAGE_TAKEN, Float.valueOf(damageTaken)); + } + + @Override + public float getDamageTaken() + { + return ((Float)this.dataManager.get(DAMAGE_TAKEN)).floatValue(); + } + + @Override + public void setTimeSinceHit(int timeSinceHit) + { + this.dataManager.set(TIME_SINCE_HIT, Integer.valueOf(timeSinceHit)); + } + + @Override + public int getTimeSinceHit() + { + return ((Integer)this.dataManager.get(TIME_SINCE_HIT)).intValue(); + } + + @Override + public void setForwardDirection(int forwardDirection) + { + this.dataManager.set(FORWARD_DIRECTION, Integer.valueOf(forwardDirection)); + } + + @Override + public int getForwardDirection() + { + return ((Integer)this.dataManager.get(FORWARD_DIRECTION)).intValue(); + } + + public void setBoatType(EntityBOPBoat.Type boatType) + { + this.dataManager.set(BOAT_TYPE, Integer.valueOf(boatType.ordinal())); + } + + public void setBoatType(int boatType) + { + this.dataManager.set(BOAT_TYPE, Integer.valueOf(boatType)); + } + + public EntityBOPBoat.Type getBOPBoatType() + { + return EntityBOPBoat.Type.byId(((Integer)this.dataManager.get(BOAT_TYPE)).intValue()); + } + + @Override + protected boolean canFitPassenger(Entity passenger) + { + return this.getPassengers().size() < 2; + } + + @Nullable + @Override + public Entity getControllingPassenger() + { + List list = this.getPassengers(); + return list.isEmpty() ? null : (Entity)list.get(0); + } + + @SideOnly(Side.CLIENT) + @Override + public void updateInputs(boolean p_184442_1_, boolean p_184442_2_, boolean p_184442_3_, boolean p_184442_4_) + { + this.leftInputDown = p_184442_1_; + this.rightInputDown = p_184442_2_; + this.forwardInputDown = p_184442_3_; + this.backInputDown = p_184442_4_; + } + + public static enum Status + { + IN_WATER, + UNDER_WATER, + UNDER_FLOWING_WATER, + ON_LAND, + IN_AIR; + } + + public static enum Type + { + SACRED_OAK(BOPWoods.SACRED_OAK.ordinal(), "sacred_oak"), + CHERRY(BOPWoods.CHERRY.ordinal(), "cherry"), + UMBRAN(BOPWoods.UMBRAN.ordinal(), "umbran"), + FIR(BOPWoods.FIR.ordinal(), "fir"), + ETHEREAL(BOPWoods.ETHEREAL.ordinal(), "ethereal"), + MAGIC(BOPWoods.MAGIC.ordinal(), "magic"), + MANGROVE(BOPWoods.MAGIC.ordinal(), "mangrove"), + PALM(BOPWoods.MAGIC.ordinal(), "palm"), + REDWOOD(BOPWoods.MAGIC.ordinal(), "redwood"), + WILLOW(BOPWoods.MAGIC.ordinal(), "willow"), + PINE(BOPWoods.MAGIC.ordinal(), "pine"), + HELLBARK(BOPWoods.MAGIC.ordinal(), "hellbark"), + JACARANDA(BOPWoods.MAGIC.ordinal(), "jacaranda"), + MAHOGANY(BOPWoods.MAGIC.ordinal(), "mahogany"), + EBONY(BOPWoods.MAGIC.ordinal(), "ebony"), + EUCALYPTUS(BOPWoods.MAGIC.ordinal(), "eucalyptus"); + + private final String name; + private final int metadata; + + private Type(int metadataIn, String nameIn) + { + this.name = nameIn; + this.metadata = metadataIn; + } + + public String getName() + { + return this.name; + } + + public int getMetadata() + { + return this.metadata; + } + + public String toString() + { + return this.name; + } + + public static EntityBOPBoat.Type byId(int id) + { + if (id < 0 || id >= values().length) + { + id = 0; + } + + return values()[id]; + } + + public static EntityBOPBoat.Type getTypeFromString(String nameIn) + { + for (int i = 0; i < values().length; ++i) + { + if (values()[i].getName().equals(nameIn)) + { + return values()[i]; + } + } + + return values()[0]; + } + } + + // Forge: Fix MC-119811 by instantly completing lerp on board + @Override + protected void addPassenger(Entity passenger) + { + super.addPassenger(passenger); + if(this.canPassengerSteer() && this.lerpSteps > 0) + { + this.lerpSteps = 0; + this.posX = this.lerpX; + this.posY = this.lerpY; + this.posZ = this.lerpZ; + this.rotationYaw = (float)this.lerpYaw; + this.rotationPitch = (float)this.lerpPitch; + } + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/entities/item/ModelBOPBoat.java b/src/main/java/biomesoplenty/common/entities/item/ModelBOPBoat.java new file mode 100644 index 000000000..15b4f1d6d --- /dev/null +++ b/src/main/java/biomesoplenty/common/entities/item/ModelBOPBoat.java @@ -0,0 +1,117 @@ +/******************************************************************************* + * Copyright 2015-2016, 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.entities.item; + +import net.minecraft.client.model.IMultipassModel; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GLAllocation; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.entity.Entity; +import net.minecraft.util.math.MathHelper; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class ModelBOPBoat extends ModelBase implements IMultipassModel +{ + public ModelRenderer[] boatSides = new ModelRenderer[5]; + public ModelRenderer[] paddles = new ModelRenderer[2]; + public ModelRenderer noWater; + private final int patchList = GLAllocation.generateDisplayLists(1); + + public ModelBOPBoat() + { + this.boatSides[0] = (new ModelRenderer(this, 0, 0)).setTextureSize(128, 64); + this.boatSides[1] = (new ModelRenderer(this, 0, 19)).setTextureSize(128, 64); + this.boatSides[2] = (new ModelRenderer(this, 0, 27)).setTextureSize(128, 64); + this.boatSides[3] = (new ModelRenderer(this, 0, 35)).setTextureSize(128, 64); + this.boatSides[4] = (new ModelRenderer(this, 0, 43)).setTextureSize(128, 64); + int i = 32; + int j = 6; + int k = 20; + int l = 4; + int i1 = 28; + this.boatSides[0].addBox(-14.0F, -9.0F, -3.0F, 28, 16, 3, 0.0F); + this.boatSides[0].setRotationPoint(0.0F, 3.0F, 1.0F); + this.boatSides[1].addBox(-13.0F, -7.0F, -1.0F, 18, 6, 2, 0.0F); + this.boatSides[1].setRotationPoint(-15.0F, 4.0F, 4.0F); + this.boatSides[2].addBox(-8.0F, -7.0F, -1.0F, 16, 6, 2, 0.0F); + this.boatSides[2].setRotationPoint(15.0F, 4.0F, 0.0F); + this.boatSides[3].addBox(-14.0F, -7.0F, -1.0F, 28, 6, 2, 0.0F); + this.boatSides[3].setRotationPoint(0.0F, 4.0F, -9.0F); + this.boatSides[4].addBox(-14.0F, -7.0F, -1.0F, 28, 6, 2, 0.0F); + this.boatSides[4].setRotationPoint(0.0F, 4.0F, 9.0F); + this.boatSides[0].rotateAngleX = ((float)Math.PI / 2F); + this.boatSides[1].rotateAngleY = ((float)Math.PI * 3F / 2F); + this.boatSides[2].rotateAngleY = ((float)Math.PI / 2F); + this.boatSides[3].rotateAngleY = (float)Math.PI; + this.paddles[0] = this.makePaddle(true); + this.paddles[0].setRotationPoint(3.0F, -5.0F, 9.0F); + this.paddles[1] = this.makePaddle(false); + this.paddles[1].setRotationPoint(3.0F, -5.0F, -9.0F); + this.paddles[1].rotateAngleY = (float)Math.PI; + this.paddles[0].rotateAngleZ = 0.19634955F; + this.paddles[1].rotateAngleZ = 0.19634955F; + this.noWater = (new ModelRenderer(this, 0, 0)).setTextureSize(128, 64); + this.noWater.addBox(-14.0F, -9.0F, -3.0F, 28, 16, 3, 0.0F); + this.noWater.setRotationPoint(0.0F, -3.0F, 1.0F); + this.noWater.rotateAngleX = ((float)Math.PI / 2F); + } + + public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) + { + GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F); + EntityBOPBoat entitybopboat = (EntityBOPBoat)entityIn; + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn); + + for (int i = 0; i < 5; ++i) + { + this.boatSides[i].render(scale); + } + + this.renderPaddle(entitybopboat, 0, scale, limbSwing); + this.renderPaddle(entitybopboat, 1, scale, limbSwing); + } + + public void renderMultipass(Entity p_187054_1_, float p_187054_2_, float p_187054_3_, float p_187054_4_, float p_187054_5_, float p_187054_6_, float scale) + { + GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F); + GlStateManager.colorMask(false, false, false, false); + this.noWater.render(scale); + GlStateManager.colorMask(true, true, true, true); + } + + protected ModelRenderer makePaddle(boolean p_187056_1_) + { + ModelRenderer modelrenderer = (new ModelRenderer(this, 62, p_187056_1_ ? 0 : 20)).setTextureSize(128, 64); + int i = 20; + int j = 7; + int k = 6; + float f = -5.0F; + modelrenderer.addBox(-1.0F, 0.0F, -5.0F, 2, 2, 18); + modelrenderer.addBox(p_187056_1_ ? -1.001F : 0.001F, -3.0F, 8.0F, 1, 6, 7); + return modelrenderer; + } + + protected void renderPaddle(EntityBOPBoat boat, int paddle, float scale, float limbSwing) + { + float f = boat.getRowingTime(paddle, limbSwing); + ModelRenderer modelrenderer = this.paddles[paddle]; + modelrenderer.rotateAngleX = (float)MathHelper.clampedLerp(-1.0471975803375244D, -0.2617993950843811D, (double)((MathHelper.sin(-f) + 1.0F) / 2.0F)); + modelrenderer.rotateAngleY = (float)MathHelper.clampedLerp(-(Math.PI / 4D), (Math.PI / 4D), (double)((MathHelper.sin(-f + 1.0F) + 1.0F) / 2.0F)); + + if (paddle == 1) + { + modelrenderer.rotateAngleY = (float)Math.PI - modelrenderer.rotateAngleY; + } + + modelrenderer.render(scale); + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/entities/item/RenderBOPBoat.java b/src/main/java/biomesoplenty/common/entities/item/RenderBOPBoat.java new file mode 100644 index 000000000..3baf84683 --- /dev/null +++ b/src/main/java/biomesoplenty/common/entities/item/RenderBOPBoat.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * Copyright 2015-2016, 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.entities.item; + +import net.minecraft.client.model.IMultipassModel; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.item.EntityBoat; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.MathHelper; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class RenderBOPBoat extends Render +{ + private static final ResourceLocation[] BOAT_TEXTURES = new ResourceLocation[] {new ResourceLocation("biomesoplenty:textures/entity/boats/boat_sacred_oak.png"), new ResourceLocation("biomesoplenty:textures/entity/boats/boat_cherry.png"), + new ResourceLocation("biomesoplenty:textures/entity/boats/boat_umbran.png"), new ResourceLocation("biomesoplenty:textures/entity/boats/boat_fir.png"), + new ResourceLocation("biomesoplenty:textures/entity/boats/boat_ethereal.png"), new ResourceLocation("biomesoplenty:textures/entity/boats/boat_magic.png"), + new ResourceLocation("biomesoplenty:textures/entity/boats/boat_mangrove.png"), new ResourceLocation("biomesoplenty:textures/entity/boats/boat_palm.png"), + new ResourceLocation("biomesoplenty:textures/entity/boats/boat_redwood.png"), new ResourceLocation("biomesoplenty:textures/entity/boats/boat_willow.png"), + new ResourceLocation("biomesoplenty:textures/entity/boats/boat_pine.png"), new ResourceLocation("biomesoplenty:textures/entity/boats/boat_hellbark.png"), + new ResourceLocation("biomesoplenty:textures/entity/boats/boat_jacaranda.png"), new ResourceLocation("biomesoplenty:textures/entity/boats/boat_mahogany.png"), + new ResourceLocation("biomesoplenty:textures/entity/boats/boat_ebony.png"), new ResourceLocation("biomesoplenty:textures/entity/boats/boat_eucalyptus.png")}; + protected ModelBase modelBOPBoat = new ModelBOPBoat(); + + public RenderBOPBoat(RenderManager renderManagerIn) + { + super(renderManagerIn); + this.shadowSize = 0.5F; + } + + public void doRender(EntityBOPBoat entity, double x, double y, double z, float entityYaw, float partialTicks) + { + GlStateManager.pushMatrix(); + this.setupTranslation(x, y, z); + this.setupRotation(entity, entityYaw, partialTicks); + this.bindEntityTexture(entity); + + if (this.renderOutlines) + { + GlStateManager.enableColorMaterial(); + GlStateManager.enableOutlineMode(this.getTeamColor(entity)); + } + + this.modelBOPBoat.render(entity, partialTicks, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); + + if (this.renderOutlines) + { + GlStateManager.disableOutlineMode(); + GlStateManager.disableColorMaterial(); + } + + GlStateManager.popMatrix(); + super.doRender(entity, x, y, z, entityYaw, partialTicks); + } + + public void setupRotation(EntityBOPBoat p_188311_1_, float p_188311_2_, float p_188311_3_) + { + GlStateManager.rotate(180.0F - p_188311_2_, 0.0F, 1.0F, 0.0F); + float f = (float)p_188311_1_.getTimeSinceHit() - p_188311_3_; + float f1 = p_188311_1_.getDamageTaken() - p_188311_3_; + + if (f1 < 0.0F) + { + f1 = 0.0F; + } + + if (f > 0.0F) + { + GlStateManager.rotate(MathHelper.sin(f) * f * f1 / 10.0F * (float)p_188311_1_.getForwardDirection(), 1.0F, 0.0F, 0.0F); + } + + GlStateManager.scale(-1.0F, -1.0F, 1.0F); + } + + public void setupTranslation(double p_188309_1_, double p_188309_3_, double p_188309_5_) + { + GlStateManager.translate((float)p_188309_1_, (float)p_188309_3_ + 0.375F, (float)p_188309_5_); + } + + protected ResourceLocation getEntityTexture(EntityBOPBoat entity) + { + return BOAT_TEXTURES[entity.getBOPBoatType().ordinal()]; + } + + public boolean isMultipass() + { + return true; + } + + public void renderMultipass(EntityBOPBoat p_188300_1_, double p_188300_2_, double p_188300_4_, double p_188300_6_, float p_188300_8_, float p_188300_9_) + { + GlStateManager.pushMatrix(); + this.setupTranslation(p_188300_2_, p_188300_4_, p_188300_6_); + this.setupRotation(p_188300_1_, p_188300_8_, p_188300_9_); + this.bindEntityTexture(p_188300_1_); + ((IMultipassModel)this.modelBOPBoat).renderMultipass(p_188300_1_, p_188300_9_, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); + GlStateManager.popMatrix(); + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/init/ModEntities.java b/src/main/java/biomesoplenty/common/init/ModEntities.java index 5c7d03566..bd03b96b9 100644 --- a/src/main/java/biomesoplenty/common/init/ModEntities.java +++ b/src/main/java/biomesoplenty/common/init/ModEntities.java @@ -11,6 +11,7 @@ package biomesoplenty.common.init; import biomesoplenty.common.command.BOPCommand; import biomesoplenty.common.entities.EntityPixie; import biomesoplenty.common.entities.EntityWasp; +import biomesoplenty.common.entities.item.EntityBOPBoat; import biomesoplenty.common.entities.projectiles.EntityMudball; import biomesoplenty.core.BiomesOPlenty; import net.minecraft.entity.Entity; @@ -29,6 +30,9 @@ public class ModEntities { // projectiles registerBOPEntity(EntityMudball.class, "mudball", 64, 10, true); + + // item entities + registerBOPEntity(EntityBOPBoat.class, "bop_boat", 80, 3, true); // mobs registerBOPEntityWithSpawnEgg(EntityWasp.class, "wasp", 80, 3, true, 0xE5B013, 0x333234); diff --git a/src/main/java/biomesoplenty/common/init/ModItems.java b/src/main/java/biomesoplenty/common/init/ModItems.java index ec922f999..28520f3a0 100644 --- a/src/main/java/biomesoplenty/common/init/ModItems.java +++ b/src/main/java/biomesoplenty/common/init/ModItems.java @@ -15,6 +15,22 @@ import static biomesoplenty.api.item.BOPItems.biome_essence; import static biomesoplenty.api.item.BOPItems.biome_finder; import static biomesoplenty.api.item.BOPItems.black_dye; import static biomesoplenty.api.item.BOPItems.blue_dye; +import static biomesoplenty.api.item.BOPItems.boat_cherry; +import static biomesoplenty.api.item.BOPItems.boat_ebony; +import static biomesoplenty.api.item.BOPItems.boat_ethereal; +import static biomesoplenty.api.item.BOPItems.boat_eucalyptus; +import static biomesoplenty.api.item.BOPItems.boat_fir; +import static biomesoplenty.api.item.BOPItems.boat_hellbark; +import static biomesoplenty.api.item.BOPItems.boat_jacaranda; +import static biomesoplenty.api.item.BOPItems.boat_magic; +import static biomesoplenty.api.item.BOPItems.boat_mahogany; +import static biomesoplenty.api.item.BOPItems.boat_mangrove; +import static biomesoplenty.api.item.BOPItems.boat_palm; +import static biomesoplenty.api.item.BOPItems.boat_pine; +import static biomesoplenty.api.item.BOPItems.boat_redwood; +import static biomesoplenty.api.item.BOPItems.boat_sacred_oak; +import static biomesoplenty.api.item.BOPItems.boat_umbran; +import static biomesoplenty.api.item.BOPItems.boat_willow; import static biomesoplenty.api.item.BOPItems.brown_dye; import static biomesoplenty.api.item.BOPItems.crystal_shard; import static biomesoplenty.api.item.BOPItems.earth; @@ -47,7 +63,9 @@ import static biomesoplenty.api.item.BOPItems.white_dye; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.sound.BOPSounds; import biomesoplenty.common.command.BOPCommand; +import biomesoplenty.common.entities.item.EntityBOPBoat; import biomesoplenty.common.item.ItemAmbrosia; +import biomesoplenty.common.item.ItemBOPBoat; import biomesoplenty.common.item.ItemBOPFood; import biomesoplenty.common.item.ItemBOPRecord; import biomesoplenty.common.item.ItemBiomeEssence; @@ -69,7 +87,6 @@ import net.minecraft.item.ItemSoup; import net.minecraft.potion.PotionEffect; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.ForgeRegistries; -import net.minecraftforge.fml.common.registry.GameRegistry; public class ModItems { @@ -83,6 +100,23 @@ public class ModItems jar_filled = registerItem(new ItemJarFilled(), "jar_filled"); jar_empty = registerItem(new ItemJarEmpty(), "jar_empty"); + boat_sacred_oak = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.SACRED_OAK), "boat_sacred_oak"); + boat_cherry = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.CHERRY), "boat_cherry"); + boat_umbran = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.UMBRAN), "boat_umbran"); + boat_fir = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.FIR), "boat_fir"); + boat_ethereal = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.ETHEREAL), "boat_ethereal"); + boat_magic = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.MAGIC), "boat_magic"); + boat_mangrove = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.MANGROVE), "boat_mangrove"); + boat_palm = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.PALM), "boat_palm"); + boat_redwood = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.REDWOOD), "boat_redwood"); + boat_willow = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.WILLOW), "boat_willow"); + boat_pine = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.PINE), "boat_pine"); + boat_hellbark = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.HELLBARK), "boat_hellbark"); + boat_jacaranda = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.JACARANDA), "boat_jacaranda"); + boat_mahogany = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.MAHOGANY), "boat_mahogany"); + boat_ebony = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.EBONY), "boat_ebony"); + boat_eucalyptus = registerItem(new ItemBOPBoat(EntityBOPBoat.Type.EUCALYPTUS), "boat_eucalyptus"); + biome_finder = registerItem(new ItemBiomeFinder(), "biome_finder"); flower_basket = registerItem(new ItemFlowerBasket(), "flower_basket"); diff --git a/src/main/java/biomesoplenty/common/item/ItemBOPBoat.java b/src/main/java/biomesoplenty/common/item/ItemBOPBoat.java new file mode 100644 index 000000000..d25994091 --- /dev/null +++ b/src/main/java/biomesoplenty/common/item/ItemBOPBoat.java @@ -0,0 +1,125 @@ +/******************************************************************************* + * Copyright 2014-2016, 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 java.util.List; + +import biomesoplenty.common.entities.item.EntityBOPBoat; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.StatList; +import net.minecraft.util.ActionResult; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; + +public class ItemBOPBoat extends Item +{ + private final EntityBOPBoat.Type type; + + public ItemBOPBoat(EntityBOPBoat.Type typeIn) + { + this.type = typeIn; + this.maxStackSize = 1; + this.setUnlocalizedName("boat_" + typeIn.getName()); + } + + @Override + public ActionResult onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) + { + ItemStack itemstack = playerIn.getHeldItem(handIn); + float f = 1.0F; + float f1 = playerIn.prevRotationPitch + (playerIn.rotationPitch - playerIn.prevRotationPitch) * 1.0F; + float f2 = playerIn.prevRotationYaw + (playerIn.rotationYaw - playerIn.prevRotationYaw) * 1.0F; + double d0 = playerIn.prevPosX + (playerIn.posX - playerIn.prevPosX) * 1.0D; + double d1 = playerIn.prevPosY + (playerIn.posY - playerIn.prevPosY) * 1.0D + (double)playerIn.getEyeHeight(); + double d2 = playerIn.prevPosZ + (playerIn.posZ - playerIn.prevPosZ) * 1.0D; + Vec3d vec3d = new Vec3d(d0, d1, d2); + float f3 = MathHelper.cos(-f2 * 0.017453292F - (float)Math.PI); + float f4 = MathHelper.sin(-f2 * 0.017453292F - (float)Math.PI); + float f5 = -MathHelper.cos(-f1 * 0.017453292F); + float f6 = MathHelper.sin(-f1 * 0.017453292F); + float f7 = f4 * f5; + float f8 = f3 * f5; + double d3 = 5.0D; + Vec3d vec3d1 = vec3d.addVector((double)f7 * 5.0D, (double)f6 * 5.0D, (double)f8 * 5.0D); + RayTraceResult raytraceresult = worldIn.rayTraceBlocks(vec3d, vec3d1, true); + + if (raytraceresult == null) + { + return new ActionResult(EnumActionResult.PASS, itemstack); + } + else + { + Vec3d vec3d2 = playerIn.getLook(1.0F); + boolean flag = false; + List list = worldIn.getEntitiesWithinAABBExcludingEntity(playerIn, playerIn.getEntityBoundingBox().expand(vec3d2.x * 5.0D, vec3d2.y * 5.0D, vec3d2.z * 5.0D).grow(1.0D)); + + for (int i = 0; i < list.size(); ++i) + { + Entity entity = list.get(i); + + if (entity.canBeCollidedWith()) + { + AxisAlignedBB axisalignedbb = entity.getEntityBoundingBox().grow((double)entity.getCollisionBorderSize()); + + if (axisalignedbb.contains(vec3d)) + { + flag = true; + } + } + } + + if (flag) + { + return new ActionResult(EnumActionResult.PASS, itemstack); + } + else if (raytraceresult.typeOfHit != RayTraceResult.Type.BLOCK) + { + return new ActionResult(EnumActionResult.PASS, itemstack); + } + else + { + Block block = worldIn.getBlockState(raytraceresult.getBlockPos()).getBlock(); + boolean flag1 = block == Blocks.WATER || block == Blocks.FLOWING_WATER; + EntityBOPBoat entitybopboat = new EntityBOPBoat(worldIn, raytraceresult.hitVec.x, flag1 ? raytraceresult.hitVec.y - 0.12D : raytraceresult.hitVec.y, raytraceresult.hitVec.z); + entitybopboat.setBoatType(this.type); + entitybopboat.rotationYaw = playerIn.rotationYaw; + + if (!worldIn.getCollisionBoxes(entitybopboat, entitybopboat.getEntityBoundingBox().grow(-0.1D)).isEmpty()) + { + return new ActionResult(EnumActionResult.FAIL, itemstack); + } + else + { + if (!worldIn.isRemote) + { + worldIn.spawnEntity(entitybopboat); + } + + if (!playerIn.capabilities.isCreativeMode) + { + itemstack.shrink(1); + } + + playerIn.addStat(StatList.getObjectUseStats(this)); + return new ActionResult(EnumActionResult.SUCCESS, itemstack); + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/core/ClientProxy.java b/src/main/java/biomesoplenty/core/ClientProxy.java index 061f36ae9..ab2de4fcf 100644 --- a/src/main/java/biomesoplenty/core/ClientProxy.java +++ b/src/main/java/biomesoplenty/core/ClientProxy.java @@ -25,6 +25,8 @@ import biomesoplenty.common.entities.EntityPixie; import biomesoplenty.common.entities.EntityWasp; import biomesoplenty.common.entities.RenderPixie; import biomesoplenty.common.entities.RenderWasp; +import biomesoplenty.common.entities.item.EntityBOPBoat; +import biomesoplenty.common.entities.item.RenderBOPBoat; import biomesoplenty.common.entities.projectiles.EntityMudball; import biomesoplenty.common.entities.projectiles.RenderMudball; import biomesoplenty.common.fluids.BloodFluid; @@ -88,6 +90,7 @@ public class ClientProxy extends CommonProxy registerEntityRenderer(EntityWasp.class, RenderWasp.class); registerEntityRenderer(EntityPixie.class, RenderPixie.class); registerEntityRenderer(EntityMudball.class, RenderMudball.class); + registerEntityRenderer(EntityBOPBoat.class, RenderBOPBoat.class); replaceForgeResources(); } diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_cherry.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_cherry.json new file mode 100644 index 000000000..ccae7055b --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_cherry.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_cherry" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_cherry" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_ebony.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_ebony.json new file mode 100644 index 000000000..4217a0b14 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_ebony.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_ebony" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_ebony" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_ethereal.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_ethereal.json new file mode 100644 index 000000000..5ba797241 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_ethereal.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_ethereal" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_ethereal" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_eucalyptus.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_eucalyptus.json new file mode 100644 index 000000000..101dffcb5 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_eucalyptus.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_eucalyptus" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_eucalyptus" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_fir.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_fir.json new file mode 100644 index 000000000..710613743 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_fir.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_fir" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_fir" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_hellbark.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_hellbark.json new file mode 100644 index 000000000..2dd33cecf --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_hellbark.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_hellbark" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_hellbark" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_jacaranda.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_jacaranda.json new file mode 100644 index 000000000..a1a11dcbd --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_jacaranda.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_jacaranda" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_jacaranda" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_magic.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_magic.json new file mode 100644 index 000000000..895037920 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_magic.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_magic" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_magic" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_mahogany.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_mahogany.json new file mode 100644 index 000000000..2e8477e38 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_mahogany.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_mahogany" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_mahogany" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_mangrove.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_mangrove.json new file mode 100644 index 000000000..e2a00596e --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_mangrove.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_mangrove" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_mangrove" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_palm.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_palm.json new file mode 100644 index 000000000..261cd4e73 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_palm.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_palm" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_palm" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_pine.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_pine.json new file mode 100644 index 000000000..0751591d5 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_pine.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_pine" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_pine" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_redwood.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_redwood.json new file mode 100644 index 000000000..cbbd3a91a --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_redwood.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_redwood" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_redwood" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_sacred_oak.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_sacred_oak.json new file mode 100644 index 000000000..9526668b3 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_sacred_oak.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_sacred_oak" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_sacred_oak" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_umbran.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_umbran.json new file mode 100644 index 000000000..57638e64b --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_umbran.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_umbran" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_umbran" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_willow.json b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_willow.json new file mode 100644 index 000000000..90878fe36 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/advancements/recipes/transportation/boat_willow.json @@ -0,0 +1,27 @@ +{ + "rewards": { + "recipes": [ + "biomesoplenty:boat_willow" + ] + }, + "criteria": { + "entered_water": { + "trigger": "minecraft:enter_block", + "conditions": { + "block": "minecraft:water" + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "biomesoplenty:boat_willow" + } + } + }, + "requirements": [ + [ + "entered_water", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/lang/en_US.lang b/src/main/resources/assets/biomesoplenty/lang/en_US.lang index dee8f2c18..39b0678cc 100644 --- a/src/main/resources/assets/biomesoplenty/lang/en_US.lang +++ b/src/main/resources/assets/biomesoplenty/lang/en_US.lang @@ -66,6 +66,22 @@ item.biome_essence.name=Biome Essence item.biome_finder.name=Biome Finder item.black_dye.name=Black Dye item.blue_dye.name=Blue Dye +item.boat_cherry.name=Cherry Boat +item.boat_ebony.name=Ebony Boat +item.boat_ethereal.name=Ethereal Boat +item.boat_eucalyptus.name=Eucalyptus Boat +item.boat_fir.name=Fir Boat +item.boat_hellbark.name=Hellbark Boat +item.boat_jacaranda.name=Jacaranda Boat +item.boat_magic.name=Magic Boat +item.boat_mahogany.name=Mahogany Boat +item.boat_mangrove.name=Mangrove Boat +item.boat_palm.name=Palm Boat +item.boat_pine.name=Pine Boat +item.boat_redwood.name=Redwood Boat +item.boat_sacred_oak.name=Sacred Oak Boat +item.boat_umbran.name=Umbran Boat +item.boat_willow.name=Willow Boat item.brown_dye.name=Brown Dye item.cherry_door.name=Cherry Door item.crystal_shard.name=Celestial Crystal Shard @@ -423,4 +439,5 @@ tile.crystal.name=Celestial Crystal entity.mudball.name=Mudball entity.pixie.name=Pixie -entity.wasp.name=Nether Wasp \ No newline at end of file +entity.wasp.name=Nether Wasp +entity.bop_boat.name=Boat \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_cherry.json b/src/main/resources/assets/biomesoplenty/models/item/boat_cherry.json new file mode 100644 index 000000000..f592611df --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_cherry.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_cherry" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_ebony.json b/src/main/resources/assets/biomesoplenty/models/item/boat_ebony.json new file mode 100644 index 000000000..3b686f634 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_ebony.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_ebony" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_ethereal.json b/src/main/resources/assets/biomesoplenty/models/item/boat_ethereal.json new file mode 100644 index 000000000..9fc73fc14 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_ethereal.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_ethereal" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_eucalyptus.json b/src/main/resources/assets/biomesoplenty/models/item/boat_eucalyptus.json new file mode 100644 index 000000000..57d2f1e57 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_eucalyptus.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_eucalyptus" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_fir.json b/src/main/resources/assets/biomesoplenty/models/item/boat_fir.json new file mode 100644 index 000000000..02cc62bdb --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_fir.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_fir" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_hellbark.json b/src/main/resources/assets/biomesoplenty/models/item/boat_hellbark.json new file mode 100644 index 000000000..776b2b265 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_hellbark.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_hellbark" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_jacaranda.json b/src/main/resources/assets/biomesoplenty/models/item/boat_jacaranda.json new file mode 100644 index 000000000..10262909b --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_jacaranda.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_jacaranda" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_magic.json b/src/main/resources/assets/biomesoplenty/models/item/boat_magic.json new file mode 100644 index 000000000..4b79fe353 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_magic.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_magic" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_mahogany.json b/src/main/resources/assets/biomesoplenty/models/item/boat_mahogany.json new file mode 100644 index 000000000..7f824021e --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_mahogany.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_mahogany" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_mangrove.json b/src/main/resources/assets/biomesoplenty/models/item/boat_mangrove.json new file mode 100644 index 000000000..f0fd2950a --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_mangrove.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_mangrove" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_palm.json b/src/main/resources/assets/biomesoplenty/models/item/boat_palm.json new file mode 100644 index 000000000..662ae528b --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_palm.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_palm" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_pine.json b/src/main/resources/assets/biomesoplenty/models/item/boat_pine.json new file mode 100644 index 000000000..e7816a38f --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_pine.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_pine" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_redwood.json b/src/main/resources/assets/biomesoplenty/models/item/boat_redwood.json new file mode 100644 index 000000000..0bdca1243 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_redwood.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_redwood" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_sacred_oak.json b/src/main/resources/assets/biomesoplenty/models/item/boat_sacred_oak.json new file mode 100644 index 000000000..13c551f8a --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_sacred_oak.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_sacred_oak" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_umbran.json b/src/main/resources/assets/biomesoplenty/models/item/boat_umbran.json new file mode 100644 index 000000000..30da8dda4 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_umbran.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_umbran" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/boat_willow.json b/src/main/resources/assets/biomesoplenty/models/item/boat_willow.json new file mode 100644 index 000000000..54260904b --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/boat_willow.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "biomesoplenty:items/boat_willow" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_cherry.json b/src/main/resources/assets/biomesoplenty/recipes/boat_cherry.json new file mode 100644 index 000000000..13d6dea2b --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_cherry.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 1 + } + }, + "result": { + "item": "biomesoplenty:boat_cherry" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_ebony.json b/src/main/resources/assets/biomesoplenty/recipes/boat_ebony.json new file mode 100644 index 000000000..714a763b1 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_ebony.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 14 + } + }, + "result": { + "item": "biomesoplenty:boat_ebony" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_ethereal.json b/src/main/resources/assets/biomesoplenty/recipes/boat_ethereal.json new file mode 100644 index 000000000..f6cb1d3be --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_ethereal.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 4 + } + }, + "result": { + "item": "biomesoplenty:boat_ethereal" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_eucalyptus.json b/src/main/resources/assets/biomesoplenty/recipes/boat_eucalyptus.json new file mode 100644 index 000000000..fe0eb7455 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_eucalyptus.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 15 + } + }, + "result": { + "item": "biomesoplenty:boat_eucalyptus" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_fir.json b/src/main/resources/assets/biomesoplenty/recipes/boat_fir.json new file mode 100644 index 000000000..8eb6db35a --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_fir.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 3 + } + }, + "result": { + "item": "biomesoplenty:boat_fir" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_hellbark.json b/src/main/resources/assets/biomesoplenty/recipes/boat_hellbark.json new file mode 100644 index 000000000..0f555bc72 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_hellbark.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 11 + } + }, + "result": { + "item": "biomesoplenty:boat_hellbark" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_jacaranda.json b/src/main/resources/assets/biomesoplenty/recipes/boat_jacaranda.json new file mode 100644 index 000000000..88e9b0ea4 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_jacaranda.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 12 + } + }, + "result": { + "item": "biomesoplenty:boat_jacaranda" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_magic.json b/src/main/resources/assets/biomesoplenty/recipes/boat_magic.json new file mode 100644 index 000000000..03e5bcb78 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_magic.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 5 + } + }, + "result": { + "item": "biomesoplenty:boat_magic" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_mahogany.json b/src/main/resources/assets/biomesoplenty/recipes/boat_mahogany.json new file mode 100644 index 000000000..a6240ce1b --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_mahogany.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 13 + } + }, + "result": { + "item": "biomesoplenty:boat_mahogany" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_mangrove.json b/src/main/resources/assets/biomesoplenty/recipes/boat_mangrove.json new file mode 100644 index 000000000..202c85706 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_mangrove.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 6 + } + }, + "result": { + "item": "biomesoplenty:boat_mangrove" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_palm.json b/src/main/resources/assets/biomesoplenty/recipes/boat_palm.json new file mode 100644 index 000000000..7e9f0695c --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_palm.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 7 + } + }, + "result": { + "item": "biomesoplenty:boat_palm" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_pine.json b/src/main/resources/assets/biomesoplenty/recipes/boat_pine.json new file mode 100644 index 000000000..22d262f40 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_pine.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 10 + } + }, + "result": { + "item": "biomesoplenty:boat_pine" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_redwood.json b/src/main/resources/assets/biomesoplenty/recipes/boat_redwood.json new file mode 100644 index 000000000..317570efc --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_redwood.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 8 + } + }, + "result": { + "item": "biomesoplenty:boat_redwood" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_sacred_oak.json b/src/main/resources/assets/biomesoplenty/recipes/boat_sacred_oak.json new file mode 100644 index 000000000..0e5937d69 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_sacred_oak.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 0 + } + }, + "result": { + "item": "biomesoplenty:boat_sacred_oak" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_umbran.json b/src/main/resources/assets/biomesoplenty/recipes/boat_umbran.json new file mode 100644 index 000000000..f200ad06c --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_umbran.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 2 + } + }, + "result": { + "item": "biomesoplenty:boat_umbran" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/recipes/boat_willow.json b/src/main/resources/assets/biomesoplenty/recipes/boat_willow.json new file mode 100644 index 000000000..76ff5ef6d --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/recipes/boat_willow.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "boat", + "pattern": [ + "# #", + "###" + ], + "key": { + "#": { + "item": "biomesoplenty:planks_0", + "data": 9 + } + }, + "result": { + "item": "biomesoplenty:boat_willow" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/textures/entity/boats/boat_sacred_oak.png b/src/main/resources/assets/biomesoplenty/textures/entity/boats/boat_sacred_oak.png index 793046568..b51cba21b 100644 Binary files a/src/main/resources/assets/biomesoplenty/textures/entity/boats/boat_sacred_oak.png and b/src/main/resources/assets/biomesoplenty/textures/entity/boats/boat_sacred_oak.png differ diff --git a/src/main/resources/assets/biomesoplenty/textures/items/cherry_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_cherry.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/cherry_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_cherry.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/ebony_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_ebony.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/ebony_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_ebony.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/ethereal_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_ethereal.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/ethereal_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_ethereal.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/eucalyptus_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_eucalyptus.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/eucalyptus_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_eucalyptus.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/fir_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_fir.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/fir_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_fir.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/hellbark_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_hellbark.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/hellbark_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_hellbark.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/jacaranda_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_jacaranda.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/jacaranda_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_jacaranda.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/magic_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_magic.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/magic_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_magic.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/mahogany_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_mahogany.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/mahogany_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_mahogany.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/mangrove_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_mangrove.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/mangrove_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_mangrove.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/palm_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_palm.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/palm_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_palm.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/pine_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_pine.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/pine_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_pine.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/redwood_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_redwood.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/redwood_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_redwood.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/boat_sacred_oak.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_sacred_oak.png new file mode 100644 index 000000000..33f683bf8 Binary files /dev/null and b/src/main/resources/assets/biomesoplenty/textures/items/boat_sacred_oak.png differ diff --git a/src/main/resources/assets/biomesoplenty/textures/items/umbran_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_umbran.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/umbran_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_umbran.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/willow_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/boat_willow.png similarity index 100% rename from src/main/resources/assets/biomesoplenty/textures/items/willow_boat.png rename to src/main/resources/assets/biomesoplenty/textures/items/boat_willow.png diff --git a/src/main/resources/assets/biomesoplenty/textures/items/sacred_oak_boat.png b/src/main/resources/assets/biomesoplenty/textures/items/sacred_oak_boat.png deleted file mode 100644 index 6013ea358..000000000 Binary files a/src/main/resources/assets/biomesoplenty/textures/items/sacred_oak_boat.png and /dev/null differ