Remove bedrock top layer.
Got Lang files working on windows. Simply regsitry code, Got monolith to stay put.
This commit is contained in:
parent
a220390a5a
commit
0b179c7820
14 changed files with 130 additions and 121 deletions
|
@ -1,45 +0,0 @@
|
|||
package org.dimdev.dimdoors.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import org.dimdev.dimdoors.world.ModDimensions;
|
||||
|
||||
public class FabricBlock extends Block {
|
||||
public FabricBlock(Block.Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"deprecation"})
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
ItemStack heldStack = hand == Hand.MAIN_HAND ? player.getMainHandStack() : player.getOffHandStack();
|
||||
Block heldBlock = Block.getBlockFromItem(heldStack.getItem());
|
||||
|
||||
if (world.canPlayerModifyAt(player, pos) &&
|
||||
player.canPlaceOn(pos, hit.getSide(), heldStack) &&
|
||||
heldBlock.getDefaultState().isFullCube(world, pos) &&
|
||||
!heldBlock.hasBlockEntity() &&
|
||||
heldBlock != this &&
|
||||
!player.isSneaking() &&
|
||||
ModDimensions.isDimDoorsPocketDimension(world)) {
|
||||
|
||||
if (!player.isCreative()) {
|
||||
heldStack.decrement(1);
|
||||
}
|
||||
|
||||
world.setBlockState(pos, heldBlock.getPlacementState(new ItemPlacementContext(new ItemUsageContext(player, hand, hit))));
|
||||
return ActionResult.SUCCESS;
|
||||
} else {
|
||||
return ActionResult.PASS;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,13 +1,20 @@
|
|||
package org.dimdev.dimdoors.block;
|
||||
|
||||
import net.fabricmc.fabric.api.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.DyeColor;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.World;
|
||||
import org.dimdev.dimdoors.world.ModDimensions;
|
||||
|
||||
public final class ModBlocks {
|
||||
public static final Block GOLD_DOOR = register("dimdoors:gold_door", new DoorBlock(FabricBlockSettings.of(Material.METAL, MaterialColor.GOLD).nonOpaque().build()));
|
||||
|
@ -21,39 +28,39 @@ public final class ModBlocks {
|
|||
public static final Block DIMENSIONAL_PORTAL = register("dimdoors:dimensional_portal", new DimensionalPortalBlock(FabricBlockSettings.of(Material.AIR).collidable(false).dropsNothing().build()));
|
||||
public static final Block DETACHED_RIFT = register("dimdoors:detached_rift", new DetachedRiftBlock(FabricBlockSettings.of(Material.AIR).nonOpaque().build()));
|
||||
|
||||
public static final Block WHITE_FABRIC = register("dimdoors:white_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.WHITE).build()));
|
||||
public static final Block ORANGE_FABRIC = register("dimdoors:orange_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.ORANGE).build()));
|
||||
public static final Block MAGENTA_FABRIC = register("dimdoors:magenta_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.MAGENTA).build()));
|
||||
public static final Block LIGHT_BLUE_FABRIC = register("dimdoors:light_blue_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.LIGHT_BLUE).build()));
|
||||
public static final Block YELLOW_FABRIC = register("dimdoors:yellow_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.YELLOW).build()));
|
||||
public static final Block LIME_FABRIC = register("dimdoors:lime_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.LIME).build()));
|
||||
public static final Block PINK_FABRIC = register("dimdoors:pink_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.PINK).build()));
|
||||
public static final Block GRAY_FABRIC = register("dimdoors:gray_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.GRAY).build()));
|
||||
public static final Block LIGHT_GRAY_FABRIC = register("dimdoors:light_gray_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.LIGHT_GRAY).build()));
|
||||
public static final Block CYAN_FABRIC = register("dimdoors:cyan_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.CYAN).build()));
|
||||
public static final Block PURPLE_FABRIC = register("dimdoors:purple_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.PURPLE).build()));
|
||||
public static final Block BLUE_FABRIC = register("dimdoors:blue_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.BLUE).build()));
|
||||
public static final Block BROWN_FABRIC = register("dimdoors:brown_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.BROWN).build()));
|
||||
public static final Block GREEN_FABRIC = register("dimdoors:green_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.GREEN).build()));
|
||||
public static final Block RED_FABRIC = register("dimdoors:red_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.RED).build()));
|
||||
public static final Block BLACK_FABRIC = register("dimdoors:black_fabric", new FabricBlock(FabricBlockSettings.of(Material.STONE, DyeColor.BLACK).build()));
|
||||
public static final Block WHITE_FABRIC = registerFabric("dimdoors:white_fabric", DyeColor.WHITE);
|
||||
public static final Block ORANGE_FABRIC = registerFabric("dimdoors:orange_fabric", DyeColor.ORANGE);
|
||||
public static final Block MAGENTA_FABRIC = registerFabric("dimdoors:magenta_fabric", DyeColor.MAGENTA);
|
||||
public static final Block LIGHT_BLUE_FABRIC = registerFabric("dimdoors:light_blue_fabric", DyeColor.LIGHT_BLUE);
|
||||
public static final Block YELLOW_FABRIC = registerFabric("dimdoors:yellow_fabric", DyeColor.YELLOW);
|
||||
public static final Block LIME_FABRIC = registerFabric("dimdoors:lime_fabric", DyeColor.LIME);
|
||||
public static final Block PINK_FABRIC = registerFabric("dimdoors:pink_fabric", DyeColor.PINK);
|
||||
public static final Block GRAY_FABRIC = registerFabric("dimdoors:gray_fabric", DyeColor.GRAY);
|
||||
public static final Block LIGHT_GRAY_FABRIC = registerFabric("dimdoors:light_gray_fabric", DyeColor.LIGHT_GRAY);
|
||||
public static final Block CYAN_FABRIC = registerFabric("dimdoors:cyan_fabric", DyeColor.CYAN);
|
||||
public static final Block PURPLE_FABRIC = registerFabric("dimdoors:purple_fabric", DyeColor.PURPLE);
|
||||
public static final Block BLUE_FABRIC = registerFabric("dimdoors:blue_fabric", DyeColor.BLUE);
|
||||
public static final Block BROWN_FABRIC = registerFabric("dimdoors:brown_fabric", DyeColor.BROWN);
|
||||
public static final Block GREEN_FABRIC = registerFabric("dimdoors:green_fabric", DyeColor.GREEN);
|
||||
public static final Block RED_FABRIC = registerFabric("dimdoors:red_fabric", DyeColor.RED);
|
||||
public static final Block BLACK_FABRIC = registerFabric("dimdoors:black_fabric", DyeColor.BLACK);
|
||||
|
||||
public static final Block WHITE_ANCIENT_FABRIC = register("dimdoors:white_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.WHITE).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block ORANGE_ANCIENT_FABRIC = register("dimdoors:orange_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.ORANGE).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block MAGENTA_ANCIENT_FABRIC = register("dimdoors:magenta_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.MAGENTA).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block LIGHT_BLUE_ANCIENT_FABRIC = register("dimdoors:light_blue_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.LIGHT_BLUE).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block YELLOW_ANCIENT_FABRIC = register("dimdoors:yellow_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.YELLOW).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block LIME_ANCIENT_FABRIC = register("dimdoors:lime_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.LIME).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block PINK_ANCIENT_FABRIC = register("dimdoors:pink_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.PINK).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block GRAY_ANCIENT_FABRIC = register("dimdoors:gray_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.GRAY).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block LIGHT_GRAY_ANCIENT_FABRIC = register("dimdoors:light_gray_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.LIGHT_GRAY).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block CYAN_ANCIENT_FABRIC = register("dimdoors:cyan_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.CYAN).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block PURPLE_ANCIENT_FABRIC = register("dimdoors:purple_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.PURPLE).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block BLUE_ANCIENT_FABRIC = register("dimdoors:blue_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.BLUE).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block BROWN_ANCIENT_FABRIC = register("dimdoors:brown_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.BROWN).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block GREEN_ANCIENT_FABRIC = register("dimdoors:green_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.GREEN).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block RED_ANCIENT_FABRIC = register("dimdoors:red_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.RED).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block BLACK_ANCIENT_FABRIC = register("dimdoors:black_ancient_fabric", new Block(FabricBlockSettings.of(Material.STONE, DyeColor.BLACK).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
public static final Block WHITE_ANCIENT_FABRIC = registerAncientFabric("dimdoors:white_ancient_fabric", DyeColor.WHITE);
|
||||
public static final Block ORANGE_ANCIENT_FABRIC = registerAncientFabric("dimdoors:orange_ancient_fabric", DyeColor.ORANGE);
|
||||
public static final Block MAGENTA_ANCIENT_FABRIC = registerAncientFabric("dimdoors:magenta_ancient_fabric", DyeColor.MAGENTA);
|
||||
public static final Block LIGHT_BLUE_ANCIENT_FABRIC = registerAncientFabric("dimdoors:light_blue_ancient_fabric", DyeColor.LIGHT_BLUE);
|
||||
public static final Block YELLOW_ANCIENT_FABRIC = registerAncientFabric("dimdoors:yellow_ancient_fabric", DyeColor.YELLOW);
|
||||
public static final Block LIME_ANCIENT_FABRIC = registerAncientFabric("dimdoors:lime_ancient_fabric", DyeColor.LIME);
|
||||
public static final Block PINK_ANCIENT_FABRIC = registerAncientFabric("dimdoors:pink_ancient_fabric", DyeColor.PINK);
|
||||
public static final Block GRAY_ANCIENT_FABRIC = registerAncientFabric("dimdoors:gray_ancient_fabric", DyeColor.GRAY);
|
||||
public static final Block LIGHT_GRAY_ANCIENT_FABRIC = registerAncientFabric("dimdoors:light_gray_ancient_fabric", DyeColor.LIGHT_GRAY);
|
||||
public static final Block CYAN_ANCIENT_FABRIC = registerAncientFabric("dimdoors:cyan_ancient_fabric", DyeColor.CYAN);
|
||||
public static final Block PURPLE_ANCIENT_FABRIC = registerAncientFabric("dimdoors:purple_ancient_fabric", DyeColor.PURPLE);
|
||||
public static final Block BLUE_ANCIENT_FABRIC = registerAncientFabric("dimdoors:blue_ancient_fabric", DyeColor.BLUE);
|
||||
public static final Block BROWN_ANCIENT_FABRIC = registerAncientFabric("dimdoors:brown_ancient_fabric", DyeColor.BROWN);
|
||||
public static final Block GREEN_ANCIENT_FABRIC = registerAncientFabric("dimdoors:green_ancient_fabric", DyeColor.GREEN);
|
||||
public static final Block RED_ANCIENT_FABRIC = registerAncientFabric("dimdoors:red_ancient_fabric", DyeColor.RED);
|
||||
public static final Block BLACK_ANCIENT_FABRIC = registerAncientFabric("dimdoors:black_ancient_fabric", DyeColor.BLACK);
|
||||
|
||||
public static final Block ETERNAL_FLUID = register("dimdoors:eternal_fluid", new EternalFluidBlock(FabricBlockSettings.of(Material.STONE, MaterialColor.RED).build()));
|
||||
public static final Block UNRAVELLED_FABRIC = register("dimdoors:unravelled_fabric", new UnravelledFabricBlock(FabricBlockSettings.of(Material.STONE, MaterialColor.BLACK).build()));
|
||||
|
@ -64,6 +71,39 @@ public final class ModBlocks {
|
|||
return Registry.register(Registry.BLOCK, string, block);
|
||||
}
|
||||
|
||||
public static Block registerAncientFabric(String id, DyeColor color) {
|
||||
return register(id, new Block(FabricBlockSettings.of(Material.STONE, color).strength(-1.0F, 3600000.0F).dropsNothing().build()));
|
||||
}
|
||||
|
||||
private static Block registerFabric(String id, DyeColor color) {
|
||||
return register(id, new Block(FabricBlockSettings.of(Material.STONE, DyeColor.WHITE).build()) {
|
||||
@Override
|
||||
@SuppressWarnings({"deprecation"})
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
ItemStack heldStack = hand == Hand.MAIN_HAND ? player.getMainHandStack() : player.getOffHandStack();
|
||||
Block heldBlock = Block.getBlockFromItem(heldStack.getItem());
|
||||
|
||||
if (world.canPlayerModifyAt(player, pos) &&
|
||||
player.canPlaceOn(pos, hit.getSide(), heldStack) &&
|
||||
heldBlock.getDefaultState().isFullCube(world, pos) &&
|
||||
!heldBlock.hasBlockEntity() &&
|
||||
heldBlock != this &&
|
||||
!player.isSneaking() &&
|
||||
ModDimensions.isDimDoorsPocketDimension(world)) {
|
||||
|
||||
if (!player.isCreative()) {
|
||||
heldStack.decrement(1);
|
||||
}
|
||||
|
||||
world.setBlockState(pos, heldBlock.getPlacementState(new ItemPlacementContext(new ItemUsageContext(player, hand, hit))));
|
||||
return ActionResult.SUCCESS;
|
||||
} else {
|
||||
return ActionResult.PASS;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
// just loads the class
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.dimdev.dimdoors.entity;
|
||||
|
||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
||||
import net.fabricmc.fabric.impl.object.builder.FabricEntityType;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityCategory;
|
||||
import net.minecraft.entity.EntityDimensions;
|
||||
|
@ -12,27 +11,13 @@ public class ModEntityTypes {
|
|||
public static final EntityType<MonolithEntity> MONOLITH = register(
|
||||
"dimdoors:monolith",
|
||||
MonolithEntity::new,
|
||||
EntityCategory.MONSTER,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
128,
|
||||
32,
|
||||
new EntityDimensions(3, 3, false)
|
||||
3, 3
|
||||
);
|
||||
|
||||
public static final EntityType<MaskEntity> MASK = register(
|
||||
"dimdoors:mask",
|
||||
MaskEntity::new,
|
||||
EntityCategory.MONSTER,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
128,
|
||||
32,
|
||||
new EntityDimensions(1, 1, false)
|
||||
1, 1
|
||||
);
|
||||
|
||||
public static void init() {
|
||||
|
@ -40,7 +25,7 @@ public class ModEntityTypes {
|
|||
EntityRendererRegistry.INSTANCE.register(MASK, MaskRenderer::new);
|
||||
}
|
||||
|
||||
private static <E extends Entity> EntityType<E> register(String id, EntityType.EntityFactory<E> factory, EntityCategory category, boolean canSpawnFar, boolean saveable, boolean summonable, boolean immuneToFire, int i, int j, EntityDimensions dimensions) {
|
||||
return Registry.register(Registry.ENTITY_TYPE, id, new EntityType<>(factory, category, canSpawnFar, saveable, summonable, immuneToFire, i, j, dimensions));
|
||||
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, EntityCategory.MONSTER).setDimensions(a, b).makeFireImmune().spawnableFarFromPlayer().build(id));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,10 +4,12 @@ import com.flowpowered.math.vector.Vector3f;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.MovementType;
|
||||
import net.minecraft.entity.damage.DamageSource;
|
||||
import net.minecraft.entity.data.DataTracker;
|
||||
import net.minecraft.entity.data.TrackedData;
|
||||
import net.minecraft.entity.data.TrackedDataHandlerRegistry;
|
||||
import net.minecraft.entity.decoration.ArmorStandEntity;
|
||||
import net.minecraft.entity.mob.MobEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
@ -46,6 +48,7 @@ public class MonolithEntity extends MobEntity {
|
|||
super(type, world);
|
||||
noClip = true;
|
||||
aggroCap = MathHelper.nextInt(getRandom(), MIN_AGGRO_CAP, MAX_AGGRO_CAP);
|
||||
setNoGravity(true);
|
||||
}
|
||||
|
||||
public boolean isDangerous() {
|
||||
|
@ -96,12 +99,10 @@ public class MonolithEntity extends MobEntity {
|
|||
getAttributes().get(MAX_HEALTH).setBaseValue(57005);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean canBePushed() {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
|
||||
@Override
|
||||
public boolean isPushable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getEyeY() {
|
||||
|
@ -120,6 +121,10 @@ public class MonolithEntity extends MobEntity {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void move(MovementType movementType, Vec3d vec3d) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mobTick() {
|
||||
// Remove this Monolith if it's not in Limbo or in a pocket dungeon
|
||||
|
@ -136,6 +141,8 @@ public class MonolithEntity extends MobEntity {
|
|||
boolean visibility = player != null && player.canSee(this);
|
||||
updateAggroLevel(player, visibility);
|
||||
|
||||
System.out.println(String.format("Player is %s.", player));
|
||||
|
||||
// Change orientation and face a player if one is in range
|
||||
if (player != null) {
|
||||
facePlayer(player);
|
||||
|
|
|
@ -1,32 +1,47 @@
|
|||
package org.dimdev.dimdoors.entity;
|
||||
|
||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
||||
import net.minecraft.client.render.OverlayTexture;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||
import net.minecraft.client.render.entity.EntityRenderer;
|
||||
import net.minecraft.client.render.entity.LivingEntityRenderer;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.Identifier;
|
||||
import org.dimdev.dimdoors.client.MonolithModel;
|
||||
|
||||
public class MonolithRenderer extends EntityRenderer<MonolithEntity> {
|
||||
private MonolithModel model = new MonolithModel();
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MonolithRenderer extends LivingEntityRenderer<MonolithEntity, MonolithModel> {
|
||||
protected static final List<Identifier> MONOLITH_TEXTURES = Arrays.asList(
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith0.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith1.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith2.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith3.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith4.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith5.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith6.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith7.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith8.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith9.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith10.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith11.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith12.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith13.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith14.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith15.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith16.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith17.png"),
|
||||
new Identifier("dimdoors:textures/mob/monolith/monolith18.png"));
|
||||
|
||||
protected MonolithRenderer(EntityRenderDispatcher dispatcher, EntityRendererRegistry.Context context) {
|
||||
super(dispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(MonolithEntity entity, float f, float g, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i) {
|
||||
super.render(entity, f, g, matrixStack, vertexConsumerProvider, i);
|
||||
|
||||
matrixStack.push();
|
||||
//model.render(entity);
|
||||
matrixStack.pop();
|
||||
|
||||
super(dispatcher, new MonolithModel(), 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier getTexture(MonolithEntity entity) {
|
||||
return new Identifier("dimdoors:monolith");
|
||||
return MONOLITH_TEXTURES.get(entity.getTextureState());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,10 +6,12 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.source.BiomeSource;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.gen.chunk.SurfaceChunkGenerator;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class LimboChunkGenerator extends SurfaceChunkGenerator<LimboChunkGeneratorConfig> {
|
||||
private final double[] noiseFalloff = buildNoiseFalloff();
|
||||
|
@ -81,4 +83,9 @@ public class LimboChunkGenerator extends SurfaceChunkGenerator<LimboChunkGenerat
|
|||
public int getSeaLevel() {
|
||||
return 32;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buildBedrock(Chunk chunk, Random random) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"itemGroup.dimdoors.dimensional_doors_creative_tab": "Dimensional Doors Items",
|
||||
"itemGroup.dimdoors.dimensional_doors": "Dimensional Doors Items",
|
||||
"block.dimdoors.gold_door": "Gold Door",
|
||||
"block.dimdoors.quartz_door": "Quartz Door",
|
||||
"block.dimdoors.iron_dimensional_door": "Iron Dimensional Door",
|
Loading…
Add table
Reference in a new issue