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

Leaderboard

Popular Content

Showing content with the highest reputation since 09/20/21 in all areas

  1. Xironite Minecraft Server [1.8.x – 1.17.x] Xironite is a server dedicated to interacting with our community through hosting events and listening to player feedback! Our main feature is Towny! Towny gives our players a chance to work together and try to make the largest town while recruiting more players to help them. If competition is more your speed, you can compete against other towns in a variety of contests! You can do anything you want, from creating the largest town with your friends to dominating the economy and skill leaderboards! Xironite also adds a tonne of features to Survival, making it feel fresh once again. From custom enchants and tools to dungeons and bosses that will test your skills, Xironite has plenty to keep you busy! On top of all that, our player ranks can be earned in-game through playtime and resource gathering. No need to pay for cool perks! Xironite is constantly evolving based on player feedback and ideas from our amazing management. Join now before you miss our next event! How to Join? Join now using our IP: mc.xironite.org Features Bosses Dungeons Crates & Lootbags Events Robust Anti-Cheat Friendly & Active Community Custom Enchants Custom Tools & Armour PyroMining & PyroFishing Player Feedback & Suggestions Custom Textures ...and much more! Social Media Discord Instagram TikTok YouTube
    38 points
  2. From the forge discord:
    2 points
  3. Keep avoiding answering my question by asking other unrelated questions. But i'll humor you. It's been something we've been thinking of doing ever since the first person ran the wrong jar. So probably about the 1.3 days. So, now answer my question.
    2 points
  4. Hey... I had this similar issue. ScaledResolution can be gotten from the Minecraft param and drawCenterString also takes a matrixstack which you can get from the event. Extend from AbstractGui instead of Gui public class GuiNotif extends AbstractGui { String text = "Hello world!"; public GuiNotif(Minecraft mc, MatrixStack ms) { int width = mc.getWindow().getGuiScaledWidth(); int height = mc.getWindow().getGuiScaledHeight(); drawCenteredString(ms, mc.font , text, width / 2, (height / 2) - 4, 10526880 ); } } and in the event handler function you pass the matrixstack. if (event.type != ElementType.EXPERIENCE) return; new GuiNotif(Minecraft.getInstance(), event.getMatrixStack() );
    1 point
  5. you need to create a SpecialRecipe for it, take a look at the ShulkerBoxColoringRecipe or the BannerDuplicateRecipe
    1 point
  6. You can override the fill method in your item group and sort the list if you want to have it sorted regardless of mods being added or removed from the world.
    1 point
  7. What a strange choice of exception to throw here. Which symptoms did you observe that made you think this was the case? Not actually the problem here.
    1 point
  8. If you have MixinBootstrap installed try removing it, it's a mod made to provide mixin support when Forge can't or doesn't... but it's not smart enough to disable itself when Forge DOES provide mixin support... and they conflict
    1 point
  9. Yes. These mods are badly programmed and do not run properly on servers.
    1 point
  10. error in ToroHealth, make sure the mod is up to date, if it is report the bug to the mod author
    1 point
  11. nope, minecraft looks automatically in the correct folder of the assets and the datapack so like for block models in assets/mod_id/models/block/block_name.json loot tables in data/mod_id/loot_tables/block_name.json and so on but you should use the Data Generator
    1 point
  12. advancedcompass cannot run on a server. Report this bug to the mod author.
    1 point
  13. There is no way to not have JSON files for all blocks. They are necessary to describe how the block should be rendered. You can use data generation to generate these JSON files for you.
    1 point
  14. the condition would disable the recipe, so yes that's the "correct way"
    1 point
  15. 1.12 != 1.16.4, there are new ways to modify vanilla things (via Events), you should use it, since it is unnecessary to use outdated things as i can see you understand how to use Events, so why do you not use the PlayerEvent.HarvestCheck? you should only use the textures, models, etc. and throw the rest away
    1 point
  16. do something like that and use RegisterCapabilitiesEvent to register your Cap
    1 point
  17. you have to add them via dependencies screach for it in the gradle sub forum there are many threads about this topic
    1 point
  18. 1. Not afaik. 2. The entity is was already added and deferred to load at the correct time already. Follow the event call and you'll see that entities are loaded at a very specific point when processing. Trying to add your own entity at any point in this process would mean you could be loading a chunk that's already loading. 3. No, that is much more difficult.
    1 point
  19. Both are perfectly valid options. In fact DeferredRegister uses registry events behind the scenes. DeferredRegister makes it easier to not "mess up" and do things incorrectly, so it is usually the recommended way.
    1 point
  20. Reading the javadoc on the event tells you: "Note: This event may be called before the underlying Chunk is promoted to ChunkStatus#FULL. You will cause chunk loading deadlocks if you don't delay your world interactions." As such, you should probably keep a queue of entities added along with the world and position you would like it to spawn at. Then, on the next tick in probably WorldTickEvent, check if the chunk is loaded at the position of spawning and if so spawn the entity. Otherwise, recycle into the queue until next tick.
    1 point
  21. For your own arrow entity, override onHitEntity which tells you the actual RayTraceResult and allows you to store additional data about the hit position. For vanilla arrows, do the same thing using ProjectileImpactEvent.Arrow. You can then use a capability to store this additional data. Note however that this will not match up with the rendered position of the arrow. The position where arrows are in entities is random based on the entity's ID, see StuckInBodyLayer and ArrowLayer for how this is done.
    1 point
  22. Add a "false" condition to the recipe: { "conditions":[ { "type": "forge:false" } ], // rest of the recipe file here }
    1 point
  23. You very much misunderstood me. I am not acting from a high horse. I am just confused why you ask for advice, but then do not take it when it is given.
    1 point
  24. You know you could just do the second if statement, right? Think about it. If the second one is true, the first one MUST be true. The vanilla code is then wrapped in an if-else that checks for flint and steel or fire charges, and a final else-return-super. If the catch-fire portion ("from here on its vanilla code") is the code from the TNT block (your super) you could just call super...
    1 point
  25. RenderGameOverlayEvent.PreLayer will fire for all overlay elements. You can check if it is the air level by comparing the overlay element to ForgeIngameGui.AIR_LEVEL_ELEMENT. You can either use EntityViewRenderEvent.FogDensity, which will set setShaderFogStart and setShaderFogEnd for you based on the density you set on the event (provided you cancelled the event) or you can use EntityViewRenderEvent.RenderFogEvent (only called if FogDensity is not cancelled) and do your own fog settings there (by manually setting setShaderFogStart and setShaderFogEnd for example). You can see where this happens in FogRenderer#setupFog.
    1 point
  26. No, that's what @EventBusSubscriber does.
    1 point
  27. I feel really dumb... Sorry for being such a pain. Thanks to everyone who replied to this thread!
    1 point
  28. Okay so you are using 1.16. That means you should use Java 8. The pastebin link shows you are trying to use a JRE, a JDK is required for Java development.
    1 point
  29. Java 16 is required for 1.17.
    1 point
  30. Register a custom Stat using code similar to what Stats.makeCustomStat does in vanilla. You can then use it like normal (using awardStat, etc.). You cannot make it read directly from your capability, stats have separate storage.
    1 point
  31. I'm confused on why you are using reflection. Everything above does not need it. All are public except for the method which just returns itself so it doesn't matter. They are all forge registry entries which you can register normally.
    1 point
  32. Did you register `RECIPE_SERIALIZERS` to the mod event bus in your main constructor? Also: 1. Do not static init SMITHING_RECIPE_SERIALIZER, just use the registry object. 2. You shouldn't be doing this with getRecipes. Just call the method when needed. 3. registerType and RecipeType are unnecessary, just call IRecipeType#register.
    1 point
  33. join the forge discord server via link, go to the #bot-commands text channel typ in the command above and replace "<class-name>" with the class name you want to know for example: !mcp -c moj AbstractBlock the bot returns: MC 1.16.5: net/minecraft/world/level/block/state/BlockBehaviour Name: ceg => net/minecraft/world/level/block/state/BlockBehaviour Side: BOTH AT: public net.minecraft.block.AbstractBlock the new name of AbstractBlock is now net.minecraft.world.level.block.state.BlockBehaviour
    1 point
  34. Privacy is not supported on this forum in any way.
    1 point
  35. Something seems very wrong with your Minecraft installation, my guess is Curse launcher broke things.
    1 point
  36. Ah, yeah you're right. Vanilla does have a few of these dirty "quick fixes" hidden away in the guts of the code. @Deprecated public static RenderType getChunkRenderType(BlockState blockStateIn) { Block block = blockStateIn.getBlock(); if (block instanceof LeavesBlock) { return fancyGraphics ? RenderType.getCutoutMipped() : RenderType.getSolid(); } else { RenderType rendertype = TYPES_BY_BLOCK.get(block); return rendertype != null ? rendertype : RenderType.getSolid(); } } and public static boolean canRenderInLayer(BlockState state, RenderType type) { Block block = state.getBlock(); if (block instanceof LeavesBlock) { return fancyGraphics ? type == RenderType.getCutoutMipped() : type == RenderType.getSolid(); } else { java.util.function.Predicate<RenderType> rendertype; synchronized (RenderTypeLookup.class) { rendertype = blockRenderChecks.get(block.delegate); } return rendertype != null ? rendertype.test(type) : type == RenderType.getSolid(); } }
    1 point
  37. For anyone looking, the following code will rotate a VoxelShape around an axis: public static VoxelShape rotateShape(Direction from, Direction to, VoxelShape shape) { VoxelShape[] buffer = new VoxelShape[]{ shape, VoxelShapes.empty() }; int times = (to.getHorizontalIndex() - from.getHorizontalIndex() + 4) % 4; for (int i = 0; i < times; i++) { buffer[0].forEachBox((minX, minY, minZ, maxX, maxY, maxZ) -> buffer[1] = VoxelShapes.or(buffer[1], VoxelShapes.create(1-maxZ, minY, minX, 1-minZ, maxY, maxX))); buffer[0] = buffer[1]; buffer[1] = VoxelShapes.empty(); } return buffer[0]; }
    1 point
  38. Yes. Effects are handled by the Effect class. An effect is something like "slowness" or "jump boost" (you can see a list in the Effects class). You usually need to make your own subclass to achieve a custom effect. For actually performing the effect we need to distinguish between instant and non-instant effects. For instant effects (Effect#isInstant returns true) Effect#affectEntity will be called to perform the instant effect. For non-instant effects Effect#isReady(remainingDuration, amplifier) will be called every tick while the effect is active on an entity. If it returns true, Effect#peformEffect will also be called that tick. Potions are handled by the Potion class. A potion is something like "slowness", "long slowness" or "strong slowness", or, more abstractly, a Potion is a combination of zero or more effect instances. An EffectInstance is a combination of an Effect with a duration and an amplifier. Both Effect and Potion are forge registry entries and are registered as described in the documentation.
    1 point
  39. I wouldn't say I know enough Java to pr Forge, so I will instead make my suggestion here. I think it would be useful if there was a ShieldBlockEvent of some sort, which is fired when an an attack is blocked by a shield. I would assume you could get the DamageSource of the attack along with the shield item from the event.
    1 point
  40. JavaScript is not relevant for Minecraft modding, Minecraft mods are written in Java (Java is to JavaScript like car is to carpet). MCreator is not a good tool for making mods. If you want to make mods, you need to learn Java.
    1 point
×
×
  • Create New...

Important Information

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