Everything posted by Draco18s
-
[1.10.2] Stop playing sound and no multiple sounds at once
This is probably not the best way (and 1.7 code), but it worked and didn't cause any problems that I am aware of. https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/ores/client/ClientProxy.java#L77-L96 Invoked via BaseMod.proxy from a TileEntity (server side method is empty).
-
[1.10.2] Create floating Gravel
Are you removing the base of the tall grass, or are you removing the supporting grass block? When I was doing it I had to remove the supporting block from below.
-
[1.10.2] Create floating Gravel
Stop suggesting ASM. It is not needed. In fact, discussing ASM can get you banned.
-
[1.10] Trouble with custom wall blocks. [RESOLVED]
When you use postimg, don't get the first URL it gives you, get the second one ("direct link").
-
MC 1.10+ colored lights!
IIRC you have to basically rewrite the whole lighting engine.
-
[1.10.2] Where Should I Register Things???
I wasn't actually. But that said, I don't use social media. It is the worst way to receive info ever conceived. I mean, yes, if I want information from a specific feed I can go there, but I don't always know I need to go there. As for the docs, do you mean at http://mcforge.readthedocs.io? Because I'm not seeing it currently (then again your post said "had" so maybe it was there and isn't now for...some reason?) Honestly genuinely curious as to where you are referring to so I can read up on how it works. Edit: Ok, now I'm going to be pedantic and snippy: There are no tweets from @ForgeDevTeam about this feature. In fact, of 10 tweets the account has supposedly made, only 6 are even shown, one of which is "first" and another is "What is this "twit" thing?" I'm actually trying to locate the information about this new registration event system and can't. Heck, even searching these forums for "RegistryEvent" returns 4 threads: This one. A one from a week ago asking what the hell it is for. One from earlier today that I am not reading because the poster providing help is overtly hostile to receiving help himself. Another one from a week ago where someone was having unrelated JSON issues (and their code contained the event). The announcement post in the Releases subsection doesn't show up because it doesn't refer to the event by name, just concept ("new LifeCycle events") with no links to additional information just a "please use this" note. I'm not trying to make your life difficult I'm just bewildered about how I am unable to locate the information you stated as being highly visible. If I'm looking in the wrong places, then maybe that information needs to be posted to those places.
-
[1.10.2] Where Should I Register Things???
Well thanks for letting the community know, Lex.
-
[1.10.2] Where Should I Register Things???
Items, blocks, and models need to be registered in PreInit and only PreInit.
-
[SOLVED] Render texture layer transparent
Then it's changed from when I last fiddled with transparent items
-
UVs ('vt') out of bounds 0-1!
Your texture UV coordinates. When you textured this object, it "bled" over a little bit. You can safely change those values to 1.0000
-
UVs ('vt') out of bounds 0-1!
In your obj: vt 0.3654 1.0096 vt 0.2596 1.0096 1.0096 is greater than 1
-
[1.10.2] Create floating Gravel
Ok, in which case I don't know. You can also try the method that works even during creative mode: Put down GRASS, then on top of it put TALL_GRASS (the two-block-tall variant), put your gravel on top, then remove the GRASS block. The lower half of the TALL_GRASS will remove the upper half without causing a block update.
-
Performing an action
"Packets" If the question ever involves "how does the server know the client did...?" the answer is packets. Likewise the answer to "how does the client know the server did...?" is also packets. onItemRightClick is called on both sides. You don't need to do anything involving packets.
-
[1.10.2] Create floating Gravel
I think you have to turn FallInstantly off in BlockFalling.
-
Render text onto a block
Not having looked over what that guy did in detail, I have no idea.
-
Render text onto a block
Coincidentally I saw a Forge pull request that does precisely this....without needing a TileEntitySpecialRenderer https://github.com/RainWarrior/MinecraftForge/blob/7b611ef9b2a95ea6b91fb79e0ffe8476a05a675c/src/main/java/net/minecraftforge/client/model/FancyMissingModel.java Lex's comment was "this is a good example of how to do text on static models that everyone bitches about."
-
MC 1.10+ returning an item with metadata
No, I mean you create an item stack with an item and metadata value, then discard the stack for the item. This: ItemStack stack = new ItemStack(Blocks.STONE_SLAB,1,5); Item item = stack.getItem(); And this: Item item = Item.getItemForBlock(Blocks.STONE_SLAB); Are identical. As would: ItemStack stack = new ItemStack(Blocks.STONE_SLAB,1,14); Item item = stack.getItem(); And: ItemStack stack = new ItemStack(Blocks.STONE_SLAB,1,0); Item item = stack.getItem(); As well as: ItemStack stack = new ItemStack(Blocks.STONE_SLAB,1,123456789); Item item = stack.getItem(); Your updated code handles it correctly, of course. Even if it was "just for testing" it should have been apparent that an Item (which has no concept of metadata) isn't magically different after wrapping it into, then extracting it from, an ItemStack.
-
[1.10.2] Glitch with custom model
Your UVs all state "0 -> 16" for both the U and V directions. This means the full 16x16 texture is being used on each face. If you want the texture to use as many pixels as the face is wide, then you need to match your UV values to match your from/to values. Also, remove invisible faces. The cuboid at "from": [ 5, 1, 5],"to": [ 11, 2, 11 ] will never have it's "down" face visible (it is coplanar with the top face of the previous cuboid and facing into it) so there's no reason to render it at all.
-
[1.10] Entity more than 1024 Health?
Whoops
-
MC 1.10+ returning an item with metadata
I love how this code: ItemStack stack = new ItemStack(Blocks.STONE_SLAB,1,5); Item item = stack.getItem(); if (is != null && is.getItem() == item){ Leash.remove(); } Sets up a variant item stack, then ignores the shit out of it. Also, dude, seriously, wrap all of this in a single if(is != null) check. Simplify your life.
-
[SOLVED] Render texture layer transparent
Item-items can't be transparent as far as I know. Putting alpha value pixels just causes the engine to perform a clip on them (values above 0.5 are treated as 1, value below as 0).
-
[1.8.8] Rendering a simple line from a block to block.
Take a look here https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hazards/client/HazardsClientEventHandler.java#L138 There's a lot of custom logic going on, but it's there to figure out which two blocks to draw the line between, in what color, and some slight height offsets so that no z-fighting occurs. Actual drawing occurs in a separate function down on line 371. Do note that the Tessellator has changed recently, so you may need to do some conversions.
- PropertyDirection
-
PropertyDirection
Not to mention being stringly typed and immune to refactoring.
-
[1.10.2] SubItems problem.
By the way, BaXMultigaming, you PMed me with an issue a few days ago. Step 1: Read my signature. Step 2: Clear out your inbox, it is full.
IPS spam blocked by CleanTalk.