1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-30 00:57:55 +00:00
Commit Graph

1920 Commits

Author SHA1 Message Date
Merith
2475e61748 release 1.18.1/1.100.3 2022-03-31 05:58:52 +00:00
Merith
fb43159b2a [Iris] Merge Rendering Experiments to 1.18.1 (#77)
* Quick and dirty test.

- VBO monitor renderer path has been hijacked to test not using VBOs,
 instead we recreate the terminal geometry every frame.
- Add an explicit call the BufferSource.endBatch(). This actually fixes
 the incompatibility with Batched Entity Rendering. Who knew it was that
 easy?

 Results: works with Iris without shaders enabled.

* Use entity RenderType for rendering terminals in world.

- FixedWidthFontRenderer now emits quads and fills out all the vertex
 elements needed for the entity vertex format, which is, well, *all* of
 them.
- FixedWidthFontRenderer now takes a PoseStack so it can offset the char
 quads from the background.
- TERMINAL_MODE changed to quads so remaining custom RenderTypes work
 with FWFR.

New progress at this commit:
- Iris and Canvas both render the hi-jacked VBO backend properly.

Issues:
- Char quads have a blacker background than empty quads due to
 mismatched lightmaps.
- Items in hand have improper normals.
- TBO renderer is untested. Need to make sure it wasn't broken.

* More stuff

Progress:
- "VBO" code path now works fine with shaders.
- Printout GUI has lightmap issue.
- Pocket computer frames don't have right normals in world.
- Pocket computer lights don't work.

TODOs:
- Investigate whether VBOs can be used again without breaking compat.
If not, the code path needs to be renamed and the code for managing VBO
resources should be removed.
- Make sure TBO code path still works. Wouldn't be surprised if I broke
something there.

* Found a new rendertype for monitors, fixed normals

Progress:
- Monitors render fullbright in every direction.
- Normals are right on pocket computers and printouts, so lighting
  effects like directional light and shadow maps looks correct.
- BEST monitor renderer settings will detect shader mods and
  automatically enable shader compatible code path.

Details:
- The "textIntensity" rendertype is exactaly what we need for monitors.
  It's shader doesn't apply a directional light so monitors look
  fullbright consistent no matter what direction they're facing.
- Consolidated all references to rendertypes into RenderTypes class.
- Improved consistency of rendering classes. Methods pass a PoseStack
  instead of a Matrix4f down the chain where possible so that normals
  can be calculated, and most rendering classes now fill out all vertex
  elements so they can be used with any vanilla vertex format.
- Rendering methods should prefer to take a VertexConsumer rather than a
  BufferSource, the caller should provide appropriate buffer as that's
  where the context for buffer choice is.

TODO:
- Investigate re-enabling VBOs, and, if not an option, clean up naming
  and VBO related resource code.

* Re-enable vbos

Things were extremely slow without them in torture tests. They seem to
work fine with Iris. Will need to test with Canvas too. I don't know why
that hack with the inverse view rotation uniform works but fog doesn't
render correctly without it.

Unfortunately, the z-offset method does cause visible artifacts.
Background quads can sometimes be seen under the edges of adjacant
characters, giving the monitor a stitched together look. Will have to
investigate splitting all the background and char quads into two draw
calls and using glPolygonOffset on the characters :( which probably
means two vbos :( :(

Co-authored-by: Toad-Dev <748280+toad-dev@users.noreply.github.com>
2022-03-27 15:14:05 -07:00
ƐqɿmƐ
2b6336985e Add 3prm3 to credits 2022-03-22 19:00:59 -07:00
Merith
a0d013aaca Merge pull request #60 from lonevox/patch-1
Fix typo in comment
2022-03-20 17:34:48 -07:00
ImgBotApp
e529f45db7 [ImgBot] Optimize images
*Total -- 29.16kb -> 15.30kb (47.51%)

/logo.png -- 8.13kb -> 2.55kb (68.61%)
/src/main/resources/resourcepacks/classic/assets/computercraft/textures/gui/term_font.png -- 3.81kb -> 1.33kb (65.19%)
/src/main/resources/resourcepacks/classic/assets/computercraft/textures/gui/corners_colour.png -- 1.25kb -> 0.61kb (51.13%)
/src/main/resources/assets/computercraft/textures/gui/disk_drive.png -- 1.57kb -> 0.85kb (45.95%)
/src/main/resources/resourcepacks/classic/assets/computercraft/textures/gui/disk_drive.png -- 1.57kb -> 0.85kb (45.95%)
/doc/logo.png -- 1.53kb -> 0.85kb (44.59%)
/src/main/resources/assets/computercraft/textures/block/turtle_advanced.png -- 1.22kb -> 0.70kb (42.75%)
/src/main/resources/assets/computercraft/textures/gui/turtle_advanced.png -- 1.95kb -> 1.14kb (41.46%)
/src/main/resources/assets/computercraft/textures/block/turtle_normal.png -- 1.11kb -> 0.70kb (36.95%)
/src/main/resources/assets/computercraft/textures/block/turtle_colour.png -- 1.07kb -> 0.75kb (29.91%)
/src/main/resources/resourcepacks/classic/assets/computercraft/textures/block/turtle_colour.png -- 2.38kb -> 1.74kb (26.96%)
/src/main/resources/assets/computercraft/textures/item/printed_book.png -- 0.50kb -> 0.41kb (17.32%)
/src/main/resources/assets/computercraft/textures/block/wireless_modem_advanced_face.png -- 0.48kb -> 0.40kb (16.77%)
/src/main/resources/resourcepacks/classic/assets/computercraft/textures/block/computer_normal_front_blink.png -- 0.49kb -> 0.42kb (14.37%)
/src/main/resources/assets/computercraft/textures/block/wireless_modem_advanced_face_on.png -- 0.45kb -> 0.40kb (10.5%)
/src/main/resources/resourcepacks/classic/assets/computercraft/textures/block/computer_normal_front_on.png -- 0.43kb -> 0.41kb (5.47%)
/src/main/resources/resourcepacks/classic/assets/computercraft/textures/block/computer_normal_front.png -- 0.41kb -> 0.40kb (2.85%)
/src/main/resources/assets/computercraft/textures/block/computer_advanced_front_blink.png -- 0.40kb -> 0.39kb (1.46%)
/src/main/resources/assets/computercraft/textures/block/disk_drive_front_accepted.png -- 0.42kb -> 0.41kb (0.47%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2022-03-16 05:46:04 +00:00
Merith
345cce9fa6 update gradlew, and overhaul textures 2022-03-02 04:35:49 +00:00
lonevox
432daa1f2c Fix typo in comment 2022-02-22 00:34:33 +13:00
Toad-Dev
8ea1742135 Give FakeNetworkManager a nonnull channel.
Another mod was using mixins to access this private field without any
null checking. I got the idea to use an EmbeddedChannel from Carpet,
which was having the same issue with this mod.

Fixes #53.
2022-02-07 23:16:41 -08:00
Toad-Dev
31a3b975d3 Clean up FakePlayer
Not sure why we had two fake implementations of
ServerGamePacketListenerImpl and Connection. One set wasn't actually
being used and was in bad shape.
2022-02-07 23:11:46 -08:00
Toad-Dev
87bb49337f Fix monitor max dimensions syncing.
- We were transposing width and height values on client.
- Made width/height order consistent in constructor too just because.
2022-01-29 13:02:15 -08:00
Toad-Dev
344453735a Fix mouse_up events not firing.
- deja vu
2022-01-24 14:38:52 -08:00
Toad-Dev
8d37f4804c Merge remote-tracking branch 'CC-Tweaked/mc-1.18.x' into mc-1.18.x/stable 2022-01-20 15:44:23 -08:00
Toad-Dev
fc57d0a7e5 Fix z-fighting on bold printout borders.
- Changed page background to render as one quad, instead of two halves.
- Set page background to a z-offset that is between zeroth (potentially
bold border) and subsequent background pages. Bold borders were at the
same z-offset before.
2022-01-20 15:36:46 -08:00
Cloud Chagnon
883ac717d8 Center printout rendering, fix printout gui not responding to page turning inputs.
Fixes:
- Printouts being drawn slightly offset to the left in all cases, noticeable mainly when in item frames.
- Printout text two pixels off center within the background.
- Printout GUI not responding to left/right arrows. Scrolling seemed to work but same fix was added there for consistency.
2022-01-20 15:30:19 -08:00
Cloud Chagnon
b81ef83d68 Fix #16, clients now use server configured terminal dimensions. (#55)
Adds `TerminalDimensionsClientMessage` that:
- is sent to each player on server join.
- syncs computer, pocket, and maximum monitor sizes.
2022-01-20 12:06:14 -08:00
Jonathan Coates
9edce36efd Merge branch 'mc-1.17.x' into mc-1.18.x 2022-01-14 23:01:12 +00:00
Jonathan Coates
e05588c662 Merge branch 'mc-1.16.x' into mc-1.17.x 2022-01-14 23:00:17 +00:00
Jonathan Coates
9cf70b10ef Bump version 2022-01-14 22:58:19 +00:00
Jonathan Coates
9ac8f3aeea Fix wired modems having incorrect blockstate
Fixes #1010
2022-01-14 15:37:49 +00:00
Jonathan Coates
e191b08eb5 Use Guava instead of commons-codec for hex encoding
The latter was removed in 1.18 on the server side.

Fixes #1011.
2022-01-14 15:35:58 +00:00
Jonathan Coates
a1221b99e1 Remove debugging log line
Fixes #1014
2022-01-14 14:45:55 +00:00
E. Kim
1dd6c8d75c Update ko_kr.json 2022-01-04 22:55:12 -08:00
Toad-Dev
32b856f77e Update lang files.
Some of these keys aren't used in the versions that our 1.16 and 1.17
branches are based on, but they will be there in case we ever do a
feature update for those branches.
2022-01-04 22:41:52 -08:00
Weblate
e7f08313d9 Translations for Danish
Co-authored-by: Christian L.W <christianlw@hotmail.dk>
Co-authored-by: Christian L.W. <christianlw@hotmail.dk>
2022-01-02 23:29:24 +00:00
Toad-Dev
9c00124d38 Merge remote-tracking branch 'CC-Tweaked/mc-1.18.x' into mc-1.18.x/dev 2022-01-01 20:04:09 -08:00
Toad-Dev
f62811cb44 Fix: register missing data pack reload listener.
Fixes "ComputerCraft may be installed incorrectly" and "File not found"
errors that sometimes happened after switching single player worlds or
running /reload.
2022-01-01 19:46:27 -08:00
Jonathan Coates
79366bf2f5 Merge branch 'mc-1.17.x' into mc-1.18.x 2022-01-01 15:41:24 +00:00
Jonathan Coates
413fa5bcc8 Merge branch 'mc-1.16.x' into mc-1.17.x 2022-01-01 15:41:05 +00:00
Jonathan Coates
79fc8237b6 Bump version to 1.100.1
My new years resolution is to make no more CC:T commits.
2022-01-01 15:36:03 +00:00
Jonathan Coates
9d50d6414c Happy new year
Should be the last time I'll have to do this!
2022-01-01 00:09:34 +00:00
Jonathan Coates
16df86224b Fix pocket speakers incorrectly detaching computers
- Fix UpgradeSpeakerPeripheral not calling super.detach (so old
   computers were never cleaned up)
 - Correctly lock computer accesses inside SpeakerPeripheral

Fixes #1003.

Fingers crossed this is the last bug. Then I can bump the year and push
a new release tomorrow.
2021-12-31 18:24:54 +00:00
Toad-Dev
802949d888 Fix hasTypeRemote not working with additional peripheral types.
Fixes #1001. Looks like the culprit was a simple typo.
2021-12-26 21:18:40 -08:00
Toad-Dev
654c7571c1 Separate custom client and server events. 2021-12-26 13:53:46 -08:00
Toad-Dev
7a50bf3979 Merge branch 'mc-1.18.x/stable' into mc-1.18.x/dev 2021-12-26 12:42:34 -08:00
Toad-Dev
1153910dc0 Merge remote-tracking branch 'CC-Tweaked/mc-1.18.x' into mc-1.18.x/dev 2021-12-26 12:39:51 -08:00
Toad-Dev
af6a240c09 Fix two bugs with monitors on dedicated server (#45).
- ClientMonitors were being created on the server. This caused a crash
when TileMonitors unload and attempt to clean up their client side
buffers because the method to do that only exists on the client. We
don't have the split semantics of load and handleUpdateTag that forge
has, so our TileMonitor#load method has to do double duty and check if
the level is client side before doing client side stuff.
- Monitor contents were never sent to clients connected to a dedicated
server because MonitorWatcher was never initialized on the dedicated
server! (My bad...) To fix, I moved its initialization to the common
setup.
2021-12-25 22:30:51 -08:00
Jonathan Coates
2b901f2d5e Merge branch 'mc-1.17.x' into mc-1.18.x 2021-12-25 08:05:25 +00:00
Jonathan Coates
62f2cd5cb2 Merge branch 'mc-1.16.x' into mc-1.17.x 2021-12-25 08:05:25 +00:00
Jonathan Coates
e558b31b2b Fix some typos in a dfpwm example 2021-12-21 22:25:16 +00:00
Jonathan Coates
afd82fbf1f Add speaker support to the documentation website
Happy to pick a different piece of audio, but this seemed like a fun one
to me.
2021-12-21 22:20:57 +00:00
Jonathan Coates
901d8d4c3b Merge branch 'mc-1.17.x' into mc-1.18.x 2021-12-21 15:15:53 +00:00
Jonathan Coates
f794ce42ab Merge branch 'mc-1.16.x' into mc-1.17.x 2021-12-21 15:10:19 +00:00
Jonathan Coates
f470478a0f Bump CC:T version to 1.100
We're still a few days away from release, but don't think anything else
is going to change. And I /really/ don't want to have to write this
changelog (and then merge into later versions) on the 25th.
2021-12-21 14:55:01 +00:00
Jonathan Coates
aa009df740 Improve fs API introduction
Again, not perfect, but better than a single sentence.
2021-12-21 14:39:08 +00:00
Jonathan Coates
0c6c0badde Move turtle docs into the Java code instead
Yeah, should have seen that coming
2021-12-21 12:00:13 +00:00
Jonathan Coates
bed2e0b658 Write an introduction to the turtle API
It's better at least, I just don't know if it's good.
2021-12-21 11:53:46 +00:00
Jonathan Coates
0f9ddac83c Copy and paste the wiki guide on require
I wrote the original, so I don't need to feel guilty :)

Closes #565.
2021-12-21 00:55:16 +00:00
Jonathan Coates
932b77d7ee Rewrite several doc introductions
Mostly focussing on rednet and modem here. Not sure if I made them any
better, we'll see!
2021-12-21 00:27:07 +00:00
Jonathan Coates
5eedea1bbb Don't push non-pushable entities
Fixes #949
2021-12-20 17:58:39 +00:00
Jonathan Coates
114261944a Tick pocket computers in item entity form
See #995. And no, just because I'm adding this doesn't mean it's not a
terrible issue.
2021-12-20 17:37:42 +00:00