mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-16 11:33:43 +01:00
Format codes
This commit is contained in:
parent
2baa3f9922
commit
25daf28205
1 changed files with 18 additions and 18 deletions
|
@ -24,7 +24,8 @@ public class SchematicProcessor extends StructureProcessor {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public Template.BlockInfo process(IWorldReader world, BlockPos pos, Template.BlockInfo rawInfo, Template.BlockInfo info, PlacementSettings settings, @Nullable Template template) {
|
||||
public Template.BlockInfo process(IWorldReader world, BlockPos pos, Template.BlockInfo rawInfo,
|
||||
Template.BlockInfo info, PlacementSettings settings, @Nullable Template template) {
|
||||
if (info.nbt != null) {
|
||||
TileEntity te = info.state.createTileEntity(world);
|
||||
if (te != null) {
|
||||
|
@ -38,9 +39,9 @@ public class SchematicProcessor extends StructureProcessor {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public Template.EntityInfo processEntity(IWorldReader world, BlockPos pos, Template.EntityInfo rawInfo, Template.EntityInfo info, PlacementSettings settings, Template template) {
|
||||
return EntityType.readEntityType(info.nbt)
|
||||
.flatMap(type -> {
|
||||
public Template.EntityInfo processEntity(IWorldReader world, BlockPos pos, Template.EntityInfo rawInfo,
|
||||
Template.EntityInfo info, PlacementSettings settings, Template template) {
|
||||
return EntityType.readEntityType(info.nbt).flatMap(type -> {
|
||||
if (world instanceof World) {
|
||||
Entity e = type.create((World) world);
|
||||
if (e != null && !e.ignoreItemEntityData()) {
|
||||
|
@ -48,8 +49,7 @@ public class SchematicProcessor extends StructureProcessor {
|
|||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
})
|
||||
.orElse(null);
|
||||
}).orElse(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue