Comments (5)
You need to set the block handler of the signs when they are placed by scaffolding. This project is currently stale so I will not be adding any features to make this task easier.
from scaffolding.
// Registering the SignHandler
MinecraftServer.getBlockManager().registerHandler(NamespaceID.from("minecraft:sign"), SignHandler::new);
// SignHandler Class
public final class SignHandler implements BlockHandler {
@Override
public @NotNull NamespaceID getNamespaceId() {
return NamespaceID.from("minecraft", "sign");
}
public Collection<Tag<?>> getBlockEntityTags() {
return Arrays.asList(
Tag.Byte("GlowingText"),
Tag.String("Color"),
Tag.String("Text1"),
Tag.String("Text2"),
Tag.String("Text3"),
Tag.String("Text4"));
}
}
What do you mean with when they are placed by scaffolding
?
I have registered the SignHandler already.
from scaffolding.
You need to set the block handler when the block is placed. Just registering it does not apply it to the sign.
from scaffolding.
Block block =
Block.OAK_SIGN
.withTag(
Tag.String("Text1"),
GsonComponentSerializer.gson().serialize(Component.text("Line 1")))
.withHandler(new SignHandler());
// Option 1
AbsoluteBlockBatch absoluteBlockBatch = new AbsoluteBlockBatch();
absoluteBlockBatch.setBlock(world.getSpawnPos(), block);
absoluteBlockBatch.apply(instance, () -> {});
// Option 2
instance.setBlock(world.getSpawnPos(), block);
But this works for example. Just the Schematic Class does not seem to load it correctly. Have you tested it in the past with Signs?
from scaffolding.
I can't find a way of how to assign Handler after they are placed by the BlockBatch you apply with the Schematics. There maybe need to be a PreSetter Parameter to change the Block before it gets applied to the BlockBatch
from scaffolding.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scaffolding.