Chisels & Bits - For Fabric

Chisels & Bits - For Fabric

2M Downloads

Functional Properties for Chiseled Blocks

MalkContent opened this issue · 13 comments

commented

i.e. the ability to climb them like ladders, sit on them, sleep on them

i don't know how that's balance wise, but it would be neat to be able to use some of the things one creates like this :)

commented

This is more or less already on my todo list, but things are pretty slow going lately.

commented

:)

commented

ohhh this is a cool idea. mostly because we actually have good looking customisable stuff in minecraft.

commented

I was thinking a bit about this, and it seems nigh impossible to detect the function from just looking at the block. Instead by having a separate tool to force a specific feature to be enabled (or toggle), then it's "just" a matter of supporting that functionality in the TileEntity.

TL;DR Some stuff is doable, but it may not be obvious to the normal player what those are. E.g. minecarts seem very complex, but chest not so much.

Whops, sorry about the wall of text, hope it helps though.

Things that seems doable:

Storage

Should probably consume a chest

  • Ender chest, if it's not to hard to hook into that special inventory
  • Fluid storage, using the Forge fluid API:s

Climbable surfaces, aka ladders.

The only catch I can think of would be surface detection. But by forcing/asking the player to choice a side this can be simplified to finding the bit with the highest/lowest X/Y/Z coordinate and use that as the climbable surface.

Sitting inside á la a minecart

As long as you don't care about the bits and thus allow clipping. That is, just place the players character right dead in the middle. Positioning the sitting point using some sort of surface-fitting seems hard.

Redstone

Levers and buttons, since they have relatively simple semantics. Redstone signal, like a redstone block and maybe even a way to emit a specific signal level? This should also include conducting (solid block) or isolating (transparent block) toggle, which allows all sort of neat contraptions. It should also be noted that transparent blocks don't cut off redstone wire.

Things that seems hard:

Animation

Any sorts of animation requires a whole set of states and transitions between them. This either means you need to build every frame by hand and then somehow string them together, which seems excessively tedious, or some sort of smooth interpolation between the start and end state.

A completely different approach would be to support hinges/sliders and animate a polygon (a set of bits) along an axis. This would support doors and drawers. While this seems pretty cool, I can just imagine the amount of work to make this happen. Man, talk about hard.

Furnace/hoppars

Since it needs state and tick updates. But it's probably doable, but not very DRY.

Minecart tracks

Because the geometry have to match any direction changes, e.g. curved/sloped tracks. The only way I can think of would be to explicitly ask the player input/output. There are a total of 8 inputs/outputs (4 at bottom level + 4 at top level of the block), so it's not overwhelming, but how should you choose? Maybe place a normal minecart track and replace it somehow?

Pistons

Because they are [[Fun]]. Seriously though, not only do you need some sort of animation/state transition (could cheat and just jump-cut between). But you also need to move slime blocks, exhibit BUD behaviour (maybe this can be avoided), and probably a bunch more I have forgotten.

Mission Impossible

To support arbitrary embedded TileEnities, which may be possible if the multi-part API/engine have solved this already. Otherwise it's just insane.

commented

I was just thinking about this a couple of days ago and how making custom chests, beds and such would be such a cool feature. Pistons and doors would be a bit hard to implement, though.

Couple of thoughts on implementing it. Have new types of ItemPositivePrint: one for chests, one for furnaces, one for hoppers, etcetera. These can grab patterns as usual, but hoppers and furnaces require multiple patterns to be grabbed (Furnace requires off and on states; hopper requires side-pointing and down-pointing states). Patterns can also be cleared so that if they mess up, they don't have to craft a new one.

To get a placable block, the pattern must be crafted with their respective block (Chest, Hopper, etc.), and they must have enough bits in their inventory for the pattern.

When the block is placed, it is not editable, just like other TileEntities.

You might get away with just extending the TileEntity classes for them with the custom rendering you do for your BlockChiseled, along with any extra metadata you need. I also think you could skip out on animating chests opening and closing for now; animations are a whole other ball of wax.

commented

I'm not sure just how many of these make sense to implement, honestly if using @SamJBarney 's implementation it makes more sense to do this entire concept as a second mod. its not hard to use C&B renders outside of C&B, I know of at least one mod that can already do it.

I was personally thinking of doors and hatches being the primary use case for this, ladders arn't bad either, they are simple, I would really rather not have code related to mechanics like furnaces in C&B, that would potentially cause issues with people that want to replace furnaces with something else. For instance if TFC 2 comes out I'd like C&B to be as compatible as possible.

Keeping the mod scope more manageable is also a goal, since I have limits on how much time I have to devote to adding, and supporting the features already included.

commented

A second mod would make a lot of sense, I agree. I actually came here to look at the API to do just that, and then I found this.

commented

Which mod is using C&B renders? I would like to know for reference.

commented

If your interested in giving it a shot by all means, if you need something the API doesn't provide it can probably be added.

If memory serves, Graves I don't know if it has any C&B specific code, or how its support works ( or if its still there )

You can get access to the models via the ItemStacks and the normal MC Model methods, so the same way you would render an item in the world, just get the itemstack model, and render the model for the block.

commented

ill probably give it a go in a couple of months when I have time.

commented

Will say about missing Craftbench, it also should be in "doable" section, right?

commented

I have an idea that the player uses C & B to make a model and then copy it with some given function of the paper. And then use this copy paper and the desired functional items on the workbench, such as the use of copy paper and furnace synthesis, when I put down the model with copy paper, he is a furnace, and call the furnace GUI.

All minecfaft functional items can be made, so that we have a variety of doors! All kinds of boxes! All kinds of torches and even lanterns, there are a variety of enchanting bookshelves! O (∩ _ ∩) O

commented

Idea for the animation the easiest way (for the player) would be a special configurator that allow you to create state and condition, exemple you right clic your block then select create state 2, which will require the same amount of bit the block used, you then modify it and choose a condition (time or redstone level i guess),