
Woodside
Members-
Content Count
13 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout Woodside
-
Rank
Tree Puncher
-
[SOLVED][1.15.2]ServerWorld.spawnParticle excluding specific player
Woodside replied to Woodside's topic in Modder Support
Oop, I was looking at sendPacketWithinDistance. I didn't realize I could grab the list of players and send each one a packet on a whim. I misunderstood the code at first! -
[SOLVED][1.15.2]ServerWorld.spawnParticle excluding specific player
Woodside replied to Woodside's topic in Modder Support
I figured that, but how do I manually send packets without using reflection to expose the packet sending method? Or is there not a way? -
I have an item which I want to spawn a specific particle for the user, and then a separate particle for other players. Spawning one exclusively for the player using is easy enough, but spawning a particle server side has no way to exclude a specific player. Is there a way to do this without reflection?
-
[SOLVED][1.15.2] Render as 2D icon in GUI, 3D model in hand
Woodside replied to Woodside's topic in Modder Support
In the BakedModel class in SeparatePerspectiveModel, I changed func_230044_c_()/isSideLit() to return always false. That fixed the lighting issue with the GUI icon, but I cannot tell if it had any effect on the 3D model or not. It doesn't seem to have. -
[SOLVED][1.15.2] Render as 2D icon in GUI, 3D model in hand
Woodside replied to Woodside's topic in Modder Support
Thanks for the diff! Nearly there, except the 2D GUI icon is darker than other 2D items. Is there some flag I need to set? -
[SOLVED][1.15.2] Render as 2D icon in GUI, 3D model in hand
Woodside replied to Woodside's topic in Modder Support
I have found also that setting the "base" model to be "item/generated" also results in a blank hand-held item. Something about SeparatePerspectiveModel doesn't like stock item models, it seems? EDIT: I see now that I cannot use existing model templates due to them requiring their own model loader... So I'll need to make the item model from scratch. EDIT2: Upon further inspection, it should still be trying to use the appropriate model loader for items when SeparatePerspectiveModel deserializes the perspective objects. So I am confused as to why it's not working. -
[SOLVED][1.15.2] Render as 2D icon in GUI, 3D model in hand
Woodside replied to Woodside's topic in Modder Support
@diesieben07 Alright so I have the following, and the base model seems to be functioning just fine. However the GUI perspective just shows up as blank. No "missing model/texture" purple and black icon, just blank. Any idea why that might be? I put some log messages in the code and found that it is detecting the GUI item model, and is loading it. It's just not doing it correctly for some reason. { "loader": "mymodid:separate-perspective", "base": { "textures": { "0": "mymodid:item/flintlock", "particle": "mymodid:item/flintlock" }, "elements": [ { "from": [7, 6.75, -3], "to": [9, 8.75, 6], "rotation": {"angle": 0, "axis": "y", "origin": [8, 7.00105, 7.80305]}, "faces": { "north": {"uv": [9.5, 2.5, 11.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 2, 9, 0], "rotation": 180, "texture": "#0"}, "south": {"uv": [9.5, 2.5, 11.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 9, 2], "texture": "#0"}, "up": {"uv": [0, 2, 9, 0], "rotation": 90, "texture": "#0"}, "down": {"uv": [0, 0, 9, 2], "rotation": 270, "texture": "#0"} } }, { "from": [8, 8.75, -3], "to": [8, 9.75, -1], "rotation": {"angle": 0, "axis": "y", "origin": [8, 7.00105, 7.80305]}, "faces": { "north": {"uv": [0, 0, 2, 1], "texture": "#0"}, "east": {"uv": [6, 15, 4, 16], "texture": "#0"}, "south": {"uv": [0, 0, 2, 1], "texture": "#0"}, "west": {"uv": [4, 15, 6, 16], "texture": "#0"}, "up": {"uv": [0, 0, 2, 1], "texture": "#0"}, "down": {"uv": [0, 0, 2, 1], "texture": "#0"} } }, { "from": [6.5, 7.75, 6], "to": [9.5, 8.75, 13], "rotation": {"angle": 0, "axis": "y", "origin": [8, 7.00105, 7.80305]}, "faces": { "north": {"uv": [6, 10, 3, 11], "texture": "#0"}, "east": {"uv": [7, 3, 14, 4], "texture": "#0"}, "south": {"uv": [13, 0, 12, 3], "rotation": 90, "texture": "#0"}, "west": {"uv": [14, 3, 7, 4], "texture": "#0"}, "up": {"uv": [9, 9, 6, 16], "texture": "#0"}, "down": {"uv": [7, 0, 0, 1], "texture": "#0"} } }, { "from": [6.5, 4.75, 2], "to": [9.5, 7.75, 13], "rotation": {"angle": 0, "axis": "y", "origin": [8, 7.00105, 7.80305]}, "faces": { "north": {"uv": [6, 11, 3, 14], "texture": "#0"}, "east": {"uv": [14, 4, 3, 7], "texture": "#0"}, "south": {"uv": [16, 0, 13, 3], "rotation": 270, "texture": "#0"}, "west": {"uv": [3, 4, 14, 7], "texture": "#0"}, "up": {"uv": [3, 3, 0, 14], "rotation": 180, "texture": "#0"}, "down": {"uv": [3, 3, 0, 14], "texture": "#0"} } }, { "from": [8, 2.75, 10], "to": [8, 4.75, 14], "rotation": {"angle": 0, "axis": "y", "origin": [8, 7.00105, 7.80305]}, "faces": { "north": {"uv": [0, 0, 4, 2], "texture": "#0"}, "east": {"uv": [4, 14, 0, 16], "texture": "#0"}, "south": {"uv": [0, 0, 4, 2], "texture": "#0"}, "west": {"uv": [0, 14, 4, 16], "texture": "#0"}, "up": {"uv": [0, 0, 4, 2], "texture": "#0"}, "down": {"uv": [0, 0, 4, 2], "texture": "#0"} } }, { "from": [8, 8.75, 10], "to": [8, 9.75, 12], "rotation": {"angle": 0, "axis": "y", "origin": [8, 7.00105, 7.80305]}, "faces": { "north": {"uv": [0, 0, 2, 1], "texture": "#0"}, "east": {"uv": [6, 15, 4, 16], "texture": "#0"}, "south": {"uv": [0, 0, 2, 1], "texture": "#0"}, "west": {"uv": [4, 15, 6, 16], "texture": "#0"}, "up": {"uv": [0, 0, 2, 1], "texture": "#0"}, "down": {"uv": [0, 0, 2, 1], "texture": "#0"} } }, { "from": [7, -4.43706, 9.71454], "to": [9, 4.56294, 12.71454], "rotation": {"angle": -45, "axis": "x", "origin": [8, 7.00105, 7.80305]}, "faces": { "north": {"uv": [9, 7, 11, 16], "texture": "#0"}, "east": {"uv": [13, 7, 16, 16], "texture": "#0"}, "south": {"uv": [11, 7, 13, 16], "texture": "#0"}, "west": {"uv": [16, 7, 13, 16], "texture": "#0"}, "up": {"uv": [0, 0, 3, 9], "texture": "#0"}, "down": {"uv": [14, 4, 16, 7], "texture": "#0"} } } ], "display": { "thirdperson_righthand": { "rotation": [60, 0, 0], "translation": [0, 4, 1], "scale": [0.55, 0.55, 0.55] }, "thirdperson_lefthand": { "rotation": [60, 0, 0], "translation": [0, 4, 1], "scale": [0.55, 0.55, 0.55] }, "firstperson_righthand": { "translation": [1, 3, 1], "scale": [0.68, 0.68, 0.68] }, "firstperson_lefthand": { "translation": [1, 3, 1], "scale": [0.68, 0.68, 0.68] }, "ground": { "translation": [0, 2, 0], "scale": [0.5, 0.5, 0.5] }, "gui": { "rotation": [30, 45, 0], "scale": [0.625, 0.625, 0.625] }, "head": { "rotation": [0, 180, 0], "translation": [0, 13, 7] }, "fixed": { "rotation": [90, 60, -90], "translation": [1, 2, 0] } }, "groups": [ { "name": "pistol Breech", "origin": [8, 7.00105, 7.80305], "children": [0, 1] }, { "name": "pistol", "origin": [8, 7.00105, 7.80305], "children": [2, 3, 4, 5, 6] } ] }, "perspectives": { "gui": { "parent": "item/generated", "textures": { "layer0": "mymodid:item/flintlock_icon" } } } } -
[SOLVED][1.15.2] Render as 2D icon in GUI, 3D model in hand
Woodside replied to Woodside's topic in Modder Support
Loader, is that another class I extend off of? Is that SeparaterPerspectiveModel? I really have no context for how these pieces of information fit together. Can you explain with some more detail? -
[SOLVED][1.15.2] Render as 2D icon in GUI, 3D model in hand
Woodside replied to Woodside's topic in Modder Support
How do I create the model to replace with though? Instantiate a couple of BlockModels, and put them into a new SeparatePerspectiveModel, and then run "bake"? I can't find all the parameters I need to put into bake. -
[SOLVED][1.15.2] Render as 2D icon in GUI, 3D model in hand
Woodside replied to Woodside's topic in Modder Support
I do not believe I understand how to apply SeparatePerspectiveModel. How do I tell a specific item to use it? -
[SOLVED][1.15.2] Render as 2D icon in GUI, 3D model in hand
Woodside replied to Woodside's topic in Modder Support
I replaced RenderMaterial with Material and it seems to be happy. Wonder if that were just a rename. I also had to rename isSideLite to func_230044_c_ but that wasn't an issue. -
[SOLVED][1.15.2] Render as 2D icon in GUI, 3D model in hand
Woodside replied to Woodside's topic in Modder Support
Seem to be missing RenderMaterial which I cannot find. -
Woodside joined the community
-
Hello, Prior, one could implement IPerspectiveAwareModel to have an item render differently based on hand or GUI. This is no longer the case. I see that when registering an item I can call .setISTER() and provide my own implementation of an ItemStackTileEntityRenderer, but that's used to render a different 3D model instead of just a flat icon. I also found that I couldn't get the method ItemStackTileEntityRenderer.render to even be called if I attached it to an item. Is there a better way to accomplish what I want to do, or do I just have to make a 3D model that looks like a 2D icon for the sake of this? How do I even get it to invoke if that is the case?