Jump to content

kirinnee97

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by kirinnee97

  1. @jabelar Hi, thank you for your information. I do understand that limiting it to 20 ticks is to prevent lag from occuring if the game tick cannot be completed, however, I am intending to train minecraft mobs using a neural net, without speeding up the ticks, the training will take too long, do you have any suggestions on how I can simulate this "training"?
  2. I am currently working on running fast simulations in minecraft, and I would need to run minecraft at a much faster rate than usual. How would I go about increasing the ticks per second ran from the main game loop? I'm not too fond of using reflection to modify the ticker within minecraft, but even then, the log still throws error, which eventually closes the server. Any help is appreciated
  3. How can I go about making the rendered screen grayscaled much like with the old super secret setting?
  4. Hi sorry for the late reply, and no-op implementation in Java essentially means a "dummy", or fake object. Its a dummy that implements an interface. Simply put, all you have to do is create a class that implements IRecipe, override its method properly, and create and object of that class. You then register that object with the minecraft vanilla object's registry name. Hope it helps.
  5. Hi, I'm sorry for the confusion, it seems I did not cast to IForgeRegistryModifiable. As you said, it works but throws exceptions, but replacing with no-op implementation doesn't, so i think i will go with diesieben's method! Thank you very much with your help this time again!
  6. I accessed the registries both using the RegistryEvent and ForgeRegistries and access the recipe registry (ForgeRegistries.RECIPES) and tried removing, but it throws a java.lang.UnsupportedOperationException: remove
  7. Cannot iterate registry IRecipe list and remove, how would i go about to remove a vanilla recipe in 1.12? Thank you in advance!
  8. Hi, I have no leads on this, but how would i replace the GUI (and container if there is one) opened of anvils?
  9. @Choonster Thank you very much. It seemed to have worked, except when I change an item's slot in creative, the capability seem to reset.
  10. Hi, not to be spoon fed or anything but for the first suggestion, when is the vanilla update packet called? I cannot seemed to find. Tracing getNBTShareTag seem to lead me to some packets, but i do not exactly understand under what condition the packet is send to client side. Do i have to manually check and send packets?
  11. Hello, I am currently having problems for syncing ItemStack capabilities to the client side for tools and other items. Current my method of syncing is by override the onUpdate method of its Item Class and sending the NBT (of the capability) and the slot of the player. My slot checking code is as follows: public static int getSlot(EntityPlayer ep, ItemStack is){ int i = ep.openContainer.inventorySlots.size(); for(int ii=0; ii<i; ii++){ if(ep.openContainer.getSlot(ii).getHasStack()){ ItemStack item = ep.openContainer.getSlot(ii).getStack(); if (ItemStack.areItemStackTagsEqual(item, is)){ return ii; } } } return -1; } The client packet handler then receives these and obtains the itemstack via the same method, and calls the load() method and inputs the packet's nbt as the parameter. This method has gave me various problems. 1) In creative mode, this completely breaks down. 2) Every time an item seems to change in capability value, the re-equip animation is called, breaking any EnumAction I am calling. 3) When it re-equips, the client seems to load the old data (or the data from the capability attach event) for a brief moment, making the tool-tips glitch. I am not sure what caused these problems
  12. remove DrZhark's CustomSpawner or contact the mod author.
  13. Sorry, but i just did a test @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){ if(worldIn.isRemote){ Minecraft.getMinecraft().displayGuiScreen(new HUDEditorGUI(playerIn)); } return true; } Works fine in single player, but as you predicted, fails in dedi servs, so since he is using for SP, it assume it should work fine?
  14. Then using (player.world.isRemote) instead of (!player.world.isRemote) for your check would work. Oops looks like i was mistaken. So by registering the open gui statement under clientproxy that overrides commonproxy, then call the common proxy would work?
  15. You used (!player.world.isRemote) instead of (player.world.isRemote). If you want it to work on dedicated server, replace the openGUI statement with one that sends a packet to client side. Then on the client packet handler, open the gui.
  16. Hi, GUI is strictly client-sided. In your GUIMathsBlock.java your block activation method should check whether the its on the client side. if (player.world.isRemote){ Minecraft.getMinecraft().displayGuiScreen(new GuiAdditionBlock()); } Should fix it. world.isRemote refers to client side. If its false, its server side.
  17. Have you tried using if (ItemStack.areItemStackTagsEqual(itemStackList,recipe.input) { if (recipe != null) { System.out.println("processing"); } } and you should put a null check, ie if (recipe !=null){... before the itemstack comparison, if there is a chance that recipe can be null
  18. I would like to know what is the best to about to sync the NBT or the Capability to the client
  19. You cannot put invalid arguments while using @Subscribe events, like EntityPlayer player, World world (your world class is not even imported correctly?). The only accepted input is the event. The correct way of using an event (getting event fields) is like this: @SubscribeEvent public void HeldItem(PlayerInteractEvent event) { EntityPlayer player = event.getEntityPlayer(); World world = player.getEntityWorld(); } which there after you can refer to the player and world of the event.
  20. Sorry but what is it exactly not shading correctly?
×
×
  • Create New...

Important Information

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