
Everything posted by Cadiboo
-
[1.12.2] Writing to Config
Are you using @Config or Configuration? With @Config you can just set your fields and then force a sync from anywhere
-
[1.12.2] Templates causing lag
Show your code preferably post it as a GitHub repository
-
[1.12.2] Need help rendering a fluid inside a pipe or change his blockstate!
You just need to draw a box in your TESR. Multiple examples can be found in many open source mods. You should use the debugger to step through your code.
-
Rendering custom beams
You need a tile entity, and a (Fast)TESR. In your TESR or FastTESR render a cuboid with equal width & length and a much larger height. You can look at the beacon renderer code, or the dragon death renderer code, which everyone has in their attached libraries in their IDE. You will also need to make your render bounding box bigger if you want the tile to render when offscreen
-
Glowing Armor
Define glow. if you mean “render fullbright on the player” it’s very easy. if you mean create light around the player, you can make a light-emitting block that follows you around (reasonably difficult), or you can depend on OptiFine’s Dynamic Lights feature and/or the dynamic lights mod (probably pretty easy)
-
[1.12.2] Need help rendering a fluid inside a pipe or change his blockstate!
Use a FastTESR too
-
Forge Initialization can't find existing class
What: Class naming conventions Why: Allow you and others to easily read and understand your code Consequences: Hard to read code How: Name your classes in TitleCase What: Method naming conventions Why: Readable code Consequences: Hard to read code, other developers vomiting when they read your code How: Your method names should be verbs in camelCase
-
Forge Initialization can't find existing class
To elaborate What: Lowercase package naming Why: Some file systems (windows) considering “iTeMs” and “items” to be the same, but every other one considering them to be different. Consequences: Not doing this _may_ never cause any issues (and very likely won’t in your dev environment), but on other operating systems with different case-sensitivities from yours this can cause massive problems. How: Name your packages all in lowercase What: Packaging that reflects your web presence Why: Avoid name collisions - your web presence is unique so it is commonly used. Consequences: Errors loading classes with other mods installed, usually happens when 2 mods never changed their packaging from the default in the MDK. How: If you have an illegal character in your web presence, the convention is to replace it with “_”. If you don’t have a website, you can use your version-control repository as your web presence, e.g. “com.github.username”. If you don’t use version control, start using it! In the meantime you can use the packaging “mod.username.modid”.
-
Minecraft game crash
I think it’s a problem with BF’s fragile ASM. Make sure you have the latest version. If the problem persists, either make an issue on its GitHub tracker, uninstall it or download this mod which fixes it (I’m unsure if it’s compatible with codechicken core though) https://minecraft.curseforge.com/projects/renderchunk-rebuildchunk-hooks/files
-
Custom FontRenderer with custom sized ascii.png file
I think it’s probably the game resolution being too small to render all the pixels of your font, what does it look like in full screen?
-
[1.12.2] Templates causing lag
Where/when are you generating your structure? Ideally you would do it before lighting was calculated
-
How to replace IHasModel
You should learn Java. You need to only copy the ModelLoader.setCustomResourceLocation line. You can’t have a method inside another method
-
How to create my own log and save to file?
http://www.lmgtfy.com/?q=write+to+file+with+log4j
-
[1.12.2]How to make a 3D model of armor(OBJ)
You will need to load the textures for the model and tell the ObjLoader to load your model, then store a reference to it and render it in a Forge event.
-
Curious
https://m.twitch.tv/videos/378515409
-
[1.12.2]How to make a 3D model of armor(OBJ)
You can load the model and texture yourself, and then render them in one of forges events. I think this is either a design choice for you to make, or I can’t understand what you mean.
-
Reverse engineering
Getting to where we are with the deobfucation for minecraft has taken 7 years and thousands of people. Minecraft is always changing as it updates though, so this isn’t an accurate representation of how long it would take to reverse engineer something else. If you’re trying to reverse engineer something you should already be familiar with its concepts and common implementations of them. As such there isn’t any accurate time spent -> lines deobfuscated conversion.
-
[1.12.2] Facing block not working ServerSide
Just return false, no need for the variable That’s your problem, you always return the default state from getStateFromMeta
-
[1.12.2] Custom slabs with RegistryHandler
I’m just gonna link this, read it, it’s all important. https://gist.github.com/Cadiboo/fbea89dc95ebbdc58d118f5350b7ba93 Slabs are a fairly complicated thing for a new Modder, as they involve 2 semi-seperate blocks and 1 custom itemblock. Heres my slab class (not how it’s abstract had has 2 subclasses, double & single) https://github.com/Cadiboo/Legendary-Winter/blob/master/src/main/java/geek/legendarywinter/blocks/BlockWinterstoneSlab.java I create the blocks with registry.register(setupBlock(new BlockWinterstoneSlab.Half(), "winterstone_slab")); registry.register(setupBlock(new BlockWinterstoneSlab.Double(), "winterstone_double_slab")); and the itemblock with final ItemSlab itemSlab = new ItemSlab(WINTERSTONE_SLAB_HALF, WINTERSTONE_SLAB_HALF, WINTERSTONE_SLAB_DOUBLE); final ResourceLocation name = WINTERSTONE_SLAB_HALF.getRegistryName(); itemSlab.setRegistryName(name); registry.register(itemSlab); I use a local variable and don’t chain setRegistryName because it returns an Item and not an ItemSlab, it’s not necessary though
-
How to create my own log and save to file?
I believe you can do this with the logging library minecraft includes (log4j).
-
Long type in configuration
Use an int or a double Short answer: you can’t Long answer: You could do it a number of ways, for example with a custom GUI. The simplest option is just store a backup value that is correct, and if parsing fails tell the user and fall back to the backup value
-
Forge Capabilities Randomly Disappearing
Have you tried putting a breakpoint at initCapabilities?
-
[1.12.2] Screwy Blockstate with Facing
Please post the full log
-
[1.12.2] Random textures on specific face
Can you explain this?
-
[1.12.2] Registering SoundEvents
That is how it should be done in 1.12.2 (it breaks other mods if you do it any other way) and must be done in 1.13 (any kth r way will crash instantly in 1.13). If it isn’t working, it indicates a bigger problem in your mod
IPS spam blocked by CleanTalk.