mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-15 17:44:57 +00:00
Chisel-2/Chisel-2#412 Improve how concrete works, no more "sinking"
This commit is contained in:
1 parent
8644dc7db6
commit
45b1cfdb9e
3 files changed
+40
-52
No files matched your search
@@ -2,6 +2,13 @@ package team.chisel.client;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.particle.EntityDiggingFX;
|
||||
import net.minecraft.client.particle.EntityLavaFX;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import team.chisel.block.BlockGrimstone;
|
||||
import team.chisel.block.BlockHolystone;
|
||||
import team.chisel.block.BlockLavastone;
|
||||
@@ -14,15 +21,6 @@ import team.chisel.entity.fx.EntityGrimstoneFX;
|
||||
import team.chisel.entity.fx.EntityHolystoneFX;
|
||||
import team.chisel.entity.fx.EntitySnakestoneObsidianFX;
|
||||
import team.chisel.utils.GeneralClient;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.particle.EntityDiggingFX;
|
||||
import net.minecraft.client.particle.EntityLavaFX;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class GeneralChiselClient {
|
||||
|
||||
@@ -236,25 +234,6 @@ public class GeneralChiselClient {
|
||||
GeneralClient.playChiselSound(world, x, y, z, sound);
|
||||
}
|
||||
|
||||
public static void speedupPlayer(World world, Entity entity, double concreteVelocity) {
|
||||
double velocity = Math.sqrt(entity.motionX * entity.motionX + entity.motionZ * entity.motionZ);
|
||||
|
||||
if (!(entity instanceof EntityPlayerSP))
|
||||
return;
|
||||
if (velocity == 0)
|
||||
return;
|
||||
if (velocity >= Configurations.concreteVelocity)
|
||||
return;
|
||||
|
||||
EntityPlayerSP player = (EntityPlayerSP) entity;
|
||||
|
||||
if (Math.abs(player.movementInput.moveForward) < 0.75f && Math.abs(player.movementInput.moveStrafe) < 0.75f)
|
||||
return;
|
||||
|
||||
entity.motionX = Configurations.concreteVelocity * entity.motionX / velocity;
|
||||
entity.motionZ = Configurations.concreteVelocity * entity.motionZ / velocity;
|
||||
}
|
||||
|
||||
public static void spawnAutoChiselFX(TileEntityAutoChisel te, ItemStack base) {
|
||||
if (base != null && Minecraft.getMinecraft().gameSettings.particleSetting == 0) {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
|
||||
Reference in new issue
Block a user