优化防御塔伤害来源,注册骑乘工具(暂无功能)
This commit is contained in:
parent
76456c5a93
commit
d43630a595
3 changed files with 11 additions and 1 deletions
|
@ -333,7 +333,7 @@ public class LaserTowerEntity extends EnergyVehicleEntity implements GeoEntity,
|
||||||
sendParticle(serverLevel, ParticleTypes.LAVA, target.getX(), target.getEyeY(), target.getZ(), 4, 0, 0, 0, 0.15, true);
|
sendParticle(serverLevel, ParticleTypes.LAVA, target.getX(), target.getEyeY(), target.getZ(), 4, 0, 0, 0, 0.15, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
target.hurt(ModDamageTypes.causeLaserStaticDamage(this.level().registryAccess(), getOwner(), getOwner()), (float) 15);
|
target.hurt(ModDamageTypes.causeLaserStaticDamage(this.level().registryAccess(), this, this.getOwner()), (float) 15);
|
||||||
target.invulnerableTime = 0;
|
target.invulnerableTime = 0;
|
||||||
entityData.set(LASER_LENGTH, distanceTo(target));
|
entityData.set(LASER_LENGTH, distanceTo(target));
|
||||||
entityData.set(TARGET_UUID, "none");
|
entityData.set(TARGET_UUID, "none");
|
||||||
|
|
|
@ -172,6 +172,7 @@ public class ModItems {
|
||||||
public static final RegistryObject<Item> CELL = ITEMS.register("cell", Cell::new);
|
public static final RegistryObject<Item> CELL = ITEMS.register("cell", Cell::new);
|
||||||
public static final RegistryObject<Item> TRANSCRIPT = ITEMS.register("transcript", Transcript::new);
|
public static final RegistryObject<Item> TRANSCRIPT = ITEMS.register("transcript", Transcript::new);
|
||||||
public static final RegistryObject<Item> FIRING_PARAMETERS = ITEMS.register("firing_parameters", FiringParameters::new);
|
public static final RegistryObject<Item> FIRING_PARAMETERS = ITEMS.register("firing_parameters", FiringParameters::new);
|
||||||
|
public static final RegistryObject<Item> RIDE_TOOL = ITEMS.register("ride_tool", RideTool::new);
|
||||||
|
|
||||||
public static final RegistryObject<Item> TUNGSTEN_ROD = ITEMS.register("tungsten_rod", () -> new Item(new Item.Properties()));
|
public static final RegistryObject<Item> TUNGSTEN_ROD = ITEMS.register("tungsten_rod", () -> new Item(new Item.Properties()));
|
||||||
public static final RegistryObject<Item> IRON_BARREL = ITEMS.register("iron_barrel", () -> new Item(new Item.Properties()));
|
public static final RegistryObject<Item> IRON_BARREL = ITEMS.register("iron_barrel", () -> new Item(new Item.Properties()));
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.atsuishio.superbwarfare.item;
|
||||||
|
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
|
||||||
|
public class RideTool extends Item {
|
||||||
|
public RideTool() {
|
||||||
|
super(new Properties().stacksTo(1));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue