Skip to content

Commit

Permalink
Misc fixes (#38)
Browse files Browse the repository at this point in the history
* Hyperlink fxes

* Fix borked title

* Add docs for editing color

* Add heads up for materialModification

* shi wuh

* Fix oreVeins.modifyAll() example

* Requested changes
  • Loading branch information
JuiceyBeans authored Sep 26, 2024
1 parent 8ba65c0 commit 6243176
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: Item/Fluid/Energy Storage
!!! note

In general, these containers should be created as `final` fields (that's what we need for the
[SyncData](./SyncData/index.md) system).
[SyncData](../SyncData/index.md) system).
Set their base arguments in the constructor (you can pass args for subclasses to modify).


Expand Down
4 changes: 2 additions & 2 deletions docs/Development/Glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ connects to a dedicated server instead.
The remote side is the part of the game that is **connected to** the game's server side.
It always runs on the [client](#client-side).

This side may not have the same amount of data available to it as the server does (see [SyncData](../SyncData) if you
need to automatically synchronize certain data to the remote side).
This side may not have the same amount of data available to it as the server does (see [SyncData](../Development/SyncData/index.md) if you
need to automatically synchronize certain data to the remote side).
It also does not perform any tick update logic.


Expand Down
2 changes: 1 addition & 1 deletion docs/Gameplay/Steam/Bronze.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Bronze

Bronze is the most important material in the [Steam Age](./index.md).

To prepare the first batch of it you will need [Tin and Copper](/Gameplay/Ore-Generation) just crush the ingots with a GT mortar. And then mix them in a crafting table in _3_ to _1_ proportion. Then smelting to receive the ingot.
To prepare the first batch of it you will need [Tin and Copper](../Ore-Generation.md) just crush the ingots with a GT mortar. And then mix them in a crafting table in _3_ to _1_ proportion. Then smelting to receive the ingot.

![Ingot crushing recipe](./assets/ingot_crushed.png)
![Bronze dust recipe](./assets/bronze_recipe.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ All periodic table elements are present in GT, but some of them don't have any p

Adding fluids to existing materials requires a bit of work with the new FluidStorage system

```js title=fluid_property.js"
```js title="fluid_property.js"

const $FluidProperty = Java.loadClass('com.gregtechceu.gtceu.api.data.chemical.material.properties.FluidProperty');
const $FluidBuilder = Java.loadClass('com.gregtechceu.gtceu.api.fluids.FluidBuilder');
Expand Down Expand Up @@ -71,3 +71,14 @@ You can also add flags to existing materials:

});
```
Editing the color of an existing material:
```js title="material_modification.js"
GTCEuStartupEvents.materialModification(event => {
GTMaterials.BismuthBronze.setMaterialARGB(0x82AD92) //(1)
})
```
1. Most methods in the [``Material`` class](https://github.com/GregTechCEu/GregTech-Modern/blob/1.20.1/src/main/java/com/gregtechceu/gtceu/api/data/chemical/material/Material.java) can be used in the ``materialModification`` event
2 changes: 1 addition & 1 deletion docs/Modpacks/Ore-Generation/01-Customizing-Veins.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ The API for vein modifications is the same as for creating new veins.
```js title="server_scripts/modify_all_veins.js"
GTCEuServerEvents.oreVeins(event => {
event.modifyAll("gtceu:cassiterite_vein", (id, vein) => {
event.modifyAll((id, vein) => {
console.log("Modifying vein: " + id)
vein.density(1.0)
})
Expand Down

0 comments on commit 6243176

Please sign in to comment.