mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Remove all raw usages of BSH, improve API generics
This commit is contained in:
committed by
IronApollo
parent
1d87642b52
commit
590b7e23a9
@ -175,8 +175,12 @@ public class ForgePlayer extends AbstractPlayerActor {
|
||||
|
||||
@Override
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
public void sendFakeBlock(BlockVector3 pos, BlockStateHolder block) {
|
||||
=======
|
||||
public <B extends BlockStateHolder<B>> void sendFakeBlock(BlockVector3 pos, B block) {
|
||||
>>>>>>> 3fefcbf9... Remove all raw usages of BSH, improve API generics
|
||||
BlockPos loc = ForgeAdapter.toBlockPos(pos);
|
||||
if (block == null) {
|
||||
// TODO
|
||||
|
@ -171,7 +171,7 @@ public class ForgeWorld extends AbstractWorld {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBlock(BlockVector3 position, BlockStateHolder block, boolean notifyAndLight) throws WorldEditException {
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block, boolean notifyAndLight) throws WorldEditException {
|
||||
checkNotNull(position);
|
||||
checkNotNull(block);
|
||||
|
||||
@ -186,7 +186,6 @@ public class ForgeWorld extends AbstractWorld {
|
||||
IBlockState old = chunk.getBlockState(pos);
|
||||
Block mcBlock = Block.getBlockFromName(block.getBlockType().getId());
|
||||
IBlockState newState = mcBlock.getDefaultState();
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<Property<?>, Object> states = block.getStates();
|
||||
newState = applyProperties(mcBlock.getBlockState(), newState, states);
|
||||
IBlockState successState = chunk.setBlockState(pos, newState);
|
||||
|
Reference in New Issue
Block a user