Jump to content

qouteall

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by qouteall

  1. I am happy to accept collaboration. I am planning to put the code to github after making my code more readable. And I think the main obstacle of being compatible with optifine is that rendering portal content needs culling. The actual rendering process is different from what sp164x said. I directly render portal content into MC frame buffer, without involving other buffer. The portal rendering happens before vanilla world rendering and before hand rendering. It firstly renders the triangles that represent portal area. If no sample is passed, it will not render the world inside portal. This could increase performance. Rendering portal area also increases the stencil value by one. Then change the player position and dimension to render the world inside portal. I use a special shader to render portal content, what this shader do is to cull all pixels behind the portal. For example, if some triangles are between the teleported position and the world inside portal: It will render incorrectly like this: To avoid this, it should cull all pixels behind that plane Then it will render correctly. So it will not be compatible with optifine's fancy shaders.
  2. tones of mechanics. This is what I am trying to achieve. 1.Look through nether portals. 2.Going into nether is seamless, without loading screen. I currently use the replace-object method and got some progress. I copied tones of vanilla code and replaced tones of vanilla objects. This mod is still in work and has many bugs. The mechanics that I am changing: 1.Rendering I copied tones of vanilla rendering code to render portals. It will not be compatible with optifine and a lot of mods. 2.The world syncing between server and client. 3.Server chunk loading 4.The property of fire block If I proceed developing this mod without core modding I will replace even more vanilla objects and it become much more harder.
  3. I am trying to change vanilla mechanics where forge does not provide any event to hook into. Currently my method is extend a vanilla class, override some methods and replace the existing object with the object of my class. But this method can not change static methods and it is not compatible with other mods. So I need to make a core mod and use Mixin. By reading Forge code, I found that Forge supports write class transformers in javascript. But using Mixin is much easier than write raw transforming code. I did not find any documentation about how to use Mixin with Forge.
  4. GameRules class has a private field storing all types of game rules. public class GameRules { //... private final TreeMap<String, GameRules.Value> rules = new TreeMap<>(); //... } If I use access transformer to make it public then I can add a new game rule. But in GameRuleCommand class: public class GameRuleCommand { public static void register(CommandDispatcher<CommandSource> dispatcher) { LiteralArgumentBuilder<CommandSource> literalargumentbuilder = Commands.literal("gamerule").requires((p_198491_0_) -> { return p_198491_0_.hasPermissionLevel(2); }); for(Entry<String, GameRules.ValueDefinition> entry : GameRules.getDefinitions().entrySet()) { literalargumentbuilder.then(Commands.literal(entry.getKey()).executes((p_198489_1_) -> { return queryRule(p_198489_1_.getSource(), entry.getKey()); }).then(entry.getValue().getType().createArgument("value").executes((p_198490_1_) -> { return setRule(p_198490_1_.getSource(), entry.getKey(), p_198490_1_); }))); } dispatcher.register(literalargumentbuilder); } //... } It reads all the game rule types and creates the command format structure. If I add the game rule after the command registered, the /gamerule command will not work on my custom game rule.
  5. After setting up cfg file and changing build.gradle file, which gradle task should I execute? In 1.12 it was setupDecompWorkspace but it does not exist in 1.13.
  6. The old way of using Access Transformer seems to be not working in 1.13.
  7. I want to make falling sand fly upwards. I tried to find the event of falling block entity updating. But I could not find it. LivingEvent.LivingUpdateEvent is only for living entities, which do not include falling sand. I also tried to store all falling block entities and manage them by myself. But I could not find the event of game ticking. Maybe I should use Instrumentation to change a vanilla class? (sorry for my English)
×
×
  • Create New...

Important Information

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