mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Simplified block clearing and decoration.
This commit is contained in:
parent
2f7c013423
commit
f2e733679c
@ -93,20 +93,7 @@ public class EntityMeteor extends Entity {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean clearMeteorPath(World world, int x, int y, int z) {
|
||||
boolean foundSolidBlock = false;
|
||||
|
||||
for (int[] blockPos : getBlocksInRadius(world, x, y, z, 5))
|
||||
{
|
||||
if(damageOrDestroyBlock(worldObj, blockPos[0], blockPos[1], blockPos[2])) {
|
||||
foundSolidBlock = true;
|
||||
}
|
||||
}
|
||||
|
||||
return foundSolidBlock;
|
||||
}
|
||||
|
||||
public void decorateCrater(World world, int x, int y, int z) {
|
||||
public void clearMeteorPath(World world, int x, int y, int z) {
|
||||
for (int[] blockPos : getBlocksInRadius(world, x, y, z, 5))
|
||||
{
|
||||
damageOrDestroyBlock(worldObj, blockPos[0], blockPos[1], blockPos[2]);
|
||||
@ -131,7 +118,8 @@ public class EntityMeteor extends Entity {
|
||||
this.moveEntity(motionX, motionY, motionZ);
|
||||
|
||||
if(!this.worldObj.isRemote && this.posY < 260) {
|
||||
if(clearMeteorPath(worldObj, (int)this.posX, (int)this.posY, (int)this.posZ) && this.onGround) {
|
||||
clearMeteorPath(worldObj, (int)this.posX, (int)this.posY, (int)this.posZ);
|
||||
if(this.onGround) {
|
||||
worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 5 + rand.nextFloat(), !safe);
|
||||
|
||||
if(WorldConfig.enableMeteorTails) {
|
||||
@ -150,7 +138,7 @@ public class EntityMeteor extends Entity {
|
||||
int spawnPosZ = (int) (Math.round(this.posZ - 0.5D) + (safe ? 0 : (this.motionZ * 5)));
|
||||
|
||||
(new Meteorite()).generate(worldObj, rand, spawnPosX, spawnPosY, spawnPosZ, safe, true, true);
|
||||
decorateCrater(worldObj, spawnPosX, spawnPosY, spawnPosZ);
|
||||
clearMeteorPath(worldObj, spawnPosX, spawnPosY, spawnPosZ);
|
||||
|
||||
// Sound
|
||||
if(this.audioFly != null) this.audioFly.stopSound();
|
||||
|
||||
16
vlc-log.txt
Normal file
16
vlc-log.txt
Normal file
@ -0,0 +1,16 @@
|
||||
-- logger module started --
|
||||
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
|
||||
glconv_vaapi_x11 error: vaInitialize: unknown libva error
|
||||
glconv_vaapi_drm error: vaInitialize: unknown libva error
|
||||
glconv_vaapi_drm error: vaInitialize: operation failed
|
||||
avcodec: Using NVIDIA VDPAU Driver Shared Library 580.95.05 Tue Sep 23 09:39:47 UTC 2025 for hardware decoding
|
||||
main error: Timestamp conversion failed for 7671001: no reference clock
|
||||
main error: Could not convert timestamp 0 for FFmpeg
|
||||
-- logger module stopped --
|
||||
-- logger module started --
|
||||
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
|
||||
glconv_vaapi_x11 error: vaInitialize: unknown libva error
|
||||
glconv_vaapi_drm error: vaInitialize: unknown libva error
|
||||
glconv_vaapi_drm error: vaInitialize: operation failed
|
||||
avcodec: Using NVIDIA VDPAU Driver Shared Library 580.95.05 Tue Sep 23 09:39:47 UTC 2025 for hardware decoding
|
||||
-- logger module stopped --
|
||||
Loading…
x
Reference in New Issue
Block a user