Reorganize
This commit is contained in:
parent
36019c3116
commit
9de6875866
|
@ -4,7 +4,7 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.client.render.model.BakedModel;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartView;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
|
|
@ -11,11 +11,10 @@ import net.minecraft.util.shape.VoxelShapes;
|
|||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.ExtendedBlockView;
|
||||
import net.minecraft.world.World;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.client.util.RenderStateProvider;
|
||||
import net.shadowfacts.simplemultipart.util.MultipartHelper;
|
||||
import net.shadowfacts.simplemultipart.util.MultipartHitResult;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartView;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
|
|
@ -19,12 +19,11 @@ import net.minecraft.util.shape.VoxelShape;
|
|||
import net.minecraft.world.loot.context.LootContext;
|
||||
import net.minecraft.world.loot.context.Parameters;
|
||||
import net.shadowfacts.simplemultipart.SimpleMultipart;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartState;
|
||||
import net.shadowfacts.simplemultipart.multipart.entity.MultipartEntity;
|
||||
import net.shadowfacts.simplemultipart.multipart.entity.MultipartEntityProvider;
|
||||
import net.shadowfacts.simplemultipart.util.MultipartHelper;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.util.ShapeUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
@ -196,8 +195,8 @@ public abstract class AbstractContainerBlockEntity extends BlockEntity implement
|
|||
|
||||
public static class Entry implements MultipartView {
|
||||
public final MultipartContainer container;
|
||||
public final MultipartState state;
|
||||
public final MultipartEntity entity;
|
||||
public MultipartState state;
|
||||
public MultipartEntity entity;
|
||||
|
||||
private Entry(MultipartContainer container, MultipartState state, MultipartEntity entity) {
|
||||
this.container = container;
|
||||
|
@ -215,10 +214,25 @@ public abstract class AbstractContainerBlockEntity extends BlockEntity implement
|
|||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setState(MultipartState state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultipartEntity getEntity() {
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEntity(MultipartEntity entity) {
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Entry{" + state + "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package net.shadowfacts.simplemultipart.container;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartView;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.util.Hand;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.World;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.util.MultipartHitResult;
|
||||
import net.shadowfacts.simplemultipart.SimpleMultipart;
|
||||
import net.shadowfacts.simplemultipart.util.MultipartHelper;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package net.shadowfacts.simplemultipart.api;
|
||||
package net.shadowfacts.simplemultipart.container;
|
||||
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartState;
|
||||
|
||||
import java.util.Set;
|
|
@ -5,7 +5,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.shadowfacts.simplemultipart.SimpleMultipart;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.container.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.multipart.Multipart;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartState;
|
||||
import net.shadowfacts.simplemultipart.util.MultipartPlacementContext;
|
||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraft.world.loot.LootTables;
|
|||
import net.minecraft.world.loot.context.LootContext;
|
||||
import net.shadowfacts.simplemultipart.SimpleMultipart;
|
||||
import net.shadowfacts.simplemultipart.util.MultipartPlacementContext;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.state.property.Property;
|
|||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.loot.context.LootContext;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package net.shadowfacts.simplemultipart.api;
|
||||
package net.shadowfacts.simplemultipart.multipart;
|
||||
|
||||
import net.shadowfacts.simplemultipart.container.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.multipart.Multipart;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartState;
|
||||
import net.shadowfacts.simplemultipart.multipart.entity.MultipartEntity;
|
||||
|
@ -14,8 +15,12 @@ public interface MultipartView {
|
|||
|
||||
MultipartState getState();
|
||||
|
||||
void setState(MultipartState state);
|
||||
|
||||
MultipartEntity getEntity();
|
||||
|
||||
void setEntity(MultipartEntity entity);
|
||||
|
||||
default Multipart getMultipart() {
|
||||
return getState().getMultipart();
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package net.shadowfacts.simplemultipart.multipart.entity;
|
||||
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.container.MultipartContainer;
|
||||
|
||||
/**
|
||||
* @author shadowfacts
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package net.shadowfacts.simplemultipart.multipart.entity;
|
||||
|
||||
import net.shadowfacts.simplemultipart.api.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.container.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartState;
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraft.util.math.Vec3d;
|
|||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.World;
|
||||
import net.shadowfacts.simplemultipart.SimpleMultipart;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.container.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.multipart.Multipart;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartState;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.util.HitResult;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartView;
|
||||
|
||||
/**
|
||||
* @author shadowfacts
|
||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.container.MultipartContainer;
|
||||
|
||||
/**
|
||||
* @author shadowfacts
|
||||
|
|
|
@ -6,13 +6,13 @@ import net.minecraft.util.Hand;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.container.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.container.AbstractContainerBlockEntity;
|
||||
import net.shadowfacts.simplemultipart.multipart.Multipart;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartState;
|
||||
import net.shadowfacts.simplemultipart.multipart.entity.MultipartEntity;
|
||||
import net.shadowfacts.simplemultipart.multipart.entity.MultipartEntityProvider;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartView;
|
||||
|
||||
/**
|
||||
* @author shadowfacts
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.util.shape.VoxelShapes;
|
|||
import net.shadowfacts.simplemultipart.multipart.Multipart;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartState;
|
||||
import net.shadowfacts.simplemultipart.util.MultipartPlacementContext;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartView;
|
||||
|
||||
/**
|
||||
* @author shadowfacts
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.util.shape.VoxelShapes;
|
|||
import net.shadowfacts.simplemultipart.multipart.Multipart;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartState;
|
||||
import net.shadowfacts.simplemultipart.util.MultipartPlacementContext;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartView;
|
||||
|
||||
/**
|
||||
* @author shadowfacts
|
||||
|
|
|
@ -6,8 +6,8 @@ import net.minecraft.util.Hand;
|
|||
import net.minecraft.util.Tickable;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.api.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.container.MultipartContainer;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartView;
|
||||
import net.shadowfacts.simplemultipart.multipart.Multipart;
|
||||
import net.shadowfacts.simplemultipart.multipart.MultipartState;
|
||||
import net.shadowfacts.simplemultipart.multipart.entity.MultipartEntity;
|
||||
|
|
Loading…
Reference in New Issue