Skip to content

Creating a minecart computer. #1221

Answered by SquidDev
vexxmage asked this question in Q&A
Discussion options

You must be logged in to vote

I should probably start off with a "here be dragons". The public API doesn't support creating new types of computer, and so anything you do will involve poking the mods internals (which, of course, doesn't come with any stability guarantees).

The best thing to do is probably start by reading through the computer BlockEntity code (https://github.com/cc-tweaked/CC-Tweaked/blob/8d2e150f05b49eb96fb37d40746accad503db077/projects/common/src/main/java/dan200/computercraft/shared/computer/blocks/AbstractComputerBlockEntity.java). The general gist is:

  • Obtain a ServerComputer (see createServerComputer): This is the object responsible for managing the underlying computer, as well as syncing its sta…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vexxmage
Comment options

Answer selected by vexxmage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants