mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-05 04:49:10 +01:00
finish up todos
This commit is contained in:
parent
ea6ab5aa78
commit
7576d36820
7 changed files with 6 additions and 15 deletions
|
@ -19,9 +19,7 @@ import net.minecraft.server.level.ServerLevel;
|
|||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.ItemInteractionResult;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -93,7 +91,6 @@ public class BlockDimensionRail extends BaseRailBlock implements IModItem, ICust
|
|||
PacketHandler.sendToAllAround(level, pos, 32, new PacketParticles((float) box.minX, (float) box.minY, (float) box.minZ, PacketParticles.Type.DIMENSION_RAIL, (int) ((box.maxX - box.minX) * 100F), (int) ((box.maxY - box.minY) * 100F), (int) ((box.maxZ - box.minZ) * 100F)));
|
||||
level.playSound(null, pos, SoundEvents.ENDERMAN_TELEPORT, SoundSource.BLOCKS, 1F, 1F);
|
||||
|
||||
// TODO test if this new dimension change works!
|
||||
var goalCoords = this.getGoalCoords(level, pos).getCenter();
|
||||
cart.changeDimension(new DimensionTransition(level.getServer().getLevel(this.goalDim), goalCoords, cart.getDeltaMovement(), cart.getYRot(), cart.getXRot(), DimensionTransition.PLAY_PORTAL_SOUND));
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ public class BlockEntityPotionGenerator extends BlockEntityImpl implements ITick
|
|||
if (!addedOne) {
|
||||
PotionContents type;
|
||||
try {
|
||||
// TODO check if this new private value getter works
|
||||
type = (PotionContents) BlockEntityPotionGenerator.POTION_CONTENTS_FIELD.get(cloud);
|
||||
} catch (IllegalAccessException e) {
|
||||
NaturesAura.LOGGER.fatal("Couldn't reflect furnace field", e);
|
||||
|
|
|
@ -118,7 +118,10 @@ public class OreSpawnEffect implements IDrainSpotEffect {
|
|||
var tag = TagKey.create(Registries.BLOCK, ore.tag);
|
||||
if (tag == null)
|
||||
continue;
|
||||
for (var toPlaceHolder : BuiltInRegistries.BLOCK.getTag(tag).orElseThrow()) {
|
||||
var values = BuiltInRegistries.BLOCK.getTag(tag);
|
||||
if (values.isEmpty())
|
||||
continue;
|
||||
for (var toPlaceHolder : values.get()) {
|
||||
if (toPlaceHolder == null)
|
||||
continue;
|
||||
var toPlace = toPlaceHolder.value();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package de.ellpeck.naturesaura.items;
|
||||
|
||||
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.InteractionResultHolder;
|
||||
|
@ -32,13 +33,8 @@ public class ItemCaveFinder extends ItemImpl {
|
|||
for (var z = -range; z <= range; z++) {
|
||||
var offset = pos.offset(x, y, z);
|
||||
var state = levelIn.getBlockState(offset);
|
||||
// TODO figure out an entity-independent way of checking if a block is a valid spawn (just checking for air & ground below?)
|
||||
/* try {
|
||||
if (!state.getBlock().isValidSpawn(state, levelIn, offset, SpawnPlacements.Type.ON_GROUND, null))
|
||||
continue;
|
||||
} catch (Exception e) {
|
||||
if (!state.isFaceSturdy(levelIn, offset, Direction.UP))
|
||||
continue;
|
||||
}*/
|
||||
|
||||
var offUp = offset.above();
|
||||
var stateUp = levelIn.getBlockState(offUp);
|
||||
|
|
|
@ -87,7 +87,6 @@ public class ItemPickaxe extends PickaxeItem implements IModItem, ICustomItemMod
|
|||
|
||||
@Override
|
||||
public boolean mineBlock(ItemStack stack, Level level, BlockState state, BlockPos pos, LivingEntity miningEntity) {
|
||||
// TODO test depth pickaxe vein mining
|
||||
if (stack.getItem() == ModItems.DEPTH_PICKAXE && Helper.isToolEnabled(stack) && level.getBlockState(pos).is(Tags.Blocks.ORES))
|
||||
Helper.mineRecursively(level, pos, pos, stack, 5, 5, s -> s.is(Tags.Blocks.ORES));
|
||||
return super.mineBlock(stack, level, state, pos, miningEntity);
|
||||
|
|
|
@ -89,7 +89,6 @@ public class ClientProxy implements IProxy {
|
|||
@Override
|
||||
@SuppressWarnings("removal")
|
||||
public void postInit(FMLCommonSetupEvent event) {
|
||||
// TODO this uses a vanilla model so we can't just add the json entry to it
|
||||
ItemBlockRenderTypes.setRenderLayer(ModBlocks.GOLD_POWDER, RenderType.cutoutMipped());
|
||||
}
|
||||
|
||||
|
@ -120,7 +119,6 @@ public class ClientProxy implements IProxy {
|
|||
var colors = Minecraft.getInstance().getItemColors();
|
||||
var color = item.getItemColor();
|
||||
|
||||
// TODO use event
|
||||
if (item instanceof Item) {
|
||||
colors.register(color, (Item) item);
|
||||
} else if (item instanceof Block) {
|
||||
|
|
|
@ -42,7 +42,6 @@ public final class ModRecipes {
|
|||
Blocks.STONE_BRICK_WALL.defaultBlockState(),
|
||||
Blocks.MOSSY_STONE_BRICK_WALL.defaultBlockState());
|
||||
|
||||
// TODO test if these ores still work!
|
||||
ModRecipes.ore(NaturesAuraAPI.OVERWORLD_ORES, "ores/coal", 5000);
|
||||
ModRecipes.ore(NaturesAuraAPI.NETHER_ORES, "ores/nether/coal", 5000);
|
||||
ModRecipes.ore(NaturesAuraAPI.OVERWORLD_ORES, "ores/iron", 3000);
|
||||
|
|
Loading…
Reference in a new issue