Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

DJ1TJOO

Members
  • Posts

    85
  • Joined

  • Last visited

Recent Profile Visitors

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

DJ1TJOO's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. Yeah I saw it just now. I don't use twitter very often and did not see that you could sroll up
  2. https://wiki.vg/Authentication
  3. Okay then I will do it like Twitch, but I have a question. Why did mojang make an api for loggingin for every one to use and make a documentation about it if noone is gona use it?
  4. Why not Badlion client and others do it to
  5. I've made my custom own launcher. It runs vanilla minecraft fine, but when I want to use forge it goes looking for the forge jars not in the libraries folder. Forge will go exactly 3 folders up. That's the amount forge normally needs if it is in your .minecraft/versions/1.14.4-forge-28.2.0 folder to search for the libraries folder. The problem is is that my libraries folder only 1 up is and not 3. Also forge goes specifficly looking for the net/minecraftforge/forge/1.14.4-28.2.0/forge-1.14.4-28.2.0-universal.jar and does not just search for the forge-1.14.4-28.2.0-universal.jar in the libraries folder. My question is is it posibble to specify the libraries folder in any way when I'm gonna run forge?
  6. I have this error multiple times for the floor_frame and the wall_frame blockstate, but for all the errors the model exists. This is an ex-sample from the console: [m[33m[17:10:05] [Server-Worker-14/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'fantasy20:blockstates/floor_frame.json' missing model for variant: 'fantasy20:floor_frame#connected_east=true,connected_north=true,connected_south=false,connected_west=true,frame_type=3' GitHub: https://github.com/DJ1TJOO/fantasy20/
  7. I have an item with the onItemRightClick. Then I check some stuff and then decide if I need to shrink the itemstack this is most of the time not working. Also now that I only execute it one's on the server side Here is the code if you want to see more: https://github.com/DJ1TJOO/fantasy20/ @Override public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn) { // System.err.println("A"); if(worldIn.isRemote) { return new ActionResult<>(ActionResultType.PASS, playerIn.getHeldItem(handIn)); } if(playerIn.getHeldItem(handIn).getItem() instanceof Blueprint) { //System.err.println("a"); if(!playerIn.getHeldItem(handIn).hasTag()) { return super.onItemRightClick(worldIn, playerIn, handIn); } CompoundNBT tag = playerIn.getHeldItem(handIn).getTag(); if(!tag.contains("data")) { return super.onItemRightClick(worldIn, playerIn, handIn); } if(!tag.getCompound("data").contains("item")) { return super.onItemRightClick(worldIn, playerIn, handIn); } String itemString = tag.getCompound("data").getString("item"); //System.err.println("b"); playerIn.getCapability(CapabilityResearchProvider.RESEARCH_CAPABILITY, null).ifPresent(r -> { // System.err.println("c"); Item item = ForgeRegistries.ITEMS.getValue(ResourceLocation.create(itemString, ':')); // System.err.println("d"); if(!r.getResearched().contains(item)) { r.getResearched().add(item); playerIn.sendMessage(new StringTextComponent("Je hebt het item " + item.getDefaultInstance().getDisplayName().getFormattedText() + " geresearched!")); playerIn.getHeldItem(handIn).shrink(1); // System.err.println(playerIn.serializeNBT().toString()); //System.err.println(r.getResearched().toString()); } }); } return new ActionResult<>(ActionResultType.PASS, playerIn.getHeldItem(handIn)); }
  8. I've this code now and I get the error that the field field_70465_c does not exist try { Class<? extends CraftingInventory> invClass = inv.getClass(); Field field = invClass.getField("field_70465_c"); Container container = (Container) field.get(inv); Class<? extends Container> containerClass = container.getClass(); Field field2 = containerClass.getField("listeners"); @SuppressWarnings("unchecked") List<IContainerListener> listeners = (List<IContainerListener>) field2.get(inv); for (IContainerListener iContainerListener : listeners) { if(iContainerListener instanceof ServerPlayerEntity) { ServerPlayerEntity p = (ServerPlayerEntity) iContainerListener; if(!p.getCapability(CapabilityResearchProvider.RESEARCH_CAPABILITY, p.getHorizontalFacing()).map(r -> { if(!r.getResearched().contains(getCraftingResult(inv).getItem())) { return false; } return true; }).orElse(Boolean.FALSE)) { return false; } } } } catch (Exception e) { e.printStackTrace(); }
  9. How would I do it else then I've just searched reflection on the internet it's new for me
  10. @SuppressWarnings("rawtypes") Class invClass = inv.getClass(); try { Field field = invClass.getField("field_70465_c"); Container container = (Container) field.get(this); @SuppressWarnings("rawtypes") Class containerClass = container.getClass(); @SuppressWarnings("unchecked") List<IContainerListener> listeners = (List<IContainerListener>) containerClass.getField("listeners").get(this); for (IContainerListener iContainerListener : listeners) { iContainerListener. } } catch (Exception e) { e.printStackTrace(); } I have this now but I don't see how I can get the player from IContainerListener. Edit: Oh I can cast it to a serverplayer Changed this -> inv
  11. It works now but how would I get the player in my IRecipe because the CraftingInventory doesn't hold the owner of the inv. And its all server side so I can't use the Minecraft.getInstance()
  12. I tried to make it but I think I need to register it somewhere. I've updated the github and the doorlock recipe has my type (for now just the copied normal shapedrecipe) as recipe. The error I'm getting when joining a world is: com.google.gson.JsonSyntaxException: Invalid or unsupported recipe type 'fantasy20:shaped_researched_recipe'
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.