Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package.com.raphydaphy.silktest;
  2.  
  3. import io.github.prospector.silk.fluid.FluidInstance;
  4. import net.fabricmc.api.ModInitializer;
  5. import net.fabricmc.fabric.api.registry.CommandRegistry;
  6. import net.minecraft.fluid.Fluids;
  7. import net.minecraft.server.command.ServerCommandManager;
  8. import net.minecraft.text.StringTextComponent;
  9.  
  10. public class SilkTest implements ModInitializer
  11. {
  12.  
  13. @Override
  14. public void onInitialize()
  15. {
  16. CommandRegistry.INSTANCE.register(false, dispatcher -> dispatcher.register(ServerCommandManager.literal("silk-test").executes(command ->
  17. {
  18. FluidInstance i = new FluidInstance(Fluids.EMPTY);
  19. command.getSource().sendFeedback(new StringTextComponent("It worked!"), false);
  20. return 1;
  21. })));
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement