Jump to content

Shadow_tingBRO

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Shadow_tingBRO's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. tgg thank you so much!!! I am not experienced at all with entities so could you link a good and easy tutorial?? Note, im on 1.12.2 so that might be different?
  2. Ah I will do do that thanks Also Would if I made it an entity and then made it ignore the frustum check would that work?
  3. How do I split them up then?
  4. I have a block which loads from an obj file The obj is quite large and I want it to still render when the player isnt actually viewing the block (i.e, make the block render even if its not in the viewport, but is within the chunk render distance) How can I do this ty
  5. I have a PlaySoundEvent, how do I check if the event was caused by minecraft automatically playing sounds, or the player did /playsound, or etc..? (Forge 1.12.2) . I want to randomize the sounds depending on stuff, it works but if you do /playsound it does a random sound aswell and I dont want that
  6. Sorry this is the wrong forum, but the other ones link does not work Whenever I try to execute the command in single player It just sends me 'An unexpected error occured trying to execute that command' Here is the command code: public static void register(CommandDispatcher<CommandSource> d) { d.register(Commands.literal("import").requires(s->s.hasPermissionLevel(2)) .then(Commands.argument("modelFile", StringArgument.string()) .then(Commands.argument("xOrigin", IntegerArgumentType.integer()) .then(Commands.argument("yOrigin", IntegerArgumentType.integer()) .then(Commands.argument("zOrigin", IntegerArgumentType.integer()) .then(Commands.argument("blockID", ResourceLocationArgument.resourceLocation()) .suggests(blockSuggestions)//show the suggestions for all blocks .executes(context -> { String modelFile = context.getArgument("modelFile", String.class); int x = context.getArgument("xOrigin", int.class); int y = context.getArgument("yOrigin", int.class); int z = context.getArgument("zOrigin", int.class); Block block = ForgeRegistries.BLOCKS.getValue( context.getArgument("blockID", ResourceLocation.class)); //handle stuff return 0; }).then(Commands.argument("scale", IntegerArgumentType.integer())) .executes(context->{ String modelFile = context.getArgument("modelFile", String.class); int x = context.getArgument("xOrigin", int.class); int y = context.getArgument("yOrigin", int.class); int z = context.getArgument("zOrigin", int.class); int scale = context.getArgument("scale", int.class); Block block = ForgeRegistries.BLOCKS.getValue( context.getArgument("blockID", ResourceLocation.class)); //handle stuff, with scale argument return 0; }) )))))); } The command gets registered as I can use it in game and It shows suggestions and tells me I have the correct number of args but whenever I enter, it just says there was an error. I debugged and the code does not even execute the execute lambas so It cant be the code (it doesnt event enter the execute methods) What am I doing wrong? Registering in main: public ...() { instance=this; IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus(); eventBus.addListener(this::setup); MinecraftForge.EVENT_BUS.register(this); } @SubscribeEvent public void setup(FMLServerStartingEvent event) { ImportCommand.register(event.getCommandDispatcher()); System.out.println("\n\n\nLoaded the Import command\n\n\n"); }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.