mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-15 14:07:38 +00:00
Compare commits
133 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
78a685c2cb | ||
![]() |
a475f55b9c | ||
![]() |
9353ded2d5 | ||
![]() |
d197268e53 | ||
![]() |
9648265056 | ||
![]() |
264dbc570f | ||
![]() |
e4ad8bc117 | ||
![]() |
1b31972092 | ||
![]() |
6cd9fa9fb2 | ||
![]() |
d10f297ca0 | ||
![]() |
9ae5636d41 | ||
![]() |
a60daf78cf | ||
![]() |
76e0507c3b | ||
![]() |
d8e2fab2b1 | ||
![]() |
5c5e510075 | ||
![]() |
5a309258af | ||
![]() |
b0782ec38b | ||
![]() |
46846a4fde | ||
![]() |
d955443b21 | ||
![]() |
57e6c49844 | ||
![]() |
66dbab7a6b | ||
![]() |
558976e4ca | ||
![]() |
3a7470a108 | ||
![]() |
cf2b332c3c | ||
![]() |
8984ebcf80 | ||
![]() |
a28e7e2db3 | ||
![]() |
3860e2466c | ||
![]() |
5b31c2536a | ||
![]() |
98dc7a6e58 | ||
![]() |
5e0ceda7ce | ||
![]() |
7fe3ac9222 | ||
![]() |
a65b8ed04c | ||
![]() |
3e14b84c23 | ||
![]() |
1710ad9861 | ||
![]() |
9c48c99be7 | ||
![]() |
d10d1b45fe | ||
![]() |
70a1cf5c5a | ||
![]() |
b546a10bd6 | ||
![]() |
2f35bbb538 | ||
![]() |
891dde43a9 | ||
![]() |
094e0d4f33 | ||
![]() |
df40adce20 | ||
![]() |
e12ce95b2d | ||
![]() |
bcc0effd00 | ||
![]() |
64f3aa2dba | ||
![]() |
515ccfebd3 | ||
![]() |
0b6dbe7778 | ||
![]() |
19054684c6 | ||
![]() |
a72a5e6deb | ||
![]() |
eb2d9482a2 | ||
![]() |
95794fdaf3 | ||
![]() |
af477a401a | ||
![]() |
27531c161d | ||
![]() |
a8f208c394 | ||
![]() |
148d9e9dda | ||
![]() |
67fc21271b | ||
![]() |
ce28e2659a | ||
![]() |
47e4826f2b | ||
![]() |
9bde2d8d13 | ||
![]() |
46acb6866e | ||
![]() |
c0506108f9 | ||
![]() |
0dd7c3695f | ||
![]() |
2a290be248 | ||
![]() |
c4a6c16330 | ||
![]() |
f8b3b544d1 | ||
![]() |
53ae689468 | ||
![]() |
73e460e533 | ||
![]() |
a4e68d637a | ||
![]() |
1f1b20c81e | ||
![]() |
20a9ff7a3f | ||
![]() |
58cd5e3df7 | ||
![]() |
5922d7548c | ||
![]() |
386e01364e | ||
![]() |
70eff6aa63 | ||
![]() |
45ac601946 | ||
![]() |
d6c5a5bd27 | ||
![]() |
02c7903cb7 | ||
![]() |
37e856efdc | ||
![]() |
8a38097887 | ||
![]() |
884b417ec2 | ||
![]() |
1d1d6227eb | ||
![]() |
d5eb82db60 | ||
![]() |
3575654d02 | ||
![]() |
79fcc7241b | ||
![]() |
b203d3aa0a | ||
![]() |
f1176af9d1 | ||
![]() |
717686d855 | ||
![]() |
92811ca0bc | ||
![]() |
f8a58dbcb1 | ||
![]() |
98aabe2cfb | ||
![]() |
f938ed9779 | ||
![]() |
03c9274b27 | ||
![]() |
92c94ac039 | ||
![]() |
5c6fd80b0c | ||
![]() |
f1ec59df15 | ||
![]() |
624b23c7ac | ||
![]() |
9b77a4aaee | ||
![]() |
d8b0037cfa | ||
![]() |
91a9e7fdf7 | ||
![]() |
2c3573719b | ||
![]() |
46bc42d5a7 | ||
![]() |
1b9e93a80f | ||
![]() |
7b93f91ffa | ||
![]() |
31a1027401 | ||
![]() |
e0fc994819 | ||
![]() |
43408bf085 | ||
![]() |
d28f42e8b7 | ||
![]() |
ac452582c1 | ||
![]() |
7e65c6b25c | ||
![]() |
457a863842 | ||
![]() |
eef36e1358 | ||
![]() |
feda08b915 | ||
![]() |
0240ce50ce | ||
![]() |
592b83e784 | ||
![]() |
5d91491ec7 | ||
![]() |
7326d1110d | ||
![]() |
0aa6ac05a0 | ||
![]() |
27a2c063b9 | ||
![]() |
89a195ec06 | ||
![]() |
0e5fd4e8e0 | ||
![]() |
aa4ec53bb6 | ||
![]() |
6b49327462 | ||
![]() |
74ad934889 | ||
![]() |
08b3dbbad5 | ||
![]() |
54eac0a2f8 | ||
![]() |
51ca5e620c | ||
![]() |
076d572831 | ||
![]() |
75f2b91fef | ||
![]() |
79534e5630 | ||
![]() |
d483a91459 | ||
![]() |
71d764f122 | ||
![]() |
2e527eb11e | ||
![]() |
00b458c39a |
35
.github/workflows/main-ci.yml
vendored
Normal file
35
.github/workflows/main-ci.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout submodules
|
||||
run: git submodule update --init --recursive
|
||||
|
||||
- name: Set up Java 8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 8
|
||||
|
||||
- name: Cache gradle dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build --no-daemon || ./gradlew build --no-daemon
|
||||
|
||||
- name: Upload Jar
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: cc-restiched
|
||||
path: build/libs
|
5
.gitignore
vendored
5
.gitignore
vendored
@@ -9,6 +9,11 @@
|
||||
/run-*
|
||||
/test-files
|
||||
|
||||
# Autogenerated by IDE
|
||||
/bin
|
||||
/.settings
|
||||
.classpath
|
||||
|
||||
*.ipr
|
||||
*.iws
|
||||
*.iml
|
||||
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "src/main/resources/resourcepacks/overhaul"]
|
||||
path = src/main/resources/resourcepacks/overhaul
|
||||
url = https://github.com/3prm3/cc-pack
|
49
README.md
49
README.md
@@ -1,9 +1,52 @@
|
||||
# CC:Restitched Patchwork
|
||||
# This is a Work In Progress Port
|
||||
*it runs and works-ish*
|
||||
<img src="logo.png" alt="CC: Restitched" width="100%"/>
|
||||
|
||||
## Reached Parity with CC:T 1.92.0
|
||||
[](https://github.com/o-iM-nI/cc-restitched/actions "Current build status") [](https://www.curseforge.com/minecraft/mc-mods/cc-restitched-updated "Download CC: Restitched on CurseForge")
|
||||
|
||||
THis is just a quick patchwork of my attempts at getting CC:R up to date with CC:T
|
||||
This is an fork of [Zundrel/cc-tweaked-fabric](https://github.com/Zundrel/cc-tweaked-fabric) who's goal was to port [SquidDev-CC/CC-Tweaked](https://github.com/SquidDev-CC/CC-Tweaked) to fabric. I picked up maintaining the mod because the team working on Zundrel's fork, admitted they had gotten lazy so I picked it up to make it up to snuff with CC:T
|
||||
|
||||
The changelog is located at [PatchWork.md](patchwork.md)
|
||||
## Resource Packs
|
||||
This mod includes textures that are more in-line with the style of Mojang's new texture-artist, Jappa. If you prefer the original textures, enable the "Classic" resource pack provided by the mod.
|
||||
|
||||
We also have a second resourcepack made by [3prm3](https://github.com/3prm3), it features a complete overhaul and can be enabled by enabling the `overhaul` resource pack, go check out his resource pack over here!
|
||||
|
||||
<img src="https://raw.githubusercontent.com/3prm3/cc-pack/main/pack.png" alt="CC: Restitched" width="16" height="16"/> [3prm3/cc-pack](https://github.com/3prm3/cc-pack/)
|
||||
|
||||
## Contributing
|
||||
Any contribution is welcome, be that using the mod, reporting bugs or contributing code. In order to start helping develop CC:R there are a few rules
|
||||
1) Any updates that port commits from CC:T, ***MUST*** follow the format defined in [patchwork.md](patchwork.md) otherwise they will not be accepted,
|
||||
* Commit Message must be the same as it is in CC:T,
|
||||
* patchwork.md must be updated in the following format
|
||||
> Comments, optional but useful if you had to do something differently than in CC:T (outside of Fabric/forge differences
|
||||
>
|
||||
> \`\`\`
|
||||
>
|
||||
>commitID
|
||||
>
|
||||
> commit title
|
||||
>
|
||||
> commit desc
|
||||
>
|
||||
> \`\`\`
|
||||
2) Follow the fabirc programming guidelines as close as possible. This means you have to use `loom` mappings,
|
||||
3) You cannot intentionally implement bugs and security vulnerabilities
|
||||
4) Unless the commit is a "patchwork" compliant commit, (IE: taken from CC:T), the lua code is off limits,s
|
||||
## Bleeding Edge Builds
|
||||
Bleeding edge builds can be found [here](https://github.com/Merith-TK/cc-restitched/actions) at github actions to simplify things
|
||||
|
||||
## Community
|
||||
If you need help getting started with CC: Tweaked, want to show off your latest project, or just want to chat about ComputerCraft, here is the [Forum](https://forums.computercraft.cc/) and the [Discord](https://discord.gg/H2UyJXe)
|
||||
|
||||
## Known Issues
|
||||
Main Known issue
|
||||
* Mods that add blocks that can be used as peripherals for CC:T On forge, dont work with CC:R.
|
||||
* This is because of the differences between forge and fabric, and that mod devs, to my knowledge have not agreed upon a standard method in which to implement cross compatibility between mods,
|
||||
* [Fixed (d10f297c): please report if bug persists]</br> ~~Storage Peripherals throw a java "StackOverflowError" when using `pushItems()`,~~
|
||||
* ~~Work around, you are probably using `pushItems(chest, 1)` or similar. please use `pushItems(chest, 1, nil, 1)`.~~
|
||||
|
||||
## Known Working mods that add Peripherals
|
||||
* Please let me know of other mods that work with this one
|
||||
* Better End
|
||||
* Better Nether
|
||||
|
16
build.gradle
16
build.gradle
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.5-SNAPSHOT'
|
||||
id 'fabric-loom' version '0.6-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
@@ -9,10 +9,11 @@ targetCompatibility = JavaVersion.VERSION_1_8
|
||||
version = mod_version
|
||||
|
||||
group = "dan200.computercraft"
|
||||
archivesBaseName = "cc-tweaked-fabric-${mc_version}"
|
||||
archivesBaseName = "cc-restiched"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
name "SquidDev"
|
||||
url "https://squiddev.cc/maven"
|
||||
@@ -29,6 +30,8 @@ dependencies {
|
||||
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}"
|
||||
|
||||
compile 'com.electronwill.night-config:json:3.6.0'
|
||||
|
||||
modImplementation "me.shedaniel.cloth:config-2:${cloth_config_version}"
|
||||
modImplementation "io.github.prospector:modmenu:${modmenu_version}"
|
||||
|
||||
@@ -49,11 +52,12 @@ dependencies {
|
||||
|
||||
shade 'org.squiddev:Cobalt:0.5.1-SNAPSHOT'
|
||||
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.7.0'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
|
||||
|
||||
modRuntime "me.shedaniel:RoughlyEnoughItems-api:5.2.10"
|
||||
modRuntime "me.shedaniel:RoughlyEnoughItems:5.2.10"
|
||||
modRuntime "me.shedaniel:RoughlyEnoughItems-api:5.8.9"
|
||||
modRuntime "me.shedaniel:RoughlyEnoughItems:5.8.9"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
@@ -2,16 +2,16 @@
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
# Mod properties
|
||||
mod_version=1.92.0
|
||||
mod_version=1.95.3-beta
|
||||
|
||||
# Minecraft properties
|
||||
mc_version=1.16.3
|
||||
mappings_version=31
|
||||
mc_version=1.16.5
|
||||
mappings_version=9
|
||||
|
||||
# Dependencies
|
||||
cloth_config_version=4.8.1
|
||||
fabric_api_version=0.19.0+build.398-1.16
|
||||
fabric_loader_version=0.9.2+build.206
|
||||
fabric_loader_version=0.11.3
|
||||
fabric_api_version=0.32.0+1.16
|
||||
jankson_version=1.2.0
|
||||
modmenu_version=1.14.6+
|
||||
cloth_api_version=1.4.5
|
||||
|
BIN
logo.png
BIN
logo.png
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 5.2 KiB |
583
patchwork.md
583
patchwork.md
@@ -9,7 +9,11 @@ SubScript // Desc of commit
|
||||
```
|
||||
|
||||
If a edit that is present in CC:T is not needed, I will skip over it.
|
||||
Any and all references to an issue number, are to be found on CC:T's repo. not this oen
|
||||
Any and all references to an issue number, are to be found on CC:T's repo.
|
||||
|
||||
Any commit that starts with `[Patchwork]` are purely edits made by my hand, and not based on other commits from CC:T, this is to help differentiate my changes from the official changes
|
||||
|
||||
Lines that are found above a commit in this log like this one, (excluding this one) are comments about how i had to implement things that are not a simple 1:1 (excluding fabric/forge differences) conversion
|
||||
|
||||
```md
|
||||
5155e18de279a193c558aa029963486fd1294769
|
||||
@@ -45,4 +49,579 @@ Update to Minecraft 1.16.3
|
||||
I hope the Fabric folks now realise this is gonna be a race of who can
|
||||
update first :p. Either way, this was a very easy update - only changes
|
||||
were due to unrelated Forge changes.
|
||||
```
|
||||
```
|
||||
|
||||
```
|
||||
87393e8aef9ddfaca465d626ee7cff5ff499a7e8
|
||||
Fix additional `-` in docs
|
||||
|
||||
Why isn't this automatically stripped! Bad squid.
|
||||
```
|
||||
|
||||
```
|
||||
275ca58a82c627128a145a8754cbe32568536bd9
|
||||
HTTP rules now allow filtering by port
|
||||
|
||||
The HTTP filtering system becomes even more complex! Though in this
|
||||
case, it's pretty minimal, and definitely worth doing.
|
||||
|
||||
For instance, the following rule will allow connecting to localhost on
|
||||
port :8080.
|
||||
|
||||
[[http.rules]]
|
||||
host = "127.0.0.1"
|
||||
port = 8080
|
||||
action = "allow"
|
||||
|
||||
# Other rules as before.
|
||||
|
||||
Closes #540
|
||||
```
|
||||
|
||||
The alterations in ColourUtils.java were not needed so they were not ported over
|
||||
```
|
||||
6f868849ab2f264508e12c184cc56f2632aaf5bc
|
||||
Use tags to check if something is a dye
|
||||
|
||||
We half did this already, just needed to change a couple of checks.
|
||||
Closes #541.
|
||||
```
|
||||
|
||||
```
|
||||
6cee4efcd3610536ee74330cd728f7371011e5a8
|
||||
Fix incorrect open container check
|
||||
|
||||
Was this always broken, or did it happen in a Minecraft update? Don't
|
||||
know, but it's a very silly mistake either way. Fixes #544
|
||||
```
|
||||
|
||||
```
|
||||
0832974725b2478c5227b81f82c35bbf03cf6aba
|
||||
Translations for Swedish
|
||||
|
||||
Co-authored-by: David Isaksson <davidisaksson93@gmail.com>
|
||||
```
|
||||
|
||||
```
|
||||
84036d97d99efd8762e0170002060ae3471508bf
|
||||
Fix io.open documentation
|
||||
|
||||
Well, that was silly.
|
||||
```
|
||||
|
||||
I set the default properties for computers as `Block.GLASS` and then set their strength to `2F` and their soundgroup to stone
|
||||
```
|
||||
8472112fc1eaad18ed6ed2c6c62b040fe421e81a
|
||||
Don't propagate adjacent redstone signals for computers (#549)
|
||||
|
||||
Minecraft propagates "strong" redstone signals (such as those directly
|
||||
from comparators or repeaters) through solid blocks. This includes
|
||||
computers, which is a little annoying as it means one cannot feed
|
||||
redstone wire from one side and a repeater from another.
|
||||
|
||||
This changes computers to not propagate strong redstone signals, in the
|
||||
same way transparent blocks like glass do.
|
||||
|
||||
Closes #548.
|
||||
```
|
||||
|
||||
```
|
||||
30d35883b83831900b34040f0131c7e06f5c3e52
|
||||
Fix my docs
|
||||
|
||||
Thanks @plt-hokusai. Kinda embarrassing this slipped through - I
|
||||
evidently need to lint examples too.
|
||||
```
|
||||
|
||||
```
|
||||
34a2c835d412c0d9e1fb20a42b7f2cd2738289c7
|
||||
Add color table to docs (#553)
|
||||
```
|
||||
|
||||
All API Documentation updates,
|
||||
`Not Needed` for this repo.
|
||||
```
|
||||
93068402a2ffec00eedb8fe2d859ebdc005a1989
|
||||
Document remaining OS functions (#554)
|
||||
|
||||
01d81cb91da938836f953b290ad6b8fc87cb7e35
|
||||
Update illuaminate CSS for deprecation (#556)
|
||||
```
|
||||
|
||||
```
|
||||
Not Needed
|
||||
4766833cf2d041ed179529eecb9402ad09b2b79b
|
||||
Bump JEI/crafttweaker versions
|
||||
|
||||
In my defence, they weren't out when I started the 1.15 update.
|
||||
```
|
||||
|
||||
```
|
||||
bf6053906dc6a3c7b0d40d5b097e745dce1f33bc
|
||||
Fix TBO norm issues on old GPUs
|
||||
```
|
||||
|
||||
```
|
||||
Not Needed
|
||||
113b560a201dbdea9de2a2ef536bcce1d6e51978
|
||||
Update configuration to match latest illuaminate
|
||||
|
||||
Ooooooh, it's all fancy now. Well, that or horrifically broken.
|
||||
```
|
||||
|
||||
```
|
||||
c334423d42ba3b653ac3a8c27bce7970457f8f96
|
||||
Add function to get window visibility
|
||||
|
||||
Closes #562
|
||||
|
||||
Co-authored-by: devomaa <lmao@distruzione.org>
|
||||
```
|
||||
|
||||
[WARN] Could not implement changes to the following files
|
||||
* `src/main/java/dan200/computercraft/ComputerCraft.java` < Structure too different, cannot find equivalent to alter
|
||||
* `src/main/java/dan200/computercraft/shared/Config.java` < Files Does not exist in this repo
|
||||
```
|
||||
84a6bb1cf3b0668ddc7d8c409a2477a42390e3f7
|
||||
Make generic peripherals on by default
|
||||
|
||||
This is a long way away from "feature complete" as it were. However,
|
||||
it's definitely at a point where it's suitable for general usage - I'm
|
||||
happy with the API, and don't think I'm going to be breaking things any
|
||||
time soon.
|
||||
|
||||
That said, things aren't exposed yet for Java-side public consumption. I
|
||||
was kinda waiting until working on Plethora to actually do that, but not
|
||||
sure if/when that'll happen.
|
||||
|
||||
If someone else wants to work on an integration mod (or just adding
|
||||
integrations for their own mod), do get in touch and I can work out how
|
||||
to expose this.
|
||||
|
||||
Closes #452
|
||||
```
|
||||
|
||||
```
|
||||
Not Needed
|
||||
6aae4e576621090840724e094aa25e51696530fc
|
||||
Remove superfluous imports
|
||||
|
||||
Hah, this is embarassing
|
||||
```
|
||||
|
||||
[TODO] [M3R1-01] Code has been applied, players still dont get achievments
|
||||
```
|
||||
f6160bdc57b3d9850607c2c7c2ce9734b4963478
|
||||
Fix players not getting advancements when they own turtles
|
||||
|
||||
When we construct a new ServerPlayerEntity (and thus TurtlePlayer), we
|
||||
get the current (global) advancement state and call .setPlayer() on it.
|
||||
|
||||
As grantCriterion blocks FakePlayers from getting advancements, this
|
||||
means a player will no longer receive any advancements, as the "wrong"
|
||||
player object is being consulted.
|
||||
|
||||
As a temporary work around, we attempt to restore the previous player to
|
||||
the advancement store. I'll try to upstream something into Forge to
|
||||
resolve this properly.
|
||||
|
||||
Fixes #564
|
||||
```
|
||||
|
||||
```
|
||||
17a932920711a5c0361a5048c9e0a5e7a58e6364
|
||||
Bump cct-javadoc version
|
||||
|
||||
Documentation will now be sorted (somewhat) correctly!
|
||||
```
|
||||
|
||||
```
|
||||
a6fcfb6af2fc1bef8ca3a19122c9267549202424
|
||||
Draw in-hand pocket computers with blending
|
||||
|
||||
It might be worth switching to RenderTypes here, rather than a pure
|
||||
Tesselator, but this'll do for now.
|
||||
|
||||
Fixes Zundrel/cc-tweaked-fabric#20.
|
||||
```
|
||||
|
||||
```
|
||||
c58441b29c3715f092e7f3747bb3ec65ae5a3d29
|
||||
Various SNBT parsing improvements
|
||||
|
||||
Correctly handle:
|
||||
- Typed arrays ([I; 1, 2, 3])
|
||||
- All suffixed numbers (1.2d)
|
||||
- Single-quoted strings
|
||||
|
||||
Fixes #559
|
||||
```
|
||||
|
||||
```
|
||||
e2a635b6e5f5942f999213434054e06833c5cb06
|
||||
Dont fail when codecov is being finicky
|
||||
```
|
||||
|
||||
```
|
||||
666e83cf4fd0eb327f465d5b919a708790f99b00
|
||||
Fix JSON objects failing to pass
|
||||
|
||||
Maybe I should run the whole test suite, not just the things I think
|
||||
matter? Nah....
|
||||
```
|
||||
|
||||
```
|
||||
741adfa7bb2b950d2851c3f0072d6a4769f22773
|
||||
|
||||
Use blit to draw boxes, add colors.toBlit (#570)
|
||||
```
|
||||
|
||||
```
|
||||
d13bd2cce8d102ad7f61f557e707d6fe3731bc37
|
||||
|
||||
use arg[0] in all usage printouts (#571)
|
||||
```
|
||||
|
||||
```
|
||||
74ac5bb3d17e5bee30643a5d6702696600c06229
|
||||
|
||||
Bump to 1.94.0
|
||||
```
|
||||
|
||||
[TODO] [M3R1-02] Zero Clue how to reimplement this in fabric.
|
||||
```
|
||||
c8aeddedd4ed430f9cb6428676ebb4fa39834182
|
||||
|
||||
Auto-generate monitor models
|
||||
|
||||
I didn't think it was worth it, and then I found myself needing to
|
||||
update a dozen of them. The code isn't especially pretty, but it works,
|
||||
so that's fine.
|
||||
|
||||
Also fixes several issues with us using the wrong texture (closes #572).
|
||||
I've put together a wiki page[1] which describes each texture in a
|
||||
little more detail.
|
||||
|
||||
[1] https://github.com/SquidDev-CC/CC-Tweaked/wiki/Monitor-texture-reference
|
||||
```
|
||||
|
||||
```
|
||||
7f90f2f7cadce0d5b9177b16626979591bce8137
|
||||
|
||||
Clean up some examples a little bit
|
||||
|
||||
Would be good if they didn't crash and burn on entry :).
|
||||
```
|
||||
|
||||
```
|
||||
f194f4fa3a17c48ff1a9088d50063f4a675a23b6
|
||||
|
||||
Fix epoch documentation to use milliseconds (#580)
|
||||
```
|
||||
|
||||
```
|
||||
d2a1a00dc43e5b65f6b64111ce76dd3db16c919f
|
||||
|
||||
Clear gets an option to reset the palette (#582)
|
||||
|
||||
Fixes #555.
|
||||
```
|
||||
|
||||
```
|
||||
aab0cd34cd64fdf837ff1c3b91a957a25c2cf7f9
|
||||
|
||||
Use term.blit on original paint render
|
||||
|
||||
This makes it super speedy, meaning an initial refresh doesn't take ages
|
||||
to load.
|
||||
```
|
||||
|
||||
```
|
||||
b0651082f472baee8f0fa8ec7ba95f433e2637bb
|
||||
|
||||
Cleanup examples for the various modules
|
||||
```
|
||||
|
||||
Ignored Documentation Changes, these are locate
|
||||
|
||||
```
|
||||
9a749642d294506095e697a3a4345dfe260bd68c
|
||||
|
||||
Strict Globals (#583)
|
||||
```
|
||||
|
||||
```
|
||||
fff8353451451be5ae31e0f63d8e529b127fd186
|
||||
|
||||
Remove extra space (#586)
|
||||
```
|
||||
|
||||
```
|
||||
486f41f08286ddcfad91d72b83a9361bd9c215cb
|
||||
|
||||
Fixed length check on function name in `expect` (#589)
|
||||
```
|
||||
|
||||
```
|
||||
04f9644ae75dafc72da4c4790f334d2e90b03e6f
|
||||
|
||||
Allow strings or numbers in textutils.*tabulate
|
||||
|
||||
A little dubious, but apparently CC used to support it. This means we're
|
||||
consistent with methods like io.write or string.len which accept strings
|
||||
or numbers.
|
||||
|
||||
Fixes #591
|
||||
```
|
||||
|
||||
```
|
||||
d4199064ae5ae8023c589f80f12d94e1c6bbc2b5
|
||||
|
||||
Make fs.combine accept multiple arguments
|
||||
|
||||
Means we can now do fs.combine("a", "b", "c"). Of course, one may just
|
||||
write "a/b/c" in this case, but it's definitely useful elsewhere.
|
||||
|
||||
This is /technically/ a breaking change as fs.combine(a, b:gsub(...))
|
||||
will no longer function (as gsub returns multiple arguments). However,
|
||||
I've done a quick search through GH and my Pastebin archives and can't
|
||||
find any programs which would break. Fingers crossed.
|
||||
```
|
||||
|
||||
```
|
||||
24af36743d08fcdb58439c52bf587b33ed828263
|
||||
|
||||
Try to handle a turtle being broken while ticked
|
||||
|
||||
Hopefully fixes #585. Hopefully.
|
||||
```
|
||||
|
||||
```
|
||||
511eea39a11956c82e2c11a47b2e7cad27f9887e
|
||||
|
||||
Remove <!-- -->s in usages
|
||||
```
|
||||
|
||||
```
|
||||
826797cbd579e867f0f35f0be44b6a28c8c094a9
|
||||
|
||||
Added documentation for global functions (#592)
|
||||
```
|
||||
Didn't port the docs over.
|
||||
|
||||
```
|
||||
d83a68f3ff6e3833278a38798d06215293656e85
|
||||
|
||||
Allow $private HTTP rule to block any private IP
|
||||
```
|
||||
The config still uses a `blacklist` and `whitelist` array.
|
||||
|
||||
```
|
||||
24d3777722812f975d2bc4594437fbbb0431d910
|
||||
|
||||
Added improved help viewer (#595)
|
||||
```
|
||||
Didn't port the lua tests over.
|
||||
|
||||
```
|
||||
737b3cb57696fb5517252e7db38bc88ce960b4d8
|
||||
|
||||
Don't use capabilities for generic peripherals
|
||||
```
|
||||
Not ported, related to forges capability system which is not used in the port.
|
||||
|
||||
```
|
||||
ea3a16036794357c3a44edffc90fdb652e03881e
|
||||
|
||||
Remove a couple of todos
|
||||
```
|
||||
|
||||
```
|
||||
bb8f4c624bf87169b73fb631d8250cfc38181e15
|
||||
|
||||
Some sanity checks for get{Direction,Orientation}
|
||||
```
|
||||
Use `getCachedState` instead of forge's `getBlockState` and `contains` instead of `has`.
|
||||
|
||||
```
|
||||
05c3c8ad3269c9025757f9261e7f609889fb6bdc
|
||||
|
||||
Generate docs for generic peripherals
|
||||
```
|
||||
Skipped everything except some removed whitespace.
|
||||
|
||||
```
|
||||
85cf2d5ff1b63010de4661301801aa504e5b9015
|
||||
|
||||
Docs for energy and inventory methods
|
||||
```
|
||||
and
|
||||
```
|
||||
5865e9c41a0140b9f1acdd2fb095353c467fbb45
|
||||
|
||||
Not sure what irritates me more
|
||||
```
|
||||
both skipped because the changes where already ported.
|
||||
|
||||
```
|
||||
4ae370b9dbaf1de0ed32a5f32340b1448136c9cc
|
||||
|
||||
Merge pull request #606 from TheWireLord/numpadenter-support
|
||||
```
|
||||
Just lua changes.
|
||||
|
||||
```
|
||||
f5eb6ce03e0d9bbbf77130452afd4b49e758f7bd
|
||||
|
||||
Fix copy-paste error in inventory docs
|
||||
```
|
||||
Skipped because it was already ported.
|
||||
|
||||
```
|
||||
663859d2e5a97edefebf9ac36206903d7dd33a3e
|
||||
Fix double URL decode
|
||||
```
|
||||
|
||||
```
|
||||
abf425dfb5553483cdc51c50a6b7d8b5e44814f4
|
||||
|
||||
Fix overflow in os.epoch
|
||||
```
|
||||
|
||||
```
|
||||
e3a672099c1b5d2c06f9fe4d8ccd024fef0873a2
|
||||
|
||||
Fix JEI integration with turtle/pocket upgrades
|
||||
```
|
||||
Skipped because there seems to be no REI integration.
|
||||
|
||||
```
|
||||
2f0cae0bc1b038ac092bafa7f65a317537203cd8
|
||||
|
||||
Make upgrade recipe requirements a little more lax
|
||||
```
|
||||
[TODO] [JUMT-01] Crafting is still messed up, but this port didn't change the behavior.
|
||||
[TODO] [JUMT-02] Tag comparison code doesn't need to be that verbose, a simple `isEqual` check would suffice.
|
||||
|
||||
```
|
||||
7f9a707f75636d5816f752dc93d7b6b998c61a03
|
||||
|
||||
Bump version to 1.95.0
|
||||
```
|
||||
Changed the name from CC: Tweaked to CC: Restitched in the changelog and whatsnew files. New version is 1.95.0-beta.
|
||||
|
||||
```
|
||||
4af5bcc0b0ff464e7e7428c389d47140580ea7a7
|
||||
|
||||
Fix serveral 1.15 -> 1.16 issues
|
||||
```
|
||||
Skipped, changes where already made.
|
||||
|
||||
```
|
||||
b8d5a89446ac02fc5b38cc5c0b4805de9d11a7d5
|
||||
|
||||
Add explicit @module annotation
|
||||
```
|
||||
Tiny lua change.
|
||||
|
||||
```
|
||||
8b17ec76a8e94251803e6f4ba4e65970c6a70b7f
|
||||
|
||||
Fixed missing argument names in file handle docs (#632)
|
||||
```
|
||||
A java doc change.
|
||||
|
||||
```
|
||||
e4b0a5b3ce035eb23feb4191432fc49af5772c5b
|
||||
|
||||
2020 -> 2021
|
||||
```
|
||||
A huge amount of changes.
|
||||
|
||||
```
|
||||
542b66c79a9b08e080c39c9a73d74ffe71c0106a
|
||||
|
||||
Add back command computer block drops
|
||||
```
|
||||
Didn't port some forge-related changes, but it works.
|
||||
|
||||
```
|
||||
dd6f97622e6c18ce0d8988da6a5bede45c94ca5d
|
||||
|
||||
Prevent reflection errors crashing the game
|
||||
```
|
||||
|
||||
```
|
||||
92be0126df63927d07fc695945f8b98e328f945a
|
||||
|
||||
Fix disk recipes
|
||||
```
|
||||
Dye recipes actually work now.
|
||||
|
||||
```
|
||||
1edb7288b974aec3764b0a820edce7e9eee38e66
|
||||
|
||||
Merge branch 'mc-1.15.x' into mc-1.16.x
|
||||
```
|
||||
New version: 1.95.1.
|
||||
|
||||
```
|
||||
41226371f3b5fd35f48b6d39c2e8e0c277125b21
|
||||
|
||||
Add isReadOnly to fs.attributes (#639)
|
||||
```
|
||||
Also changed some lua test files, but made the changes anyway.
|
||||
|
||||
```
|
||||
b2e54014869fac4b819b01b6c24e550ca113ce8a
|
||||
|
||||
Added Numpad Enter Support in rom lua programs. (#657)
|
||||
```
|
||||
Just lua changes.
|
||||
|
||||
```
|
||||
247c05305d106af430fcdaee41371a152bf7c38c
|
||||
|
||||
Fix problem with RepeatArgumentType
|
||||
```
|
||||
|
||||
```
|
||||
c864576619751077a0d8ac1a18123e14b095ec03
|
||||
|
||||
Fix impostor recipes for disks
|
||||
```
|
||||
[TODO] [JUMT-03] REI still shows white disks, probably because it doesn' show nbt items.
|
||||
|
||||
```
|
||||
c5694ea9661c7a40021ebd280c378bd7bdc56988
|
||||
|
||||
Merge branch 'mc-1.15.x' into mc-1.16.x
|
||||
```
|
||||
Update to 1.16.4.
|
||||
|
||||
```
|
||||
1f84480a80677cfaaf19d319290f5b44635eba47
|
||||
|
||||
Make rightAlt only close menu, never open it. (#672)
|
||||
```
|
||||
Lua changes.
|
||||
|
||||
```
|
||||
1255bd00fd21247a50046020d7d9a396f66bc6bd
|
||||
|
||||
Fix mounts being usable after a disk is ejected
|
||||
```
|
||||
Reverted a lot of code style changes made by Zundrel, so the diffs are huge.
|
||||
|
||||
```
|
||||
b90611b4b4c176ec1c80df002cc4ac36aa0c4dc8
|
||||
|
||||
Preserve registration order of upgrades
|
||||
```
|
||||
Again, a huge diff because of code style changes.
|
||||
|
||||
```
|
||||
8494ba8ce29cd8d7b9105eef497fe3fe3f89d350
|
||||
|
||||
Improve UX when a resource mount cannot be found
|
||||
```
|
||||
|
@@ -9,4 +9,4 @@ pluginManagement {
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "cc-tweaked-fabric-${mc_version}"
|
||||
rootProject.name = "cc-restiched"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
@@ -10,12 +10,12 @@ import static dan200.computercraft.shared.ComputerCraftRegistry.ModBlocks;
|
||||
import static dan200.computercraft.shared.ComputerCraftRegistry.init;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
||||
import dan200.computercraft.api.turtle.event.TurtleAction;
|
||||
import dan200.computercraft.core.apis.http.options.Action;
|
||||
@@ -32,20 +32,10 @@ import dan200.computercraft.shared.data.PlayerCreativeLootCondition;
|
||||
import dan200.computercraft.shared.media.recipes.DiskRecipe;
|
||||
import dan200.computercraft.shared.media.recipes.PrintoutRecipe;
|
||||
import dan200.computercraft.shared.peripheral.monitor.MonitorRenderer;
|
||||
import dan200.computercraft.shared.pocket.peripherals.PocketModem;
|
||||
import dan200.computercraft.shared.pocket.peripherals.PocketSpeaker;
|
||||
import dan200.computercraft.shared.pocket.recipes.PocketComputerUpgradeRecipe;
|
||||
import dan200.computercraft.shared.proxy.ComputerCraftProxyCommon;
|
||||
import dan200.computercraft.shared.turtle.recipes.TurtleRecipe;
|
||||
import dan200.computercraft.shared.turtle.recipes.TurtleUpgradeRecipe;
|
||||
import dan200.computercraft.shared.turtle.upgrades.TurtleAxe;
|
||||
import dan200.computercraft.shared.turtle.upgrades.TurtleCraftingTable;
|
||||
import dan200.computercraft.shared.turtle.upgrades.TurtleHoe;
|
||||
import dan200.computercraft.shared.turtle.upgrades.TurtleModem;
|
||||
import dan200.computercraft.shared.turtle.upgrades.TurtleShovel;
|
||||
import dan200.computercraft.shared.turtle.upgrades.TurtleSpeaker;
|
||||
import dan200.computercraft.shared.turtle.upgrades.TurtleSword;
|
||||
import dan200.computercraft.shared.turtle.upgrades.TurtleTool;
|
||||
import dan200.computercraft.shared.util.Config;
|
||||
import dan200.computercraft.shared.util.ImpostorRecipe;
|
||||
import dan200.computercraft.shared.util.ImpostorShapelessRecipe;
|
||||
@@ -60,20 +50,13 @@ import net.minecraft.util.registry.Registry;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
|
||||
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
|
||||
import net.fabricmc.fabric.api.resource.ResourcePackActivationType;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
||||
public final class ComputerCraft implements ModInitializer {
|
||||
public static final String MOD_ID = "computercraft";
|
||||
// Configuration options
|
||||
public static final String[] DEFAULT_HTTP_WHITELIST = new String[] {"*"};
|
||||
public static final String[] DEFAULT_HTTP_BLACKLIST = new String[] {
|
||||
"127.0.0.0/8",
|
||||
"10.0.0.0/8",
|
||||
"172.16.0.0/12",
|
||||
"192.168.0.0/16",
|
||||
"fd00::/8",
|
||||
"0.0.0.0/8"
|
||||
};
|
||||
public static final int terminalWidth_computer = 51;
|
||||
public static final int terminalHeight_computer = 19;
|
||||
public static final int terminalWidth_turtle = 39;
|
||||
@@ -122,17 +105,10 @@ public final class ComputerCraft implements ModInitializer {
|
||||
public static int monitorHeight = 6;
|
||||
public static double monitorDistanceSq = 4096;
|
||||
|
||||
public static List<AddressRule> httpRules = buildHttpRulesFromConfig(DEFAULT_HTTP_BLACKLIST, DEFAULT_HTTP_WHITELIST);
|
||||
|
||||
public static List<AddressRule> buildHttpRulesFromConfig(String[] blacklist, String[] whitelist) {
|
||||
return Stream.concat(Stream.of(blacklist)
|
||||
.map(x -> AddressRule.parse(x, Action.DENY.toPartial()))
|
||||
.filter(Objects::nonNull),
|
||||
Stream.of(whitelist)
|
||||
.map(x -> AddressRule.parse(x, Action.ALLOW.toPartial()))
|
||||
.filter(Objects::nonNull))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
public static List<AddressRule> httpRules = Collections.unmodifiableList( Arrays.asList(
|
||||
AddressRule.parse( "$private", null, Action.DENY.toPartial() ),
|
||||
AddressRule.parse( "*", null, Action.ALLOW.toPartial() )
|
||||
) );
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
@@ -157,6 +133,10 @@ public final class ComputerCraft implements ModInitializer {
|
||||
Registry.register(Registry.LOOT_CONDITION_TYPE, new Identifier(ComputerCraft.MOD_ID, "has_id"), HasComputerIdLootCondition.TYPE);
|
||||
init();
|
||||
GenericSource.setup( () -> ServiceUtil.loadServices( GenericSource.class ));
|
||||
FabricLoader.getInstance().getModContainer(MOD_ID).ifPresent(modContainer -> {
|
||||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier(MOD_ID, "classic"), modContainer, ResourcePackActivationType.NORMAL);
|
||||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier(MOD_ID, "overhaul"), modContainer, ResourcePackActivationType.NORMAL);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
@@ -108,7 +108,10 @@ public final class ComputerCraftAPI {
|
||||
* Use in conjunction with {@link IComputerAccess#mount} or {@link IComputerAccess#mountWritable} to mount a resource folder onto a computer's file
|
||||
* system.
|
||||
*
|
||||
* The files in this mount will be a combination of files in all mod jar, and data packs that contain resources with the same domain and path.
|
||||
* The files in this mount will be a combination of files in all mod jar, and data packs that contain
|
||||
* resources with the same domain and path. For instance, ComputerCraft's resources are stored in
|
||||
* "/data/computercraft/lua/rom". We construct a mount for that with
|
||||
* {@code createResourceMount("computercraft", "lua/rom")}.
|
||||
*
|
||||
* @param domain The domain under which to look for resources. eg: "mymod".
|
||||
* @param subPath The subPath under which to look for resources. eg: "lua/myfiles".
|
||||
|
86
src/main/java/dan200/computercraft/api/IUpgradeBase.java
Normal file
86
src/main/java/dan200/computercraft/api/IUpgradeBase.java
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
package dan200.computercraft.api;
|
||||
|
||||
import dan200.computercraft.api.pocket.IPocketUpgrade;
|
||||
import dan200.computercraft.api.turtle.ITurtleUpgrade;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Common functionality between {@link ITurtleUpgrade} and {@link IPocketUpgrade}.
|
||||
*/
|
||||
public interface IUpgradeBase
|
||||
{
|
||||
/**
|
||||
* Gets a unique identifier representing this type of turtle upgrade. eg: "computercraft:wireless_modem"
|
||||
* or "my_mod:my_upgrade".
|
||||
*
|
||||
* You should use a unique resource domain to ensure this upgrade is uniquely identified.
|
||||
* The upgrade will fail registration if an already used ID is specified.
|
||||
*
|
||||
* @return The unique ID for this upgrade.
|
||||
*/
|
||||
@Nonnull
|
||||
Identifier getUpgradeID();
|
||||
|
||||
/**
|
||||
* Return an unlocalised string to describe this type of computer in item names.
|
||||
*
|
||||
* Examples of built-in adjectives are "Wireless", "Mining" and "Crafty".
|
||||
*
|
||||
* @return The localisation key for this upgrade's adjective.
|
||||
*/
|
||||
@Nonnull
|
||||
String getUnlocalisedAdjective();
|
||||
|
||||
/**
|
||||
* Return an item stack representing the type of item that a computer must be crafted
|
||||
* with to create a version which holds this upgrade. This item stack is also used
|
||||
* to determine the upgrade given by {@code turtle.equipLeft()} or {@code pocket.equipBack()}
|
||||
*
|
||||
* This should be constant over a session (or at least a datapack reload). It is recommended
|
||||
* that you cache the stack too, in order to prevent constructing it every time the method
|
||||
* is called.
|
||||
*
|
||||
* @return The item stack to craft with, or {@link ItemStack#EMPTY} if it cannot be crafted.
|
||||
*/
|
||||
@Nonnull
|
||||
ItemStack getCraftingItem();
|
||||
|
||||
/**
|
||||
* Determine if an item is suitable for being used for this upgrade.
|
||||
*
|
||||
* When un-equipping an upgrade, we return {@link #getCraftingItem()} rather than
|
||||
* the original stack. In order to prevent people losing items with enchantments (or
|
||||
* repairing items with non-0 damage), we impose additional checks on the item.
|
||||
*
|
||||
* The default check requires that any non-capability NBT is exactly the same as the
|
||||
* crafting item, but this may be relaxed for your upgrade.
|
||||
*
|
||||
* @param stack The stack to check. This is guaranteed to be non-empty and have the same item as
|
||||
* {@link #getCraftingItem()}.
|
||||
* @return If this stack may be used to equip this upgrade.
|
||||
* @see net.minecraftforge.common.crafting.NBTIngredient#test(ItemStack) For the implementation of the default
|
||||
* check.
|
||||
*/
|
||||
default boolean isItemSuitable( @Nonnull ItemStack stack )
|
||||
{
|
||||
ItemStack crafting = getCraftingItem();
|
||||
|
||||
// A more expanded form of ItemStack.areShareTagsEqual, but allowing an empty tag to be equal to a
|
||||
// null one.
|
||||
CompoundTag shareTag = stack.getTag();
|
||||
CompoundTag craftingShareTag = crafting.getTag();
|
||||
if( shareTag == craftingShareTag ) return true;
|
||||
if( shareTag == null ) return craftingShareTag.isEmpty();
|
||||
if( craftingShareTag == null ) return shareTag.isEmpty();
|
||||
return shareTag.equals( craftingShareTag );
|
||||
}
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
@@ -10,56 +10,18 @@ import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import dan200.computercraft.api.ComputerCraftAPI;
|
||||
import dan200.computercraft.api.IUpgradeBase;
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import dan200.computercraft.api.turtle.ITurtleUpgrade;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* Additional peripherals for pocket computers.
|
||||
*
|
||||
* This is similar to {@link ITurtleUpgrade}.
|
||||
* @see ComputerCraftAPI#registerPocketUpgrade(IPocketUpgrade)
|
||||
*/
|
||||
public interface IPocketUpgrade {
|
||||
|
||||
/**
|
||||
* Gets a unique identifier representing this type of turtle upgrade. eg: "computercraft:wireless_modem" or "my_mod:my_upgrade".
|
||||
*
|
||||
* You should use a unique resource domain to ensure this upgrade is uniquely identified. The upgrade will fail registration if an already used ID is
|
||||
* specified.
|
||||
*
|
||||
* @return The upgrade's id.
|
||||
* @see IPocketUpgrade#getUpgradeID()
|
||||
* @see ComputerCraftAPI#registerPocketUpgrade(IPocketUpgrade)
|
||||
*/
|
||||
@Nonnull
|
||||
Identifier getUpgradeID();
|
||||
|
||||
/**
|
||||
* Return an unlocalised string to describe the type of pocket computer this upgrade provides.
|
||||
*
|
||||
* An example of a built-in adjectives is "Wireless" - this is converted to "Wireless Pocket Computer".
|
||||
*
|
||||
* @return The unlocalised adjective.
|
||||
* @see ITurtleUpgrade#getUnlocalisedAdjective()
|
||||
*/
|
||||
@Nonnull
|
||||
String getUnlocalisedAdjective();
|
||||
|
||||
/**
|
||||
* Return an item stack representing the type of item that a pocket computer must be crafted with to create a pocket computer which holds this upgrade.
|
||||
* This item stack is also used to determine the upgrade given by {@code pocket.equip()}/{@code pocket.unequip()}.
|
||||
*
|
||||
* Ideally this should be constant over a session. It is recommended that you cache the item too, in order to prevent constructing it every time the
|
||||
* method is called.
|
||||
*
|
||||
* @return The item stack used for crafting. This can be {@link ItemStack#EMPTY} if crafting is disabled.
|
||||
*/
|
||||
@Nonnull
|
||||
ItemStack getCraftingItem();
|
||||
|
||||
public interface IPocketUpgrade extends IUpgradeBase
|
||||
{
|
||||
/**
|
||||
* Creates a peripheral for the pocket computer.
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -11,7 +11,7 @@ import java.util.OptionalInt;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.Cipher;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
@@ -48,7 +48,7 @@ import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.village.TraderOfferList;
|
||||
import net.minecraft.village.TradeOfferList;
|
||||
import net.minecraft.world.GameMode;
|
||||
|
||||
/**
|
||||
@@ -105,7 +105,7 @@ public class FakePlayer extends ServerPlayerEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendTradeOffers(int id, TraderOfferList list, int level, int experience, boolean levelled, boolean refreshable) { }
|
||||
public void sendTradeOffers(int id, TradeOfferList list, int level, int experience, boolean levelled, boolean refreshable) { }
|
||||
|
||||
@Override
|
||||
public void openHorseInventory(HorseBaseEntity horse, Inventory inventory) { }
|
||||
@@ -252,7 +252,8 @@ public class FakePlayer extends ServerPlayerEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupEncryption(SecretKey key) {
|
||||
public void setupEncryption(Cipher cipher, Cipher cipher2) {
|
||||
super.setupEncryption(cipher, cipher2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
@@ -135,7 +135,7 @@ public interface ITurtleAccess {
|
||||
*
|
||||
* @return This turtle's owner.
|
||||
*/
|
||||
@Nonnull
|
||||
@Nullable
|
||||
GameProfile getOwningPlayer();
|
||||
|
||||
/**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
@@ -10,11 +10,10 @@ import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import dan200.computercraft.api.ComputerCraftAPI;
|
||||
import dan200.computercraft.api.IUpgradeBase;
|
||||
import dan200.computercraft.api.client.TransformedModel;
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
@@ -25,27 +24,8 @@ import net.fabricmc.api.Environment;
|
||||
*
|
||||
* @see ComputerCraftAPI#registerTurtleUpgrade(ITurtleUpgrade)
|
||||
*/
|
||||
public interface ITurtleUpgrade {
|
||||
/**
|
||||
* Gets a unique identifier representing this type of turtle upgrade. eg: "computercraft:wireless_modem" or "my_mod:my_upgrade". You should use a unique
|
||||
* resource domain to ensure this upgrade is uniquely identified. The turtle will fail registration if an already used ID is specified.
|
||||
*
|
||||
* @return The unique ID for this upgrade.
|
||||
* @see ComputerCraftAPI#registerTurtleUpgrade(ITurtleUpgrade)
|
||||
*/
|
||||
@Nonnull
|
||||
Identifier getUpgradeID();
|
||||
|
||||
/**
|
||||
* Return an unlocalised string to describe this type of turtle in turtle item names.
|
||||
*
|
||||
* Examples of built-in adjectives are "Wireless", "Mining" and "Crafty".
|
||||
*
|
||||
* @return The localisation key for this upgrade's adjective.
|
||||
*/
|
||||
@Nonnull
|
||||
String getUnlocalisedAdjective();
|
||||
|
||||
public interface ITurtleUpgrade extends IUpgradeBase
|
||||
{
|
||||
/**
|
||||
* Return whether this turtle adds a tool or a peripheral to the turtle.
|
||||
*
|
||||
@@ -55,18 +35,6 @@ public interface ITurtleUpgrade {
|
||||
@Nonnull
|
||||
TurtleUpgradeType getType();
|
||||
|
||||
/**
|
||||
* Return an item stack representing the type of item that a turtle must be crafted with to create a turtle which holds this upgrade. This item stack is
|
||||
* also used to determine the upgrade given by {@code turtle.equip()}
|
||||
*
|
||||
* Ideally this should be constant over a session. It is recommended that you cache the item too, in order to prevent constructing it every time the
|
||||
* method is called.
|
||||
*
|
||||
* @return The item stack to craft with, or {@link ItemStack#EMPTY} if it cannot be crafted.
|
||||
*/
|
||||
@Nonnull
|
||||
ItemStack getCraftingItem();
|
||||
|
||||
/**
|
||||
* Will only be called for peripheral upgrades. Creates a peripheral for a turtle being placed using this upgrade.
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
@@ -108,6 +108,11 @@ public final class GuiComputer<T extends ContainerComputerBase> extends HandledS
|
||||
return (this.getFocused() != null && this.getFocused().mouseDragged(x, y, button, deltaX, deltaY)) || super.mouseDragged(x, y, button, deltaX, deltaY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseReleased(double mouseX, double mouseY, int button) {
|
||||
return (this.getFocused() != null && this.getFocused().mouseReleased(mouseX, mouseY, button)) || super.mouseReleased(x, y, button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int key, int scancode, int modifiers) {
|
||||
// Forward the tab key to the terminal, rather than moving between controls.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
@@ -76,7 +76,6 @@ public final class ComputerCraftProxyClient implements ClientModInitializer {
|
||||
BlockEntityRendererRegistry.INSTANCE.register(ComputerCraftRegistry.ModTiles.MONITOR_ADVANCED, TileEntityMonitorRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(ComputerCraftRegistry.ModTiles.TURTLE_NORMAL, TileEntityTurtleRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(ComputerCraftRegistry.ModTiles.TURTLE_ADVANCED, TileEntityTurtleRenderer::new);
|
||||
// TODO: ClientRegistry.bindTileEntityRenderer( TileCable.FACTORY, x -> new TileEntityCableRenderer() );
|
||||
|
||||
ClientSpriteRegistryCallback.event(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE)
|
||||
.register(ClientRegistry::onTextureStitchEvent);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,9 +1,8 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
package dan200.computercraft.client.render;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
@@ -95,6 +95,7 @@ public final class ItemPocketRenderer extends ItemMapLikeRenderer {
|
||||
}
|
||||
|
||||
private static void renderFrame(Matrix4f transform, ComputerFamily family, int colour, int width, int height) {
|
||||
RenderSystem.enableBlend();
|
||||
MinecraftClient.getInstance()
|
||||
.getTextureManager()
|
||||
.bindTexture(colour != -1 ? ComputerBorderRenderer.BACKGROUND_COLOUR : ComputerBorderRenderer.getTexture(family));
|
||||
@@ -113,7 +114,6 @@ public final class ItemPocketRenderer extends ItemMapLikeRenderer {
|
||||
}
|
||||
|
||||
private static void renderLight(Matrix4f transform, int colour, int width, int height) {
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.disableTexture();
|
||||
|
||||
float r = ((colour >>> 16) & 0xFF) / 255.0f;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -14,8 +14,8 @@ import net.minecraft.client.render.VertexFormat;
|
||||
import net.minecraft.client.render.VertexFormatElement;
|
||||
import net.minecraft.client.render.VertexFormats;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.util.math.Vector4f;
|
||||
import net.minecraft.util.math.Matrix4f;
|
||||
import net.minecraft.util.math.Quaternion;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
@@ -50,41 +50,31 @@ public final class ModelTransformer {
|
||||
}
|
||||
|
||||
private static BakedQuad doTransformQuad(VertexFormat format, BakedQuad quad, Matrix4f transform) {
|
||||
int[] vertexData = quad.getVertexData()
|
||||
.clone();
|
||||
int offset = 0;
|
||||
int[] vertexData = quad.getVertexData().clone();
|
||||
BakedQuad copy = new BakedQuad(vertexData, -1, quad.getFace(), ((BakedQuadAccess)quad).getSprite(), true);
|
||||
for (int i = 0; i < format.getElements()
|
||||
.size(); ++i) // For each vertex element
|
||||
{
|
||||
VertexFormatElement element = format.getElements()
|
||||
.get(i);
|
||||
if (element.getType() == VertexFormatElement.Type.POSITION && element.getFormat() == VertexFormatElement.Format.FLOAT && element.getSize() == 3) // When we find a position
|
||||
// element
|
||||
|
||||
int offsetBytes = 0;
|
||||
for (int v = 0; v < 4; ++v) {
|
||||
for (VertexFormatElement element : format.getElements()) // For each vertex element
|
||||
{
|
||||
for (int j = 0; j < 4; ++j) // For each corner of the quad
|
||||
int start = offsetBytes / Integer.BYTES;
|
||||
if (element.getType() == VertexFormatElement.Type.POSITION && element.getFormat() == VertexFormatElement.Format.FLOAT) // When we find a position element
|
||||
{
|
||||
int start = offset + j * format.getVertexSize();
|
||||
if ((start % 4) == 0) {
|
||||
start = start / 4;
|
||||
Vector4f pos = new Vector4f(Float.intBitsToFloat(vertexData[start]),
|
||||
Float.intBitsToFloat(vertexData[start+1]),
|
||||
Float.intBitsToFloat(vertexData[start+2]),
|
||||
1);
|
||||
|
||||
// Extract the position
|
||||
Quaternion pos = new Quaternion(Float.intBitsToFloat(vertexData[start]),
|
||||
Float.intBitsToFloat(vertexData[start + 1]),
|
||||
Float.intBitsToFloat(vertexData[start + 2]),
|
||||
1);
|
||||
// Transform the position
|
||||
pos.transform(transform);
|
||||
|
||||
// Transform the position
|
||||
transform.multiply(pos);
|
||||
|
||||
// Insert the position
|
||||
vertexData[start] = Float.floatToRawIntBits(pos.getX());
|
||||
vertexData[start + 1] = Float.floatToRawIntBits(pos.getY());
|
||||
vertexData[start + 2] = Float.floatToRawIntBits(pos.getZ());
|
||||
}
|
||||
// Insert the position
|
||||
vertexData[start] = Float.floatToRawIntBits(pos.getX());
|
||||
vertexData[start+1] = Float.floatToRawIntBits(pos.getY());
|
||||
vertexData[start+2] = Float.floatToRawIntBits(pos.getZ());
|
||||
}
|
||||
offsetBytes += element.getSize();
|
||||
}
|
||||
offset += element.getSize();
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,9 +1,8 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
package dan200.computercraft.client.render;
|
||||
|
||||
import java.io.InputStream;
|
||||
@@ -49,7 +48,6 @@ class MonitorTextureBufferShader {
|
||||
RenderSystem.glUniform1i(uniformWidth, width);
|
||||
RenderSystem.glUniform1i(uniformHeight, height);
|
||||
|
||||
// TODO: Cache this? Maybe??
|
||||
PALETTE_BUFFER.rewind();
|
||||
for (int i = 0; i < 16; i++) {
|
||||
double[] colour = palette.getColour(i);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2019. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
|
@@ -1,9 +1,8 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
package dan200.computercraft.client.render;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Copyright Daniel Ratcliffe, 2011-2021. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
@@ -78,9 +78,10 @@ public class TurtleSmartItemModel implements BakedModel {
|
||||
Identifier overlay = turtle.getOverlay(stack);
|
||||
boolean christmas = HolidayUtil.getCurrentHoliday() == Holiday.CHRISTMAS;
|
||||
String label = turtle.getLabel(stack);
|
||||
boolean flip = label != null && (label.equals("Dinnerbone") || label.equals("Grumm"));
|
||||
// TODO Make TurtleTool render for turtle items again.
|
||||
TurtleModelCombination combo = new TurtleModelCombination(colour != -1, !(leftUpgrade instanceof TurtleTool) ? leftUpgrade : null, !(rightUpgrade instanceof TurtleTool) ? rightUpgrade : null, overlay, christmas, flip);
|
||||
// TODO make upside down turtle items render properly (currently inivisible)
|
||||
//boolean flip = label != null && (label.equals("Dinnerbone") || label.equals("Grumm"));
|
||||
boolean flip = false;
|
||||
TurtleModelCombination combo = new TurtleModelCombination(colour != -1, leftUpgrade, rightUpgrade, overlay, christmas, flip);
|
||||
|
||||
BakedModel model = TurtleSmartItemModel.this.m_cachedModels.get(combo);
|
||||
if (model == null) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user