优化迫击炮和63式火箭炮模型,添加lod
This commit is contained in:
parent
5f22d530e7
commit
0f32897ecc
8 changed files with 41485 additions and 5590 deletions
|
@ -24,7 +24,7 @@ public class Bmp2Model extends GeoModel<Bmp2Entity> {
|
||||||
distance = (int) player.position().distanceTo(entity.position());
|
distance = (int) player.position().distanceTo(entity.position());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (distance < 32 || player.isScoping()) {
|
if (distance < 48 || player.isScoping()) {
|
||||||
return Mod.loc("geo/bmp2.geo.json");
|
return Mod.loc("geo/bmp2.geo.json");
|
||||||
} else if (distance < 96) {
|
} else if (distance < 96) {
|
||||||
return Mod.loc("geo/vehicle_lod/bmp2.lod1.geo.json");
|
return Mod.loc("geo/vehicle_lod/bmp2.lod1.geo.json");
|
||||||
|
|
|
@ -2,8 +2,10 @@ package com.atsuishio.superbwarfare.client.model.entity;
|
||||||
|
|
||||||
import com.atsuishio.superbwarfare.Mod;
|
import com.atsuishio.superbwarfare.Mod;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.MortarEntity;
|
import com.atsuishio.superbwarfare.entity.vehicle.MortarEntity;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
import software.bernie.geckolib.animation.AnimationState;
|
import software.bernie.geckolib.animation.AnimationState;
|
||||||
import software.bernie.geckolib.cache.object.GeoBone;
|
import software.bernie.geckolib.cache.object.GeoBone;
|
||||||
import software.bernie.geckolib.constant.DataTickets;
|
import software.bernie.geckolib.constant.DataTickets;
|
||||||
|
@ -19,7 +21,19 @@ public class MortarModel extends GeoModel<MortarEntity> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getModelResource(MortarEntity entity) {
|
public ResourceLocation getModelResource(MortarEntity entity) {
|
||||||
return Mod.loc("geo/mortar.geo.json");
|
Player player = Minecraft.getInstance().player;
|
||||||
|
|
||||||
|
int distance = 0;
|
||||||
|
|
||||||
|
if (player != null) {
|
||||||
|
distance = (int) player.position().distanceTo(entity.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (distance < 48 || player.isScoping()) {
|
||||||
|
return Mod.loc("geo/mortar.geo.json");
|
||||||
|
} else {
|
||||||
|
return Mod.loc("geo/vehicle_lod/mortar.lod1.geo.json");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -2,7 +2,9 @@ package com.atsuishio.superbwarfare.client.model.entity;
|
||||||
|
|
||||||
import com.atsuishio.superbwarfare.Mod;
|
import com.atsuishio.superbwarfare.Mod;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.Type63Entity;
|
import com.atsuishio.superbwarfare.entity.vehicle.Type63Entity;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
import software.bernie.geckolib.model.GeoModel;
|
import software.bernie.geckolib.model.GeoModel;
|
||||||
|
|
||||||
public class Type63Model extends GeoModel<Type63Entity> {
|
public class Type63Model extends GeoModel<Type63Entity> {
|
||||||
|
@ -14,7 +16,21 @@ public class Type63Model extends GeoModel<Type63Entity> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getModelResource(Type63Entity entity) {
|
public ResourceLocation getModelResource(Type63Entity entity) {
|
||||||
return Mod.loc("geo/type_63.geo.json");
|
Player player = Minecraft.getInstance().player;
|
||||||
|
|
||||||
|
int distance = 0;
|
||||||
|
|
||||||
|
if (player != null) {
|
||||||
|
distance = (int) player.position().distanceTo(entity.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (distance < 32 || player.isScoping()) {
|
||||||
|
return Mod.loc("geo/type_63.geo.json");
|
||||||
|
} else if (distance < 96) {
|
||||||
|
return Mod.loc("geo/vehicle_lod/type_63.lod1.geo.json");
|
||||||
|
} else {
|
||||||
|
return Mod.loc("geo/vehicle_lod/type_63.lod2.geo.json");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Loading…
Add table
Reference in a new issue