mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-24 14:06:42 +01:00
No pushing
- Fixed Schematicannon asking for "Air" items - Made several blocks immovable by piston
This commit is contained in:
parent
44dc7e054b
commit
7f0ba8211d
9 changed files with 51 additions and 23 deletions
|
@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
|
|||
apply plugin: 'eclipse'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
version = 'mc1.14.4_v0.1.1a'
|
||||
version = 'mc1.14.4_v0.1.1b'
|
||||
group = 'com.simibubi.create'
|
||||
archivesBaseName = 'create'
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public class Create {
|
|||
|
||||
public static final String ID = "create";
|
||||
public static final String NAME = "Create";
|
||||
public static final String VERSION = "0.1.1a";
|
||||
public static final String VERSION = "0.1.1b";
|
||||
|
||||
public static Logger logger = LogManager.getLogger();
|
||||
public static ItemGroup creativeTab = new CreateItemGroup();
|
||||
|
|
|
@ -17,6 +17,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.HorizontalBlock;
|
||||
import net.minecraft.block.material.PushReaction;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.ItemEntity;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
|
@ -149,4 +150,9 @@ public class BeltFunnelBlock extends HorizontalBlock implements IBeltAttachment,
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PushReaction getPushReaction(BlockState state) {
|
||||
return PushReaction.BLOCK;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.HorizontalBlock;
|
||||
import net.minecraft.block.material.PushReaction;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.state.BooleanProperty;
|
||||
|
@ -176,4 +177,9 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
|
|||
return state.get(HORIZONTAL_FACING).getOpposite();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PushReaction getPushReaction(BlockState state) {
|
||||
return PushReaction.BLOCK;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,6 +35,8 @@ public interface IInventoryManipulator {
|
|||
if (!invState.hasTileEntity())
|
||||
return false;
|
||||
TileEntity invTE = world.getTileEntity(invPos);
|
||||
if (invTE == null)
|
||||
return false;
|
||||
|
||||
LazyOptional<IItemHandler> inventory = invTE.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY);
|
||||
setInventory(inventory);
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.simibubi.create.foundation.utility.VecHelper;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.material.PushReaction;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.state.BooleanProperty;
|
||||
|
@ -238,4 +239,9 @@ public class RedstoneBridgeBlock extends ProperDirectionalBlock implements IBloc
|
|||
return state.get(FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PushReaction getPushReaction(BlockState state) {
|
||||
return PushReaction.BLOCK;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.HorizontalBlock;
|
||||
import net.minecraft.block.material.PushReaction;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.state.IntegerProperty;
|
||||
|
@ -137,4 +138,9 @@ public class StockswitchBlock extends HorizontalBlock {
|
|||
return new StockswitchTileEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PushReaction getPushReaction(BlockState state) {
|
||||
return PushReaction.BLOCK;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import net.minecraft.entity.player.PlayerInventory;
|
|||
import net.minecraft.inventory.container.Container;
|
||||
import net.minecraft.inventory.container.INamedContainerProvider;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
@ -454,15 +455,15 @@ public class SchematicannonTileEntity extends SyncedTileEntity implements ITicka
|
|||
}
|
||||
|
||||
BlockState blockState = blockReader.getBlockState(target);
|
||||
if (!shouldPlace(target, blockState)) {
|
||||
ItemStack requiredItem = getItemForBlock(blockState);
|
||||
|
||||
if (!shouldPlace(target, blockState) || requiredItem.isEmpty()) {
|
||||
statusMsg = "searching";
|
||||
blockSkipped = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Find Item
|
||||
ItemStack requiredItem = getItemForBlock(blockState);
|
||||
|
||||
// Find item
|
||||
if (blockState.has(BlockStateProperties.SLAB_TYPE)
|
||||
&& blockState.get(BlockStateProperties.SLAB_TYPE) == SlabType.DOUBLE)
|
||||
requiredItem.setCount(2);
|
||||
|
@ -547,7 +548,8 @@ public class SchematicannonTileEntity extends SyncedTileEntity implements ITicka
|
|||
}
|
||||
|
||||
protected ItemStack getItemForBlock(BlockState blockState) {
|
||||
return new ItemStack(BlockItem.BLOCK_TO_ITEM.getOrDefault(blockState.getBlock(), Items.AIR));
|
||||
Item item = BlockItem.BLOCK_TO_ITEM.getOrDefault(blockState.getBlock(), Items.AIR);
|
||||
return item == Items.AIR ? ItemStack.EMPTY : new ItemStack(item);
|
||||
}
|
||||
|
||||
protected boolean findItemInAttachedInventories(ItemStack requiredItem) {
|
||||
|
|
|
@ -4,7 +4,7 @@ loaderVersion="[28,)"
|
|||
|
||||
[[mods]]
|
||||
modId="create"
|
||||
version="0.1.1a"
|
||||
version="0.1.1b"
|
||||
displayName="Create"
|
||||
#updateJSONURL=""
|
||||
authors="simibubi"
|
||||
|
|
Loading…
Reference in a new issue