mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 03:15:07 +00:00
Misc todo fixes and cleanups
This commit is contained in:
1 parent
8553a4d5df
commit
43c5fadce5
4 files changed
+9
-18
No files matched your search
@@ -186,7 +186,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickableTile
|
||||
IFloatingFlower.IslandType oldType = floatingData.getIslandType();
|
||||
super.onDataPacket(net, packet);
|
||||
if(oldType != floatingData.getIslandType() && isFloating()) {
|
||||
// todo 1.14 world.markForRerender(pos);
|
||||
world.notifyBlockUpdate(getPos(), getBlockState(), getBlockState(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -192,13 +192,11 @@ public class FXLightning extends Particle {
|
||||
}
|
||||
|
||||
private float rayTraceResistance(Vector3 start, Vector3 end, float prevresistance) {
|
||||
// todo 1.14 entity?
|
||||
RayTraceContext ctx = new RayTraceContext(start.toVec3D(), end.toVec3D(), RayTraceContext.BlockMode.OUTLINE, RayTraceContext.FluidMode.NONE, null);
|
||||
// don't have an entity to pass, just use the render view
|
||||
Entity viewer = Minecraft.getInstance().renderViewEntity;
|
||||
RayTraceContext ctx = new RayTraceContext(start.toVec3D(), end.toVec3D(), RayTraceContext.BlockMode.OUTLINE, RayTraceContext.FluidMode.NONE, viewer);
|
||||
RayTraceResult mop = world.rayTraceBlocks(ctx);
|
||||
|
||||
if(mop == null)
|
||||
return prevresistance;
|
||||
|
||||
if(mop.getType() == RayTraceResult.Type.BLOCK) {
|
||||
BlockPos pos = ((BlockRayTraceResult) mop).getPos();
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
|
||||
@@ -65,17 +65,6 @@ public class FXWisp extends Particle {
|
||||
|
||||
moteHalfLife = maxAge / 2;
|
||||
setSize(0.01F, 0.01F);
|
||||
Entity renderentity = Minecraft.getInstance().getRenderViewEntity();
|
||||
|
||||
// todo 1.14
|
||||
if(false) {
|
||||
int visibleDistance = 50;
|
||||
if (!Minecraft.getInstance().gameSettings.fancyGraphics)
|
||||
visibleDistance = 25;
|
||||
|
||||
if (renderentity == null || renderentity.getDistanceSq(posX, posY, posZ) > visibleDistance * visibleDistance)
|
||||
maxAge = 0;
|
||||
}
|
||||
|
||||
prevPosX = posX;
|
||||
prevPosY = posY;
|
||||
|
||||
@@ -19,8 +19,10 @@ import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.shapes.IBooleanFunction;
|
||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.util.math.shapes.VoxelShapes;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
@@ -37,7 +39,9 @@ import javax.annotation.Nonnull;
|
||||
|
||||
public class BlockRuneAltar extends BlockMod implements IWandable, ILexiconable {
|
||||
|
||||
private static final VoxelShape SHAPE = Block.makeCuboidShape(0, 0, 0, 16, 12, 16);
|
||||
private static final VoxelShape TOP = Block.makeCuboidShape(0, 6, 0, 16, 12, 16);
|
||||
private static final VoxelShape BOTTOM = Block.makeCuboidShape(2, 0, 2, 14, 6, 14);
|
||||
private static final VoxelShape SHAPE = VoxelShapes.combineAndSimplify(TOP, BOTTOM, IBooleanFunction.OR);
|
||||
|
||||
public BlockRuneAltar(Properties builder) {
|
||||
super(builder);
|
||||
|
||||
Reference in new issue
Block a user