
DJ1TJOO
Members-
Posts
85 -
Joined
-
Last visited
Everything posted by DJ1TJOO
-
Yeah I saw it just now. I don't use twitter very often and did not see that you could sroll up
-
https://wiki.vg/Authentication
-
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?
-
Why not Badlion client and others do it to
-
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?
-
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/
-
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)); }
-
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
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(); } -
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
Okay -
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
what do I need todo it to avoid raw types? -
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
How would I do it else then I've just searched reflection on the internet it's new for me -
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
@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 -
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
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() -
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
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' -
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
Al ready have an idea? -
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
Yes I called it researched because the way you do it is in the research table -
Then I'm gonna change it. Is there a good way todo it or just as the example is fine?
-
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
I have a capability on each player with the Items they have "learned" if the item is not in the capability list then the player cannot craft it -
Does it make my mod faster or does it any thing else better? Because I never know what I need to add and maby later I need a
-
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
I read the ItemExsistsCondition.class and it has a constructor with a variable and in the docs they say that the constructor must be empty so I don't understand what I need todo -
What do you mean? I did the registerAll
-
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
DJ1TJOO replied to DJ1TJOO's topic in Modder Support
The player has todo something first before they can craft the item. I tried making a custom condition, but I can't seem how todo that because what the docs says isn't working for me Github: https://github.com/DJ1TJOO/fantasy20/ -
How to cancel PlayerEvent.ItemCraftedEvent?
-
Its on the github: https://github.com/DJ1TJOO/fantasy20/tree/master/src/main/java/nl/fantasynetworkmc/fantasy20 but I think Someone else found the solution I need to make the functions static but I have no time to try it out It works Thanks!
-
Thanks the problem was the static I did not have and it as the wrong bus I changed it to try it out