mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-22 13:19:44 +00:00
* Bump GTNHLib
* Change test block's properties
This makes it easier to test the block overlay
* Update VanillaModels.java
# Conflicts:
# src/main/java/com/gtnewhorizons/angelica/models/VanillaModels.java
* Revert rename
* Rename models
* Sledgehammer out removed abstractions
* Switch to ModelISBRH
* Replace old models
With a single new and interesting model!
* Adapt to GTNHLib
* Remove dead code
* Fix JSON model detection + remove dead code
* Remove direct model renderer
* yet more yote
* Remove ColorABGR
* Remove unused line methods
* Yeet color fully
* publicize nextLong
Technically you don't *need* this on Java 8, but it silences a warning and doesn't break anything so 🤷
* yoten
* Register Angelica for automatic texture loading
* Remove TX-Loader dep
* Make the list mutable
* Remove rebase mistake
* Bump BS + deps
45 lines
1.3 KiB
Java
45 lines
1.3 KiB
Java
package com.gtnewhorizons.angelica.common;
|
|
|
|
import static com.gtnewhorizon.gtnhlib.client.model.ModelISBRH.JSON_ISBRH_ID;
|
|
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.world.World;
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/// Unline {@link BlockError}, this *is* registered on both sides. It's intended to test functionality in a SP
|
|
/// development environment.
|
|
public class BlockTest extends Block {
|
|
|
|
public BlockTest() {
|
|
super(Material.wood);
|
|
setHardness(0.7f);
|
|
}
|
|
|
|
@Override
|
|
public boolean isOpaqueCube() {
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata
|
|
*/
|
|
@Override
|
|
public int onBlockPlaced(@NotNull World worldIn, int x, int y, int z, int side, float subX, float subY, float subZ, int meta) {
|
|
|
|
// Face NORTH if placed up or down
|
|
final var s = ForgeDirection.getOrientation(side);
|
|
if (s == ForgeDirection.UP || s == ForgeDirection.DOWN)
|
|
return 2;
|
|
|
|
// Face the placed side
|
|
return side;
|
|
}
|
|
|
|
@Override
|
|
public int getRenderType() {
|
|
return JSON_ISBRH_ID;
|
|
}
|
|
}
|