TheGreyGhost
Members-
Posts
3280 -
Joined
-
Last visited
-
Days Won
8
TheGreyGhost last won the day on December 19 2020
TheGreyGhost had the most liked content!
Converted
-
Gender
Undisclosed
-
Personal Text
I'm less new than I used to be.
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
TheGreyGhost's Achievements
Reality Controller (8/8)
823
Reputation
-
[1.16.4] can i use TileEntityRenderer render item on my chest ?
TheGreyGhost replied to zlappedx3's topic in Modder Support
Howdy Perhaps you mean like the campfire? If so, look at the vanilla CampfireTileEntityRenderer code -TGG -
How to ose non cubic model as mod-item?
TheGreyGhost replied to Drachenbauer's topic in Modder Support
That is true, but if DrachenBauer wants this then (s)he may need to use an ItemStackTileEntityRenderer. mbe81 uses item json for wavefront rendering (no TER), eg mbe81b_boomerang_registry_name.json { "loader": "forge:obj", "model" : "minecraftbyexample:models/entity/mbe81b_boomerang.obj", "flip-v": true, "detectCullableFaces": false, "diffuseLighting": true, "ambientToFullbright": false, "materialLibraryOverride": "minecraftbyexample:models/entity/mbe81b_boomerang.mtl", "__comment": "flip-v may be required if your texture appears mirrored. See OBJloader::read() for other flags. currently the available options are", "__comment1": "detectCullableFaces (default true) = try to convert faces to Directional Quads (EAST, WEST, etc) instead of just general quads", "__comment2": "diffuseLighting (default false) = attempt to apply the direction-dependent lighting as per vanilla blocks. Currently does nothing.", "__comment3": "flipV (default false) = mirror the texture sheet top-->bottom (if your textures appear upside-down)", "__comment4": "ambientToFullbright (default true) = always render at maximum world illumination (combinedLight) regardless of the actual skylight or blocklight present", "__comment5": "materialLibraryOverrideLocation (default null) = use this path/filename for the material library file .mtl", "display": { "thirdperson_righthand": { "rotation": [ 180, 0, 90 ], "translation": [ 0.00, 3.50, -1.75 ], "scale": [ 0.04, 0.04, 0.04] }, "thirdperson_lefthand": { "rotation": [ 90, 0, 90 ], "translation": [ 0.00, 3.50, -1.75 ], "scale": [ 0.04, 0.04, 0.04] }, "firstperson_righthand": { "rotation": [ 188, 0, 90 ], "translation": [ 0.00, 5.25, -2.25 ], "scale": [ 0.05, 0.05, 0.05] }, "firstperson_lefthand": { "rotation": [ 90, 0, 90 ], "translation": [ 0.00, 5.25, -2.25 ], "scale": [ 0.05, 0.05, 0.05] }, "gui": { "rotation": [ 82, 0, 0 ], "translation": [ 0.75, -1.00, 0.00 ], "scale": [ 0.06, 0.06, 0.06] }, "head": { "rotation": [ 0, 0, 0 ], "translation": [ 0.00, 0.00, 0.00 ], "scale": [ 0.05, 0.05, 0.05] }, "fixed": { "rotation": [ 270, 162, 0 ], "translation": [ 0.00, 0.00, 0.25 ], "scale": [ 0.06, 0.06, 0.06] }, "ground": { "rotation": [ 90, 278, 0 ], "translation": [ 0.00, 9.00, 0.00 ], "scale": [ 0.05, 0.05, 0.05] } } } -
-
How to ose non cubic model as mod-item?
TheGreyGhost replied to Drachenbauer's topic in Modder Support
Howdy There are some examples of Wavefront in in this tutorial project see mbe21 (tileentity) and mbe81 (entity and item) https://github.com/TheGreyGhost/MinecraftByExample -TGG mbe21: mbe81: -
[1.16.4] Arrow entity rendering problems
TheGreyGhost replied to Lemon Lord's topic in Modder Support
Howdy You might find these working examples useful https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe81_entity_projectile -TGG -
[1.16.4] TopSolidRangeConfig topOffset mystery
TheGreyGhost replied to frakier's topic in Modder Support
Hi public class RangePlacement extends SimplePlacement<TopSolidRangeConfig> { public RangePlacement(Codec<TopSolidRangeConfig> codec) { super(codec); } public Stream<BlockPos> getPositions(Random random, TopSolidRangeConfig config, BlockPos pos) { int i = pos.getX(); int j = pos.getZ(); int k = random.nextInt(config.maximum - config.topOffset) + config.bottomOffset; return Stream.of(new BlockPos(i, k, j)); } } Beats me why they found it necessary to have both config.maximum and config.topOffset in there. Probably it means something, eg maximum is the highest y value of this feature but don't use the topmost topOffset rows. TopSolidRangeConfig(int bottomOffset, int topOffset, int maximum) means (5, 0, 37) gives you nextInt(37 - 0) + 5 = 5 to 41 inclusive and (5,10, 37) gives you nextint(37 - 10) + 5 = 5 to 31 inclusive -TGG -
Hi IInventory is the vanilla implementation used for containers IItemHandler is a Forge extension You can use either one, they will both work fine if you implement them correctly: The vanilla IInventory has some extra methods which are used by the slots to communicate with the container, but you can nearly always safely ignore those. IItemHandler is more flexible; you can (for example) use it to implement an inventory on an item. In some ways it is also stylistically preferable ("composition instead of inheritance"). As Kiou said it is more "automation friendly" in some ways. In practice, just pick one and go with it, don't worry too much about which one is "optimum". The users of your mod are highly unlikely to ever notice the difference, and if you do ever need to change it to IItemHandler in the future, it's easy to refactor. Cheers TGG
-
[1.16.4] How do I Make a Block That Holds Energy
TheGreyGhost replied to Eduardu44's topic in Modder Support
Howdy Forge Energy is stored using a Capability There are some working examples of Capability in this tutorial project: https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe65_capability and https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe32_inventory_item -TGG -
Hi You might find this tutorial example useful when trying to understand how the vanilla inventories work https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe30_inventory_basic It uses IInventory instead of IItemHandlers but the rest is directly relevant. -TGG
-
Howdy You might find this useful https://github.com/TheGreyGhost/MinecraftByExample See MBE30, MBE31, MB32 These are GUI which are based around containers but the basic principles are still the same even if you don't have a container. It should help you get a start on understanding how the vanilla GUI work. Cheers TGG
-
Setting entity rendering brightness [1.16.3]
TheGreyGhost replied to Turtledove's topic in Modder Support
Howdy GL11.glEnable(GL11.GL_MAX_LIGHTS) and all those don't work any more, they're incorporated into your RenderTypeBuffer. The reason is that the drawing is no longer done in-line, it is accumulated into the appropriate buffer (eg transparent blocks, entities, lines, etc) and each buffer is then drawn in one shot. If you want to mess with the rendering settings, you need to choose a different RenderTypeBuffer or create your own custom. Some more information here: https://gist.github.com/williewillus/30d7e3f775fe93c503bddf054ef3f93e If you need every face of the entity model to be lit up the same, you can modify your renderer to render all of the faces more brightly? I'm not sure why that's a problem? -TGG -
Network messages from client-side mod [1.14.4]
TheGreyGhost replied to kirstym's topic in Modder Support
From memory; All the packets that your client could send are named CXXXXXPacket eg CInputPacket IServerPlayNetHandler also lists the interesting ones (that is the class on the server that processes the incoming packets). -TGG -
[1.16.4] net.minecraft.world.World.isMaterialInBB()
TheGreyGhost replied to p106305's topic in Modder Support
Hello How I find the new name when it has changed version (eg from 1.12 to 1.16): 1) Find the code in 1.12 which calls .isMaterialInBB(); for example EntityLlamaSpit:onUpdate....-> if (!this.world.isMaterialInBB(this.getEntityBoundingBox(), Material.AIR)) { this.setDead(); } else if (this.isInWater()) { this.setDead(); } 2) Look at EntityLlamaSpit in 1.16.4: (LlamaSpitEntity::tick ) if (this.world.func_234853_a_(this.getBoundingBox()).noneMatch(AbstractBlock.AbstractBlockState::isAir)) { this.remove(); } else if (this.isInWaterOrBubbleColumn()) { this.remove(); } else { -TGG -
Network messages from client-side mod [1.14.4]
TheGreyGhost replied to kirstym's topic in Modder Support
I'm on the same line of thought as DieSieben - or do you mean that your client-side-only mod sends vanilla messages (or "custom" messages that masquerade as vanilla messages)? Could you implement your desired functionality using vanilla packets only? The use-cases you described sound like it might be possible (eg changes to controls, placing blocks, etc) -TGG