Delete page "2025-03-05+Welcome+and+Setup.-"

2025-06-24 22:14:58 +02:00
parent 53e4288e5e
commit 29458bb8de

@ -1,122 +0,0 @@
**Git** https://about.gitlab.com/images/press/git-cheat-sheet.pdf
**Getting Started** https://www.youtube.com/watch?v=oU8-qV-ZtUY&ab_channel=ModdingbyKaupenjoe
https://fabricmc.net/develop/template/
```java
package de.jottyfan.gta.dgp;
import net.fabricmc.api.ClientModInitializer;
/**
* @author jotty
*/
public class GTAGDPClient implements ClientModInitializer {
@Override
public void onInitializeClient() {
}
}
```
in `src/main/resources/fabric.mod.json`:
```json
...
"entrypoints": {
...
"client": [
"de.jottyfan.gta.gdp.GTAGDPClient"
}
}
```
**Custom Items** https://www.youtube.com/watch?v=9xflCDe-Ruw&ab_channel=ModdingbyKaupenjoe
see also: https://git.jottyfan.de/GTA_Minecraft_Fabric_Mod_Development/GTAGDP/commit/bd1d872a52a7392dd16777ead2d9d6be26014b43
```java
package de.jottyfan.gta.gdp.item;
import de.jottyfan.gta.gdp.GTAGDP;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroups;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.util.Identifier;
/**
*
* @author jotty
*
*/
public class ModItems {
public static final Item STUB = registerItem(
Identifier.of(GTAGDP.MOD_ID, "stub"), new Item.Settings());
private static Item registerItem(Identifier identifier, Settings settings) {
return Registry.register(Registries.ITEM, identifier,
new Item(settings.useItemPrefixedTranslationKey()
.registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier))));
}
public static void registerModItems() {
GTAGDP.LOGGER.info("registering mod items for " + GTAGDP.MOD_ID);
ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS)
.register(entries -> {
entries.add(STUB);
});
}
}
```
in `GTAGDP`, modify to:
```java
@Override
public void onInitialize() {
ModItems.registerModItems();
}
```
under `src/main/resources/assets/gtagdp`, add:
- `items/stub.json`
```json
{
"model": {
"type": "minecraft:model",
"model": "gtagdp:item/stub"
}
}
```
- `lang`
- `de_de.json`
```json
{
"item.gtagdp.stub": "Stummel"
}
```
- `en_us.json`
```json
{
"item.gtagdp.stub": "Stub"
}
```
- `models/item/stub.json`
```json
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "gtagdp:item/stub"
}
}
```
- `textures/item/stub.png`
https://git.jottyfan.de/GTA_Minecraft_Fabric_Mod_Development/GTAGDP/src/commit/bd1d872a52a7392dd16777ead2d9d6be26014b43/src/main/resources/assets/gtagdp/textures/item/stub.png
Task: add a ruby; maybe use the icon from here https://minecraft.fandom.com/wiki/Minecraft_Earth:Ruby and modify colors and shape