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:
@ -178,7 +178,7 @@ public class ForgePlayer extends AbstractPlayerActor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendFakeBlock(BlockVector3 pos, BlockStateHolder block) {
|
||||
public <B extends BlockStateHolder<B>> void sendFakeBlock(BlockVector3 pos, B block) {
|
||||
BlockPos loc = ForgeAdapter.toBlockPos(pos);
|
||||
if (block == null) {
|
||||
// TODO
|
||||
|
@ -169,7 +169,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);
|
||||
|
||||
@ -184,7 +184,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