Fixed unsafe calls to clientside code and added localizations
Changes to be committed: modified: src/main/java/org/dimdev/dimdoors/DimensionalDoorsClientInitializer.java modified: src/main/java/org/dimdev/dimdoors/entity/ModEntityTypes.java modified: src/main/java/org/dimdev/dimdoors/entity/MonolithEntity.java modified: src/main/java/org/dimdev/dimdoors/item/ModItems.java modified: src/main/resources/assets/dimdoors/lang/en_us.json renamed: src/main/resources/assets/dimdoors/textures/block/eternal_fabric_flow.png -> src/main/resources/assets/dimdoors/textures/block/eternal_fluid_flow.png renamed: src/main/resources/assets/dimdoors/textures/block/eternal_fabric_flow.png.mcmeta -> src/main/resources/assets/dimdoors/textures/block/eternal_fluid_flow.png.mcmeta renamed: src/main/resources/assets/dimdoors/textures/block/eternal_fabric_still.png -> src/main/resources/assets/dimdoors/textures/block/eternal_fluid_still.png renamed: src/main/resources/assets/dimdoors/textures/block/eternal_fabric_still.png.mcmeta -> src/main/resources/assets/dimdoors/textures/block/eternal_fluid_still.png.mcmeta
This commit is contained in:
parent
7961962c91
commit
d8769fb8a2
9 changed files with 20 additions and 2 deletions
|
@ -29,6 +29,7 @@ import net.minecraft.world.BlockRenderView;
|
|||
import org.dimdev.dimdoors.block.ModBlocks;
|
||||
import org.dimdev.dimdoors.client.CustomSkyProvider;
|
||||
import org.dimdev.dimdoors.client.LimboSkyProvider;
|
||||
import org.dimdev.dimdoors.entity.ModEntityTypes;
|
||||
import org.dimdev.dimdoors.fluid.ModFluids;
|
||||
import org.dimdev.dimdoors.world.ModDimensions;
|
||||
|
||||
|
@ -38,6 +39,8 @@ import java.util.function.Function;
|
|||
public class DimensionalDoorsClientInitializer implements ClientModInitializer {
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
ModEntityTypes.initClient();
|
||||
|
||||
putCutout(ModBlocks.OAK_DIMENSIONAL_DOOR);
|
||||
putCutout(ModBlocks.GOLD_DIMENSIONAL_DOOR);
|
||||
putCutout(ModBlocks.IRON_DIMENSIONAL_DOOR);
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
package org.dimdev.dimdoors.entity;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityDimensions;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -21,11 +26,17 @@ public class ModEntityTypes {
|
|||
);
|
||||
|
||||
public static void init() {
|
||||
FabricDefaultAttributeRegistry.register(MONOLITH, MonolithEntity.createMobAttributes());
|
||||
FabricDefaultAttributeRegistry.register(MASK, MonolithEntity.createMobAttributes());
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static void initClient() {
|
||||
EntityRendererRegistry.INSTANCE.register(MONOLITH, MonolithRenderer::new);
|
||||
EntityRendererRegistry.INSTANCE.register(MASK, MaskRenderer::new);
|
||||
}
|
||||
|
||||
private static <E extends Entity> EntityType<E> register(String id, EntityType.EntityFactory<E> factory, int a, int b) {
|
||||
return Registry.register(Registry.ENTITY_TYPE, id, EntityType.Builder.create(factory, SpawnGroup.MONSTER).setDimensions(a, b).makeFireImmune().spawnableFarFromPlayer().build(id));
|
||||
return Registry.register(Registry.ENTITY_TYPE, id, FabricEntityTypeBuilder.create(SpawnGroup.MONSTER, factory).dimensions(EntityDimensions.fixed(a, b)).fireImmune().spawnableFarFromPlayer().build());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class MonolithEntity extends MobEntity {
|
|||
private final int aggroCap;
|
||||
|
||||
public MonolithEntity(EntityType<? extends MonolithEntity> type, World world) {
|
||||
super(type, world);
|
||||
super(ModEntityTypes.MONOLITH, world);
|
||||
noClip = true;
|
||||
aggroCap = MathHelper.nextInt(getRandom(), MIN_AGGRO_CAP, MAX_AGGRO_CAP);
|
||||
setNoGravity(true);
|
||||
|
|
|
@ -19,6 +19,7 @@ import java.util.HashSet;
|
|||
|
||||
import static org.dimdev.dimdoors.item.ModItemGroups.DIMENSIONAL_DOORS;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class ModItems {
|
||||
public static final Item QUARTZ_DOOR = register(ModBlocks.QUARTZ_DOOR);
|
||||
public static final Item QUARTZ_DIMENSIONAL_DOOR = register(new DimensionalDoorItem(
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
"block.dimdoors.eternal_fabric": "Eternal Fabric",
|
||||
"block.dimdoors.unravelled_fabric": "Unraveled Fabric",
|
||||
"block.dimdoors.rift": "Rift Scar",
|
||||
"block.dimdoors.eternal_fluid": "Eternal Fluid",
|
||||
"item.dimdoors.gold_door": "Gold Door",
|
||||
"item.dimdoors.quartz_door": "Quartz Door",
|
||||
"item.dimdoors.iron_dimensional_door": "Iron Dimensional Door",
|
||||
|
@ -89,6 +90,8 @@
|
|||
"item.dimdoors.oak_dimensional_door.info": "Place on the block under a rift \\nto create a portal, or place anywhere \\nin a pocket dimension to exit.",
|
||||
"item.dimdoors.creepy_record": "Music Disc",
|
||||
"item.dimdoors.creepy_record.desc": "Creepy - The sound of Limbo",
|
||||
"item.dimdoors.eternal_fluid_bucket": "Eternal Fluid Bucket",
|
||||
"item.dimdoors.white_void_record": "White Void Record",
|
||||
"fluid.dimdoors.eternal_fabric": "Eternal Fabric",
|
||||
"entity.dimdoors.dimdoors.monolith": "Monolith",
|
||||
"commands.dimteleport.usage": "/dimteleport <dimension> <x> <y> <z> [yaw] [pitch]",
|
||||
|
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Loading…
Reference in a new issue