mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-25 06:34:35 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56da63010d | ||
|
|
8ff2f7a618 |
No files matched your search
+6
-6
@@ -1,23 +1,23 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
implementation("com.github.GTNewHorizons:CodeChickenCore:1.4.7:dev")
|
||||
implementation("com.github.GTNewHorizons:NotEnoughItems:2.7.79-GTNH:dev")
|
||||
implementation("com.github.GTNewHorizons:ForgeMultipart:1.6.8:dev")
|
||||
implementation("com.github.GTNewHorizons:CodeChickenCore:1.4.1:dev")
|
||||
implementation("com.github.GTNewHorizons:NotEnoughItems:2.7.38-GTNH:dev")
|
||||
implementation("com.github.GTNewHorizons:ForgeMultipart:1.6.2:dev")
|
||||
|
||||
compileOnly("org.projectlombok:lombok:1.18.24")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.24")
|
||||
|
||||
devOnlyNonPublishable("com.github.GTNewHorizons:waila:1.8.12:dev") {
|
||||
devOnlyNonPublishable("com.github.GTNewHorizons:waila:1.8.4:dev") {
|
||||
transitive = false
|
||||
}
|
||||
devOnlyNonPublishable("com.github.GTNewHorizons:WailaHarvestability:1.3.4-GTNH:dev")
|
||||
devOnlyNonPublishable("com.github.GTNewHorizons:WailaHarvestability:1.3.2-GTNH:dev")
|
||||
|
||||
compileOnly("curse.maven:ee3-65509:2305023") { // https://www.curseforge.com/minecraft/mc-mods/ee3/files/2305023
|
||||
transitive = false
|
||||
}
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Angelica:1.0.0-beta55:api") {
|
||||
compileOnly("com.github.GTNewHorizons:Angelica:1.0.0-beta40:api") {
|
||||
transitive = false
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -37,7 +37,7 @@ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/co
|
||||
|
||||
# Select a default username for testing your mod. You can always override this per-run by running
|
||||
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
|
||||
developmentEnvironmentUserName = Developer
|
||||
developmentEnvironmentUserName = "Developer"
|
||||
|
||||
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
|
||||
# See https://github.com/bsideup/jabel for details on how this works.
|
||||
@@ -151,7 +151,7 @@ modrinthProjectId =
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
||||
modrinthRelations =
|
||||
|
||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.42'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
|
||||
}
|
||||
|
||||
|
||||
@@ -3499,10 +3499,8 @@ public enum Features {
|
||||
// "Stone snake block head");
|
||||
// LanguageRegistry.addName(new ItemStack(snakestone, 1, 13),
|
||||
// "Stone snake block body");
|
||||
|
||||
Carving.chisel.addVariation("stonebricksmooth", stone_snakestone, 1, 20);
|
||||
Carving.chisel.addVariation("stonebricksmooth", stone_snakestone, 13, 21);
|
||||
|
||||
Carving.chisel.addVariation("stonebrick", stone_snakestone, 1, 100);
|
||||
Carving.chisel.addVariation("stonebrick", stone_snakestone, 13, 101);
|
||||
// Carving.chisel.registerOre("snakestoneStone", "snakestoneStone");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -21,34 +21,31 @@ public class BlockConcrete extends BlockCarvable {
|
||||
super();
|
||||
FMLCommonHandler.instance()
|
||||
.bus()
|
||||
.register(new EventHandler());
|
||||
.register(this);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static MovementInput manualInputCheck;
|
||||
|
||||
public class EventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void speedupPlayer(PlayerTickEvent event) {
|
||||
if (event.phase == Phase.START && event.side.isClient()
|
||||
&& event.player.onGround
|
||||
&& event.player instanceof EntityPlayerSP) {
|
||||
if (manualInputCheck == null) {
|
||||
manualInputCheck = new MovementInputFromOptions(Minecraft.getMinecraft().gameSettings);
|
||||
}
|
||||
EntityPlayerSP player = (EntityPlayerSP) event.player;
|
||||
Block below = player.worldObj.getBlock(
|
||||
MathHelper.floor_double(player.posX),
|
||||
MathHelper.floor_double(player.posY) - 2,
|
||||
MathHelper.floor_double(player.posZ));
|
||||
if (below == BlockConcrete.this) {
|
||||
manualInputCheck.updatePlayerMoveState();
|
||||
if (manualInputCheck.moveForward != 0 || manualInputCheck.moveStrafe != 0) {
|
||||
player.motionX *= Configurations.concreteVelocityMult + 0.05;
|
||||
player.motionZ *= Configurations.concreteVelocityMult + 0.05;
|
||||
}
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void speedupPlayer(PlayerTickEvent event) {
|
||||
if (event.phase == Phase.START && event.side.isClient()
|
||||
&& event.player.onGround
|
||||
&& event.player instanceof EntityPlayerSP) {
|
||||
if (manualInputCheck == null) {
|
||||
manualInputCheck = new MovementInputFromOptions(Minecraft.getMinecraft().gameSettings);
|
||||
}
|
||||
EntityPlayerSP player = (EntityPlayerSP) event.player;
|
||||
Block below = player.worldObj.getBlock(
|
||||
MathHelper.floor_double(player.posX),
|
||||
MathHelper.floor_double(player.posY) - 2,
|
||||
MathHelper.floor_double(player.posZ));
|
||||
if (below == this) {
|
||||
manualInputCheck.updatePlayerMoveState();
|
||||
if (manualInputCheck.moveForward != 0 || manualInputCheck.moveStrafe != 0) {
|
||||
player.motionX *= Configurations.concreteVelocityMult + 0.05;
|
||||
player.motionZ *= Configurations.concreteVelocityMult + 0.05;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ public class FullBrightLighting implements CCRenderState.IVertexOperation {
|
||||
if (!state.computeLighting) {
|
||||
return false;
|
||||
}
|
||||
state.pipeline.addDependency(CCRenderState.instance().colourAttrib);
|
||||
state.pipeline.addDependency(CCRenderState.instance().lightCoordAttrib);
|
||||
state.pipeline.addDependency(CCRenderState.colourAttrib);
|
||||
state.pipeline.addDependency(CCRenderState.lightCoordAttrib);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,13 +75,7 @@ public class SubmapManagerAntiblock extends SubmapManagerBase {
|
||||
};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static ThreadLocal<RenderBlocksCTMFullbright> renderBlocksThreadLocal;
|
||||
|
||||
private static void initStatics() {
|
||||
if (renderBlocksThreadLocal == null) {
|
||||
renderBlocksThreadLocal = ThreadLocal.withInitial(RenderBlocksCTMFullbright::new);
|
||||
}
|
||||
}
|
||||
private RenderBlocksCTMFullbright rb;
|
||||
|
||||
private String color;
|
||||
private TextureSubmap submap, submapSmall;
|
||||
@@ -105,8 +99,9 @@ public class SubmapManagerAntiblock extends SubmapManagerBase {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
|
||||
initStatics();
|
||||
RenderBlocksCTMFullbright rb = renderBlocksThreadLocal.get();
|
||||
if (rb == null) {
|
||||
rb = new RenderBlocksCTMFullbright();
|
||||
}
|
||||
rb.setRenderBoundsFromBlock(block);
|
||||
rb.submap = submap;
|
||||
rb.submapSmall = submapSmall;
|
||||
|
||||
@@ -14,13 +14,7 @@ import team.chisel.ctmlib.TextureSubmap;
|
||||
public class SubmapManagerCarpetFloor extends SubmapManagerBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static ThreadLocal<RenderBlocksCTM> renderBlocksThreadLocal;
|
||||
|
||||
private static void initStatics() {
|
||||
if (renderBlocksThreadLocal == null) {
|
||||
renderBlocksThreadLocal = ThreadLocal.withInitial(RenderBlocksCTM::new);
|
||||
}
|
||||
}
|
||||
private RenderBlocksCTM rb;
|
||||
|
||||
private TextureSubmap submap;
|
||||
private TextureSubmap submapSmall;
|
||||
@@ -51,8 +45,9 @@ public class SubmapManagerCarpetFloor extends SubmapManagerBase {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
|
||||
initStatics();
|
||||
RenderBlocksCTM rb = renderBlocksThreadLocal.get();
|
||||
if (rb == null) {
|
||||
rb = new RenderBlocksCTM();
|
||||
}
|
||||
rb.setRenderBoundsFromBlock(block);
|
||||
rb.submap = submap;
|
||||
rb.submapSmall = submapSmall;
|
||||
|
||||
@@ -99,13 +99,7 @@ public class SubmapManagerCombinedCTM extends SubmapManagerBase {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static ThreadLocal<RenderBlocksCombinedCTM> renderBlocksThreadLocal;
|
||||
|
||||
private static void initStatics() {
|
||||
if (renderBlocksThreadLocal == null) {
|
||||
renderBlocksThreadLocal = new ThreadLocal<>();
|
||||
}
|
||||
}
|
||||
private RenderBlocksCTM rb;
|
||||
|
||||
private TextureSubmap submap, smallSubmap;
|
||||
private int size;
|
||||
@@ -139,11 +133,8 @@ public class SubmapManagerCombinedCTM extends SubmapManagerBase {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
|
||||
initStatics();
|
||||
RenderBlocksCombinedCTM rb = renderBlocksThreadLocal.get();
|
||||
if (rb == null) {
|
||||
rb = new RenderBlocksCombinedCTM();
|
||||
renderBlocksThreadLocal.set(rb);
|
||||
}
|
||||
rb.setRenderBoundsFromBlock(block);
|
||||
return rb;
|
||||
|
||||
@@ -16,13 +16,7 @@ import team.chisel.ctmlib.TextureSubmap;
|
||||
public class SubmapManagerSlab implements ISubmapManager {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static ThreadLocal<RenderBlocksCTM> renderBlocksThreadLocal;
|
||||
|
||||
private static void initStatics() {
|
||||
if (renderBlocksThreadLocal == null) {
|
||||
renderBlocksThreadLocal = ThreadLocal.withInitial(RenderBlocksCTM::new);
|
||||
}
|
||||
}
|
||||
private RenderBlocksCTM rb;
|
||||
|
||||
private TextureSubmap submap;
|
||||
private TextureSubmap submapSmall;
|
||||
@@ -55,8 +49,9 @@ public class SubmapManagerSlab implements ISubmapManager {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
|
||||
initStatics();
|
||||
RenderBlocksCTM rb = renderBlocksThreadLocal.get();
|
||||
if (rb == null) {
|
||||
rb = new RenderBlocksCTM();
|
||||
}
|
||||
rb.setRenderBoundsFromBlock(block);
|
||||
rb.submap = submap;
|
||||
rb.submapSmall = submapSmall;
|
||||
|
||||
@@ -48,14 +48,7 @@ public class SubmapManagerSpecialMaterial extends SubmapManagerBase {
|
||||
}
|
||||
};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static ThreadLocal<RenderBlocksCTMFullbright> renderBlocksThreadLocal;
|
||||
|
||||
private static void initStatics() {
|
||||
if (renderBlocksThreadLocal == null) {
|
||||
renderBlocksThreadLocal = ThreadLocal.withInitial(RenderBlocksCTMFullbright::new);
|
||||
}
|
||||
}
|
||||
private RenderBlocksCTMFullbright renderBlocksFullbright;
|
||||
|
||||
private String color;
|
||||
private MaterialType materialType;
|
||||
@@ -83,8 +76,9 @@ public class SubmapManagerSpecialMaterial extends SubmapManagerBase {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
|
||||
initStatics();
|
||||
RenderBlocksCTMFullbright renderBlocksFullbright = renderBlocksThreadLocal.get();
|
||||
if (renderBlocksFullbright == null) {
|
||||
renderBlocksFullbright = new RenderBlocksCTMFullbright();
|
||||
}
|
||||
renderBlocksFullbright.setRenderBoundsFromBlock(block);
|
||||
renderBlocksFullbright.submap = submap;
|
||||
renderBlocksFullbright.submapSmall = submapSmall;
|
||||
|
||||
@@ -79,13 +79,7 @@ public class SubmapManagerVoidstone extends SubmapManagerBase {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static ThreadLocal<RenderBlocksVoidstone> renderBlocksThreadLocal;
|
||||
|
||||
private static void initStatics() {
|
||||
if (renderBlocksThreadLocal == null) {
|
||||
renderBlocksThreadLocal = new ThreadLocal<>();
|
||||
}
|
||||
}
|
||||
private RenderBlocksVoidstone rb;
|
||||
|
||||
private ISubmapManager overlay;
|
||||
private TextureSubmap base;
|
||||
@@ -129,11 +123,8 @@ public class SubmapManagerVoidstone extends SubmapManagerBase {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
|
||||
initStatics();
|
||||
RenderBlocksVoidstone rb = renderBlocksThreadLocal.get();
|
||||
if (rb == null) {
|
||||
rb = new RenderBlocksVoidstone();
|
||||
renderBlocksThreadLocal.set(rb);
|
||||
}
|
||||
RenderBlocks ctx = overlay.createRenderContext(rendererOld, block, world);
|
||||
rb.setRenderBoundsFromBlock(block);
|
||||
|
||||
@@ -49,10 +49,8 @@ public class CTMRenderer implements ISimpleBlockRenderingHandler {
|
||||
world,
|
||||
((ICTMBlock<?>) block).getManager(world, x, y, z, meta),
|
||||
meta);
|
||||
rb.renderAllFaces = rendererOld.renderAllFaces;
|
||||
boolean ret = rb.renderStandardBlock(block, x, y, z);
|
||||
rb.unlockBlockBounds();
|
||||
rb.renderAllFaces = false;
|
||||
return ret;
|
||||
} catch (Throwable t) {
|
||||
CrashReport crashreport = CrashReport.makeCrashReport(t, "Rendering CTM Block");
|
||||
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import com.cricketcraft.chisel.api.IChiselItem;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingRegistry;
|
||||
@@ -67,6 +68,7 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
+ type.name()
|
||||
.toLowerCase());
|
||||
}
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user