调整c4
This commit is contained in:
parent
cb8cba7d21
commit
44125e8626
3 changed files with 28 additions and 36 deletions
|
@ -2,7 +2,7 @@ package com.atsuishio.superbwarfare.client.renderer.block;
|
|||
|
||||
import com.atsuishio.superbwarfare.block.CreativeChargingStationBlock;
|
||||
import com.atsuishio.superbwarfare.block.entity.CreativeChargingStationBlockEntity;
|
||||
import com.atsuishio.superbwarfare.client.renderer.CustomRenderType;
|
||||
import com.atsuishio.superbwarfare.client.renderer.ModRenderTypes;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
|
||||
|
@ -41,7 +41,7 @@ public class CreativeChargingStationBlockEntityRenderer implements BlockEntityRe
|
|||
var alpha = 0.2f;
|
||||
|
||||
|
||||
var builder = bufferSource.getBuffer(CustomRenderType.BLOCK_OVERLAY);
|
||||
var builder = bufferSource.getBuffer(ModRenderTypes.BLOCK_OVERLAY);
|
||||
var m4f = poseStack.last().pose();
|
||||
|
||||
// east
|
||||
|
|
|
@ -354,7 +354,7 @@ public class C4Entity extends Entity implements GeoEntity, OwnableEntity {
|
|||
return false;
|
||||
} else {
|
||||
Entity entity = this.getOwner();
|
||||
return entity == null || !entity.isPassengerOfSameVehicle(pTarget);
|
||||
return entity == null || (entity == pTarget && this.tickCount > 2) || !entity.isPassengerOfSameVehicle(pTarget);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
package com.atsuishio.superbwarfare.mixins;
|
||||
|
||||
import com.atsuishio.superbwarfare.Mod;
|
||||
import com.atsuishio.superbwarfare.client.LoudlyEntitySoundInstance;
|
||||
import com.atsuishio.superbwarfare.client.VehicleFireSoundInstance;
|
||||
import com.atsuishio.superbwarfare.client.VehicleSoundInstance;
|
||||
import com.atsuishio.superbwarfare.entity.LoudlyEntity;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.A10Entity;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.Hpj11Entity;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.base.MobileVehicleEntity;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.base.TrackEntity;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.base.VehicleEntity;
|
||||
import com.atsuishio.superbwarfare.init.ModKeyMappings;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -78,28 +69,29 @@ public abstract class ClientPacketListenerMixin {
|
|||
vehicle.entityIndexOverride = null;
|
||||
}
|
||||
|
||||
@Inject(method = "postAddEntitySoundInstance(Lnet/minecraft/world/entity/Entity;)V", at = @At("RETURN"))
|
||||
private void postAddEntitySoundInstance(Entity pEntity, CallbackInfo ci) {
|
||||
if (pEntity instanceof LoudlyEntity) {
|
||||
Minecraft.getInstance().getSoundManager().play(new LoudlyEntitySoundInstance.EntitySound(pEntity));
|
||||
Minecraft.getInstance().getSoundManager().play(new LoudlyEntitySoundInstance.EntitySoundClose(pEntity));
|
||||
} else {
|
||||
Mod.queueClientWork(30, () -> {
|
||||
if (pEntity instanceof MobileVehicleEntity mobileVehicle) {
|
||||
if (mobileVehicle instanceof TrackEntity) {
|
||||
Minecraft.getInstance().getSoundManager().play(new VehicleSoundInstance.TrackSound(mobileVehicle));
|
||||
}
|
||||
if (mobileVehicle instanceof A10Entity) {
|
||||
Minecraft.getInstance().getSoundManager().play(new VehicleFireSoundInstance.A10FireSound(mobileVehicle));
|
||||
}
|
||||
if (mobileVehicle instanceof Hpj11Entity) {
|
||||
Minecraft.getInstance().getSoundManager().play(new VehicleFireSoundInstance.HPJ11CloseFireSound(mobileVehicle));
|
||||
}
|
||||
|
||||
Minecraft.getInstance().getSoundManager().play(new VehicleSoundInstance.EngineSound(mobileVehicle, mobileVehicle.getEngineSound()));
|
||||
Minecraft.getInstance().getSoundManager().play(new VehicleSoundInstance.SwimSound(mobileVehicle));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// TODO what is this
|
||||
// @Inject(method = "postAddEntitySoundInstance(Lnet/minecraft/world/entity/Entity;)V", at = @At("RETURN"))
|
||||
// private void postAddEntitySoundInstance(Entity pEntity, CallbackInfo ci) {
|
||||
// if (pEntity instanceof LoudlyEntity) {
|
||||
// Minecraft.getInstance().getSoundManager().play(new LoudlyEntitySoundInstance.EntitySound(pEntity));
|
||||
// Minecraft.getInstance().getSoundManager().play(new LoudlyEntitySoundInstance.EntitySoundClose(pEntity));
|
||||
// } else {
|
||||
// Mod.queueClientWork(30, () -> {
|
||||
// if (pEntity instanceof MobileVehicleEntity mobileVehicle) {
|
||||
// if (mobileVehicle instanceof TrackEntity) {
|
||||
// Minecraft.getInstance().getSoundManager().play(new VehicleSoundInstance.TrackSound(mobileVehicle));
|
||||
// }
|
||||
// if (mobileVehicle instanceof A10Entity) {
|
||||
// Minecraft.getInstance().getSoundManager().play(new VehicleFireSoundInstance.A10FireSound(mobileVehicle));
|
||||
// }
|
||||
// if (mobileVehicle instanceof Hpj11Entity) {
|
||||
// Minecraft.getInstance().getSoundManager().play(new VehicleFireSoundInstance.HPJ11CloseFireSound(mobileVehicle));
|
||||
// }
|
||||
//
|
||||
// Minecraft.getInstance().getSoundManager().play(new VehicleSoundInstance.EngineSound(mobileVehicle, mobileVehicle.getEngineSound()));
|
||||
// Minecraft.getInstance().getSoundManager().play(new VehicleSoundInstance.SwimSound(mobileVehicle));
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue