Reformated
This commit is contained in:
parent
fc1da134e7
commit
60e8008cb7
416 changed files with 5772 additions and 4573 deletions
|
@ -1,5 +1,12 @@
|
|||
package org.betterx.betterend.blocks.entities;
|
||||
|
||||
import org.betterx.betterend.blocks.HydrothermalVentBlock;
|
||||
import org.betterx.betterend.interfaces.FallFlyingItem;
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -13,13 +20,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import org.betterx.betterend.blocks.HydrothermalVentBlock;
|
||||
import org.betterx.betterend.interfaces.FallFlyingItem;
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockEntityHydrothermalVent extends BlockEntity {
|
||||
|
@ -29,10 +29,12 @@ public class BlockEntityHydrothermalVent extends BlockEntity {
|
|||
super(EndBlockEntities.HYDROTHERMAL_VENT, blockPos, blockState);
|
||||
}
|
||||
|
||||
public static <T extends BlockEntity> void tick(Level level,
|
||||
BlockPos worldPosition,
|
||||
BlockState state,
|
||||
T uncastedEntity) {
|
||||
public static <T extends BlockEntity> void tick(
|
||||
Level level,
|
||||
BlockPos worldPosition,
|
||||
BlockState state,
|
||||
T uncastedEntity
|
||||
) {
|
||||
if (level != null && uncastedEntity instanceof BlockEntityHydrothermalVent && state.is(EndBlocks.HYDROTHERMAL_VENT)) {
|
||||
BlockEntityHydrothermalVent blockEntity = (BlockEntityHydrothermalVent) uncastedEntity;
|
||||
if (level.isClientSide()) {
|
||||
|
@ -44,10 +46,12 @@ public class BlockEntityHydrothermalVent extends BlockEntity {
|
|||
}
|
||||
}
|
||||
|
||||
private static void clientTick(Level level,
|
||||
BlockPos worldPosition,
|
||||
BlockState state,
|
||||
BlockEntityHydrothermalVent blockEntity) {
|
||||
private static void clientTick(
|
||||
Level level,
|
||||
BlockPos worldPosition,
|
||||
BlockState state,
|
||||
BlockEntityHydrothermalVent blockEntity
|
||||
) {
|
||||
boolean active = state.getValue(HydrothermalVentBlock.ACTIVATED);
|
||||
if (active && level.random.nextInt(20) == 0 && state.getValue(HydrothermalVentBlock.WATERLOGGED)) {
|
||||
double x = worldPosition.getX() + level.random.nextDouble();
|
||||
|
@ -57,10 +61,12 @@ public class BlockEntityHydrothermalVent extends BlockEntity {
|
|||
}
|
||||
}
|
||||
|
||||
private static void serverTick(Level level,
|
||||
BlockPos worldPosition,
|
||||
BlockState state,
|
||||
BlockEntityHydrothermalVent blockEntity) {
|
||||
private static void serverTick(
|
||||
Level level,
|
||||
BlockPos worldPosition,
|
||||
BlockState state,
|
||||
BlockEntityHydrothermalVent blockEntity
|
||||
) {
|
||||
final MutableBlockPos POS = GlobalState.stateForThread().POS;
|
||||
boolean active = state.getValue(HydrothermalVentBlock.ACTIVATED);
|
||||
POS.set(worldPosition).move(Direction.UP);
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.blocks.entities;
|
||||
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.blocks.EndStoneSmelter;
|
||||
import org.betterx.betterend.client.gui.EndStoneSmelterScreenHandler;
|
||||
import org.betterx.betterend.recipe.builders.AlloyingRecipe;
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.NonNullList;
|
||||
|
@ -36,11 +42,6 @@ import com.google.common.collect.Lists;
|
|||
import com.google.common.collect.Maps;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.blocks.EndStoneSmelter;
|
||||
import org.betterx.betterend.client.gui.EndStoneSmelterScreenHandler;
|
||||
import org.betterx.betterend.recipe.builders.AlloyingRecipe;
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
@ -215,7 +216,7 @@ public class EndStoneSmelterBlockEntity extends BaseContainerBlockEntity impleme
|
|||
worldPosition.getX() + 0.5D,
|
||||
worldPosition.getY() + 0.5D,
|
||||
worldPosition.getZ() + 0.5D
|
||||
) <= 64.0D;
|
||||
) <= 64.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -233,10 +234,12 @@ public class EndStoneSmelterBlockEntity extends BaseContainerBlockEntity impleme
|
|||
return new EndStoneSmelterScreenHandler(syncId, playerInventory, this, propertyDelegate);
|
||||
}
|
||||
|
||||
public static void tick(Level tickLevel,
|
||||
BlockPos tickPos,
|
||||
BlockState tickState,
|
||||
EndStoneSmelterBlockEntity blockEntity) {
|
||||
public static void tick(
|
||||
Level tickLevel,
|
||||
BlockPos tickPos,
|
||||
BlockState tickState,
|
||||
EndStoneSmelterBlockEntity blockEntity
|
||||
) {
|
||||
if (tickLevel == null) return;
|
||||
|
||||
boolean initialBurning = blockEntity.isBurning();
|
||||
|
@ -275,7 +278,7 @@ public class EndStoneSmelterBlockEntity extends BaseContainerBlockEntity impleme
|
|||
blockEntity.inventory.set(
|
||||
2,
|
||||
remainFuel == null ? ItemStack.EMPTY : new ItemStack(remainFuel)
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
blockEntity.setChanged();
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.blocks.entities;
|
||||
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
import org.betterx.betterend.rituals.EternalRitual;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
import org.betterx.betterend.rituals.EternalRitual;
|
||||
|
||||
public class EternalPedestalEntity extends PedestalBlockEntity {
|
||||
private EternalRitual linkedRitual;
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.blocks.entities;
|
||||
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
import org.betterx.betterend.rituals.InfusionRitual;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
import org.betterx.betterend.rituals.InfusionRitual;
|
||||
|
||||
public class InfusionPedestalEntity extends PedestalBlockEntity {
|
||||
|
||||
private InfusionRitual linkedRitual;
|
||||
|
@ -56,10 +56,12 @@ public class InfusionPedestalEntity extends PedestalBlockEntity {
|
|||
}
|
||||
}
|
||||
|
||||
public static <T extends BlockEntity> void tickEnity(Level level,
|
||||
BlockPos blockPos,
|
||||
BlockState blockState,
|
||||
T uncastedEntity) {
|
||||
public static <T extends BlockEntity> void tickEnity(
|
||||
Level level,
|
||||
BlockPos blockPos,
|
||||
BlockState blockState,
|
||||
T uncastedEntity
|
||||
) {
|
||||
if (uncastedEntity instanceof InfusionPedestalEntity) {
|
||||
InfusionPedestalEntity blockEntity = (InfusionPedestalEntity) uncastedEntity;
|
||||
if (blockEntity.hasRitual()) {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks.entities;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
|
||||
|
@ -10,10 +14,6 @@ import net.minecraft.world.level.block.entity.BlockEntity;
|
|||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
public class PedestalBlockEntity extends BlockEntity implements Container {
|
||||
private ItemStack activeItem = ItemStack.EMPTY;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue