mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 02:45:13 +00:00
Update to 1.8.9, fix apothecary collision
This commit is contained in:
1 parent
1973779897
commit
37b5d00388
13 files changed
+38
-23
No files matched your search
@@ -125,7 +125,7 @@ public class RenderTileAltar extends TileEntitySpecialRenderer {
|
||||
|
||||
ItemStack stack = altar.getStackInSlot(i);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
Minecraft.getMinecraft().getRenderItem().func_181564_a(stack, ItemCameraTransforms.TransformType.GROUND);
|
||||
Minecraft.getMinecraft().getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.GROUND);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public class RenderTileAvatar extends TileEntitySpecialRenderer {
|
||||
float s = 0.6F;
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.translate(-0.5F, 2.125F, 0F); // todo 1.8 tweak held item render
|
||||
Minecraft.getMinecraft().getRenderItem().func_181564_a(stack, ItemCameraTransforms.TransformType.THIRD_PERSON);
|
||||
Minecraft.getMinecraft().getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.THIRD_PERSON);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
IAvatarWieldable wieldable = (IAvatarWieldable) stack.getItem();
|
||||
|
||||
@@ -71,7 +71,7 @@ public class RenderTileBrewery extends TileEntitySpecialRenderer {
|
||||
|
||||
float s = 0.25F;
|
||||
GlStateManager.scale(s, s, s);
|
||||
mc.getRenderItem().func_181564_a(stack, ItemCameraTransforms.TransformType.GROUND);
|
||||
mc.getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.GROUND);
|
||||
GlStateManager.scale(1F / s, 1F / s, 1F / s);
|
||||
GlStateManager.popMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
|
||||
@@ -68,7 +68,7 @@ public class RenderTileIncensePlate extends TileEntitySpecialRenderer {
|
||||
GlStateManager.translate(-0.075F, -1.25F, 0F);
|
||||
GlStateManager.scale(s, s, s);
|
||||
//GlStateManager.rotate(180F, 0F, 1F, 0F);
|
||||
Minecraft.getMinecraft().getRenderItem().func_181564_a(stack, ItemCameraTransforms.TransformType.GROUND);
|
||||
Minecraft.getMinecraft().getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.GROUND);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
|
||||
@@ -43,7 +43,7 @@ public class RenderTilePrism extends TileEntitySpecialRenderer {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(0.5F, 0.5F, pos);
|
||||
Minecraft.getMinecraft().getRenderItem().func_181564_a(stack, ItemCameraTransforms.TransformType.NONE);
|
||||
Minecraft.getMinecraft().getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.NONE);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public class RenderTileRuneAltar extends TileEntitySpecialRenderer {
|
||||
if(stack != null) {
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
|
||||
mc.getRenderItem().func_181564_a(stack, ItemCameraTransforms.TransformType.GROUND);
|
||||
mc.getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.GROUND);
|
||||
|
||||
}
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
@@ -91,7 +91,7 @@ public class RenderTileSpreader extends TileEntitySpecialRenderer {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.0F, -1F, -0.4375F);
|
||||
GlStateManager.scale(0.8F, 0.8F, 0.8F);
|
||||
Minecraft.getMinecraft().getRenderItem().func_181564_a(stack, ItemCameraTransforms.TransformType.FIXED);
|
||||
Minecraft.getMinecraft().getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.FIXED);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
|
||||
@@ -84,10 +84,10 @@ public class RenderTileStarfield extends TileEntitySpecialRenderer {
|
||||
GlStateManager.texGen(GlStateManager.TexGen.T, 9217);
|
||||
GlStateManager.texGen(GlStateManager.TexGen.R, 9217);
|
||||
GlStateManager.texGen(GlStateManager.TexGen.Q, 9216);
|
||||
GlStateManager.func_179105_a(GlStateManager.TexGen.S, 9473, this.func_147525_a(1.0F, 0.0F, 0.0F, 0.0F));
|
||||
GlStateManager.func_179105_a(GlStateManager.TexGen.T, 9473, this.func_147525_a(0.0F, 0.0F, 1.0F, 0.0F));
|
||||
GlStateManager.func_179105_a(GlStateManager.TexGen.R, 9473, this.func_147525_a(0.0F, 0.0F, 0.0F, 1.0F));
|
||||
GlStateManager.func_179105_a(GlStateManager.TexGen.Q, 9474, this.func_147525_a(0.0F, 1.0F, 0.0F, 0.0F));
|
||||
GlStateManager.texGen(GlStateManager.TexGen.S, 9473, this.func_147525_a(1.0F, 0.0F, 0.0F, 0.0F));
|
||||
GlStateManager.texGen(GlStateManager.TexGen.T, 9473, this.func_147525_a(0.0F, 0.0F, 1.0F, 0.0F));
|
||||
GlStateManager.texGen(GlStateManager.TexGen.R, 9473, this.func_147525_a(0.0F, 0.0F, 0.0F, 1.0F));
|
||||
GlStateManager.texGen(GlStateManager.TexGen.Q, 9474, this.func_147525_a(0.0F, 1.0F, 0.0F, 0.0F));
|
||||
GlStateManager.enableTexGenCoord(GlStateManager.TexGen.S);
|
||||
GlStateManager.enableTexGenCoord(GlStateManager.TexGen.T);
|
||||
GlStateManager.enableTexGenCoord(GlStateManager.TexGen.R);
|
||||
|
||||
@@ -26,6 +26,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
@@ -72,6 +73,21 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity collidingEntity) {
|
||||
if (collidingEntity instanceof EntityItem) {
|
||||
float f = 1F / 16F * 2F;
|
||||
|
||||
// Todo 1.8 temporary hack to let items collide from the top. Figure out what changed to break this.
|
||||
setBlockBounds(f, f, f, 1F - f, 0.65F, 1F -f);
|
||||
super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
|
||||
setBlockBounds(f, f, f, 1F - f, 1F / 16F * 20F, 1F - f);
|
||||
return;
|
||||
} else {
|
||||
super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState() {
|
||||
return new BlockState(this, BotaniaStateProps.ALTAR_VARIANT);
|
||||
@@ -87,7 +103,6 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
if (meta < 0 || meta >= AltarVariant.values().length ) {
|
||||
meta = 0;
|
||||
}
|
||||
System.out.println(AltarVariant.values()[meta]);
|
||||
return getDefaultState().withProperty(BotaniaStateProps.ALTAR_VARIANT, AltarVariant.values()[meta]);
|
||||
}
|
||||
|
||||
|
||||
@@ -125,8 +125,8 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
this.motionY = y;
|
||||
this.motionZ = z;
|
||||
float f1 = MathHelper.sqrt_double(x * x + z * z);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(MathHelper.func_181159_b(x, z) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(MathHelper.func_181159_b(y, (double)f1) * 180.0D / Math.PI);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(MathHelper.atan2(x, z) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(MathHelper.atan2(y, (double)f1) * 180.0D / Math.PI);
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
|
||||
@@ -143,8 +143,8 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
|
||||
{
|
||||
float f = MathHelper.sqrt_double(x * x + z * z);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(MathHelper.func_181159_b(x, z) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(MathHelper.func_181159_b(y, (double)f) * 180.0D / Math.PI);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(MathHelper.atan2(x, z) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(MathHelper.atan2(y, (double)f) * 180.0D / Math.PI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && this.worldObj.getBlockState(movingobjectposition.getBlockPos()).getBlock() == Blocks.portal)
|
||||
{
|
||||
this.func_181015_d(movingobjectposition.getBlockPos());
|
||||
this.setPortal(movingobjectposition.getBlockPos());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -252,9 +252,9 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
float f1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float)(MathHelper.func_181159_b(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
this.rotationYaw = (float)(MathHelper.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
|
||||
for (this.rotationPitch = (float)(MathHelper.func_181159_b(this.motionY, (double)f1) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
|
||||
for (this.rotationPitch = (float)(MathHelper.atan2(this.motionY, (double)f1) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class EntityThrownItem extends EntityItem {
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && worldObj.getBlockState(movingobjectposition.getBlockPos()).getBlock() == Blocks.portal)
|
||||
{
|
||||
func_181015_d(movingobjectposition.getBlockPos());
|
||||
setPortal(movingobjectposition.getBlockPos());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user