Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Sabotember

  • Rank
    Tree Puncher
  1. Now the problem has been solved. Thank you. I mistook (!world.isClientSide) in the vanilla MinecartItem class for (world.isClientSide).
  2. I am trying to make a custom minecart whose model is just the same as vanilla minecart. Here is MyMinecartEntity class: public class MyMinecartEntity extends AbstractMinecartEntity { public MyMinecartEntity(EntityType<?> entityType, World world) { super(entityType, world); } public MyMinecartEntity(World world, double xin, double yin, double zin) { super(RegisterEntities.Entities.MY_MINECART.get(), world, xin, yin, zin); } @Override @Nonnull public IPacket<?> getAddEntityPacket() { return NetworkHooks.getEntitySpawningP
  3. Well, I am not going to distribute my mod. I understand that I should not expose my mod without obtaining permission of the creator of ModA.
  4. I got it working by overriding getCapability() of the tile entity. Thank you all for your help!
  5. Okay, I fixed getCapability(). I think so, because it extends LockableTileEntity.
  6. I am afraid that I do not understand to enable my capability. Now my capability is like: public class MyCapability implements IItemHandler { private final TileEntityA tile; public MyCapability(TileEntityA tile) { super(); this.tile = tile; } public MyCapability() { super(); this.tile = new TileEntityA(); } @Override @Nonnull public ItemStack extractItem(int slot, int amount, boolean simulate) { /* implementation */ } /* getSlotLimit, getSlots, getStackInSlot, insertItem, isItemValid */ publi
  7. Thank you for your replies. I am now trying to override TileA and BlockA with TileB and BlockB and it seems to be partially successful. I confirmed with PlayerInteractEvent.RightClickBlock that TileB and BlockB replace TileA and BlockA. However, I mean by "partially" that the methods "canExtractItem" and "canInsertItem" are never called though TileB implements ISidedInventory and there are two Hoppers on and below a BlockB in the world. I guess that somehow some data of TileA remain in the world which prevents HopperTileEntity from judging TileB to be an ISidedInventory...
  8. I tried this way, but probably because BlockA returns TileA in its createTileEntity() method, a "missing a mapping" error occurs in loading the world. Do I need "BlockB" class which extends BlockA in addition to TileB? Well, I just find out that I did not implement IItemHandler in MyCapability. I will try this way again.
  9. I am trying to attach my capability to TileEntityA by another mod so that hoppers extract items from only a certain slot of TileEntityA. Without capability they extract items from any slot.
  10. Thank you for your reply. I am now trying to attach my capability to TileEntityA, but no other methods than attachMyCapability(), MyCapabilityProvider.serializeNBT(), MyCapabilityProvider.deserializeNBT() were called. Here is the main point of my capability: @Mod.EventBusSubscriber(modid = ModB.MODID, bus = Mod.EventBusSubscriber.Bus.FORGE) public class MyCapability implements ISidedInventory { private static final ResourceLocation CAP_ID = new ResourceLocation(ModB.MODID, "capB"); public static final Callable<MyCapability> FACTORY = new Factory(); public static final C
  11. I am trying to replace TileEntityA by another mod with TileEntityB, for I would like to make hoppers extract items from a certain slot of the tile entities. TileEntityA is registered as "moda:tileentitya" and TileEntityB is registered as "modb:tileentityb," like: @SubscribeEvent public static void registerTileEntities(final RegistryEvent.Register<TileEntityType<?>> event) { TileEntityType<TileEntityB> TILEENTITY_B = TileEntityType.Builder.create(TileEntityB::new, BLOCK_A); TILEENTITY_B.setRegistryName(new ResourceLocation(ModB.MODID, "tileentityb"); event.getRegis
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.