Skip to content

Commit 33eac07

Browse files
committed
A few final changes
* Update readme * Reduce rift jitter * Rift size config option * Crafting recipes for colored fabric * Lang strings for config options
1 parent 17c1471 commit 33eac07

9 files changed

Lines changed: 91 additions & 54 deletions

File tree

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Dimensional Doors
2-
[![forthebadge](https://api.travis-ci.org/DimensionalDevelopment/DimDoors.svg)](https://travis-ci.org/DimensionalDevelopment/DimDoors/builds) [![forthebadge](http://forthebadge.com/images/badges/designed-in-etch-a-sketch.svg)](http://forthebadge.com/) [![forthebadge](http://forthebadge.com/images/badges/built-with-science.svg)](http://forthebadge.com/) [![forthebadge](http://forthebadge.com/images/badges/as-seen-on-tv.svg)](http://forthebadge.com/)
2+
[![Build Status](https://api.travis-ci.org/DimensionalDevelopment/DimDoors.svg)](https://travis-ci.org/DimensionalDevelopment/DimDoors/builds)
33

44
## Overview
5-
This is the main repository for the rewrite of Dimensional Doors by StevenRS11. This repository contains the up-to-date code base and commits submitted.
5+
This is the main repository for the rewrite of Dimensional Doors by StevenRS11. This repository contains the up-to-date code base and commits submitted.
66

77
## Discord Server
88
For the main bits, we have a Discord server made specifically for talking about Dimensional Doors. It's also the place where the devs meet to discuss current progress on certain aspects, and get feedback from the team.
@@ -12,15 +12,17 @@ For the main bits, we have a Discord server made specifically for talking about
1212
## Bugs and Suggestions
1313
Experiencing a bug or just have a suggestion that is in-line with the mod's lore? Make a ticket about it!
1414

15-
### For Bugs
16-
- Include the mod version (if it was built by the team)
17-
- Minecraft Version (different versions can experience bugs that are not available in others)
18-
- Forge Version (different versions can experience bugs that are not available in others)
19-
- And a link to the error, preferablly, to PasteBin
15+
### Bug Reports
16+
You can report any bugs you find on [the issues page](https://github.com/DimensionalDevelopment/DimDoors/issues). Please include the following information:
17+
18+
- The version of the mod you're using
19+
- Your Minecraft version (different versions can experience bugs that are not available in others)
20+
- Your forge version (different versions can experience bugs that are not available in others)
21+
- A list of other mods you're using, if the issue does not happen with only Dimensional Doors installed
22+
- A crash report, or preferably a full log (latest.log and debug.log). We have a paste site at https://paste.dimdev.org/
2023

21-
### For Suggestions
22-
- Include a detailed description with what you would like to see in the mod
23-
- It is also recommended that you explain how it can fit into the mods lore.
24+
### Suggestions
25+
For suggestions, please join [our discord server](https://discord.gg/f27hdrM), or [create a Github issue](https://github.com/DimensionalDevelopment/DimDoors/issues). Please include a detailed description with what you would like to see in the mod and explain how it can fit into the mods lore.
2426

2527
## Contributing
2628
There are many ways to contribute to the project. We encourage you to join our Discord server if you have any questions about how to contribute.
@@ -35,7 +37,7 @@ This project uses [Lombok](https://projectlombok.org/) to automatically generate
3537
[This page](https://github.com/DimensionalDevelopment/DimDoors/tree/1.12-WIP/src/main/resources/assets/dimdoors/lang) contains all the currently translated languages. To contribute a translation, start by copying the [en_US.lang file](https://github.com/DimensionalDevelopment/DimDoors/blob/1.12-WIP/src/main/resources/assets/dimdoors/lang/en_US.lang) to a text editor, and saving it as the [correct locale code](https://minecraft.gamepedia.com/Language#Available_languages). Translate **only what is to the right of the = sign**, and then click "Create a new file" on [this page](https://github.com/DimensionalDevelopment/DimDoors/tree/1.12-WIP/src/main/resources/assets/dimdoors/lang) to submit your translation.
3638

3739
### Testing
38-
You can help us test the latest dev release and report bugs before we submit the next beta by downloading and playing using the latest built jar from here: https://github.com/DimensionalDevelopment/DimDoors/releases **IMPORTANT:** These jars are untested and might cause loss of pockets, rift connections, or worlds. Always back up your worlds folder before testing them.
40+
You can help us test the latest dev release and report bugs before we submit the next release by downloading and playing using the latest built jar from here: https://github.com/DimensionalDevelopment/DimDoors/releases **IMPORTANT:** These jars are untested and might cause loss of pockets, rift connections, or worlds. Always back up your worlds folder before testing them.
3941

4042
## Join the Team
4143
Dimensional Development is always looking to expand (there are currently only 4 active members in the team) and introduce new members to the team and community. Join our Discord and talk to us! Tell us how you can help.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dependencies {
3535

3636
// Mod version
3737
version = ext.modversion = "3.0.7"
38-
boolean isBeta = true
38+
boolean isBeta = false
3939
group = "org.dimdev.dimdoors"
4040

4141
// Build number

src/main/java/org/dimdev/dimdoors/client/RiftCrackRenderer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ public static void drawCrack(float riftRotation, LSystem.PolygonInfo poly, doubl
3838
float time = ((Minecraft.getSystemTime() + riftRandom) % 2000000) * motionSpeed;
3939
double[] jitters = new double[jCount];
4040

41-
42-
double jitterScale = size * size * size / 1300f;
41+
double jitterScale = size * size / 1100f;
4342
// We use random constants here on purpose just to get different wave forms
4443
double xJitter = jitterScale * Math.sin(1.1f * time*size) * Math.sin(0.8f * time);
4544
double yJitter = jitterScale * Math.sin(1.2f * time*size) * Math.sin(0.9f * time);

src/main/java/org/dimdev/dimdoors/client/TileEntityFloatingRiftRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private void renderCrack(TileEntityFloatingRift rift, double x, double y, double
4343
GlStateManager.disableTexture2D();
4444
GlStateManager.enableBlend();
4545

46-
RiftCrackRenderer.drawCrack(rift.riftYaw, rift.getCurve(), rift.size / 120, x + 0.5, y + 1.5, z + 0.5);
46+
RiftCrackRenderer.drawCrack(rift.riftYaw, rift.getCurve(), ModConfig.graphics.riftSize * rift.size / 120, x + 0.5, y + 1.5, z + 0.5);
4747

4848
GlStateManager.disableBlend();
4949
GlStateManager.enableTexture2D();

src/main/java/org/dimdev/dimdoors/shared/CommonProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void onPreInitialization(FMLPreInitializationEvent event) {
2828
MinecraftForge.EVENT_BUS.register(EventHandler.class);
2929
MinecraftForge.EVENT_BUS.register(ModBlocks.class);
3030
MinecraftForge.EVENT_BUS.register(ModItems.class);
31-
MinecraftForge.EVENT_BUS.register(CraftingManager.class); // TODO: ModRecipes?
31+
MinecraftForge.EVENT_BUS.register(ModRecipes.class);
3232
MinecraftForge.EVENT_BUS.register(ModSounds.class);
3333
MinecraftForge.EVENT_BUS.register(ModBiomes.class);
3434

src/main/java/org/dimdev/dimdoors/shared/ModConfig.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import static net.minecraftforge.common.config.Config.*;
1111

12+
// TODO: fix missing/removed config options automatically on load
1213
@Config(modid = DimDoors.MODID, name = DimDoors.MODID, category = "")
1314
@Mod.EventBusSubscriber(modid = DimDoors.MODID)
1415
public final class ModConfig {
@@ -51,7 +52,7 @@ public static class General {
5152

5253
@Name("depthSpreadFactor")
5354
@LangKey("dimdoors.general.depthSpreadFactor")
54-
public int depthSpreadFactor = 10;
55+
public int depthSpreadFactor = 20;
5556
}
5657

5758
public static class Pockets {
@@ -136,6 +137,11 @@ public static class Graphics {
136137
@LangKey("dimdoors.graphics.highlightRiftCoreFor")
137138
@RangeInt(min = -1)
138139
public int highlightRiftCoreFor = 15000;
140+
141+
@Name("riftSize")
142+
@LangKey("dimdoors.graphics.riftSize")
143+
@RangeDouble(min = 0)
144+
public double riftSize = 1;
139145
}
140146

141147

src/main/java/org/dimdev/dimdoors/shared/CraftingManager.java renamed to src/main/java/org/dimdev/dimdoors/shared/ModRecipes.java

Lines changed: 52 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
package org.dimdev.dimdoors.shared;
22

3-
import org.dimdev.dimdoors.DimDoors;
4-
import org.dimdev.dimdoors.shared.blocks.ModBlocks;
5-
import org.dimdev.dimdoors.shared.items.ModItems;
63
import net.minecraft.init.Blocks;
74
import net.minecraft.init.Items;
5+
import net.minecraft.item.EnumDyeColor;
86
import net.minecraft.item.ItemStack;
9-
import net.minecraft.item.crafting.IRecipe;
10-
import net.minecraft.item.crafting.ShapedRecipes;
7+
import net.minecraft.item.crafting.*;
8+
import net.minecraft.util.NonNullList;
119
import net.minecraft.util.ResourceLocation;
1210
import net.minecraftforge.common.crafting.CraftingHelper;
1311
import net.minecraftforge.event.RegistryEvent;
1412
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
1513
import net.minecraftforge.oredict.ShapedOreRecipe;
14+
import net.minecraftforge.registries.IForgeRegistry;
15+
import org.dimdev.dimdoors.DimDoors;
16+
import org.dimdev.dimdoors.shared.blocks.ModBlocks;
17+
import org.dimdev.dimdoors.shared.items.ModItems;
1618

17-
public final class CraftingManager {
19+
public final class ModRecipes {
1820

1921
public static ResourceLocation getNameForRecipe(ItemStack output) {
2022
ResourceLocation baseLoc = new ResourceLocation(DimDoors.MODID, output.getItem().getRegistryName().getResourcePath());
2123
ResourceLocation recipeLoc = baseLoc;
2224
int index = 0;
23-
while (net.minecraft.item.crafting.CraftingManager.REGISTRY.containsKey(recipeLoc)) {
25+
while (CraftingManager.REGISTRY.containsKey(recipeLoc)) {
2426
index++;
2527
recipeLoc = new ResourceLocation(DimDoors.MODID, baseLoc.getResourcePath() + "_" + index);
2628
}
@@ -42,79 +44,95 @@ public static IRecipe makeShapedOreRecipe(ItemStack output, Object... params) {
4244
return recipe;
4345
}
4446

47+
public static IRecipe makeShapedlessRecipe(ItemStack output, Object... params) {
48+
ResourceLocation location = getNameForRecipe(output);
49+
NonNullList<Ingredient> ingredients = NonNullList.create();
50+
for (Object obj : params) {
51+
ingredients.add(CraftingHelper.getIngredient(obj));
52+
}
53+
ShapelessRecipes recipe = new ShapelessRecipes(output.getItem().getRegistryName().toString(), output, ingredients);
54+
recipe.setRegistryName(location);
55+
return recipe;
56+
}
57+
4558
@SubscribeEvent
46-
public static void registerRecipes(RegistryEvent.Register<IRecipe> event) { // TODO
47-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.STABLE_FABRIC, 1),
59+
public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {
60+
IForgeRegistry<IRecipe> registry = event.getRegistry();
61+
registry.register(makeShapedRecipe(new ItemStack(ModItems.STABLE_FABRIC),
4862
"yxy", 'x', Items.ENDER_PEARL, 'y', ModItems.WORLD_THREAD));
4963

50-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.IRON_DIMENSIONAL_DOOR, 1),
64+
registry.register(makeShapedRecipe(new ItemStack(ModItems.IRON_DIMENSIONAL_DOOR),
5165
"yxy", 'x', ModItems.STABLE_FABRIC, 'y', Items.IRON_DOOR));
5266

53-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.UNSTABLE_DIMENSIONAL_DOOR, 1),
67+
registry.register(makeShapedRecipe(new ItemStack(ModItems.UNSTABLE_DIMENSIONAL_DOOR),
5468
"xyx", 'x', Items.ENDER_EYE, 'y', Items.IRON_DOOR));
5569

56-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.WOOD_DIMENSIONAL_DOOR, 1),
70+
registry.register(makeShapedRecipe(new ItemStack(ModItems.WOOD_DIMENSIONAL_DOOR),
5771
"yxy", 'x', Items.ENDER_PEARL, 'y', Items.OAK_DOOR));
5872

59-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModBlocks.WOOD_DIMENSIONAL_TRAPDOOR, 1),
73+
registry.register(makeShapedRecipe(new ItemStack(ModBlocks.WOOD_DIMENSIONAL_TRAPDOOR),
6074
"yx", 'x', Items.ENDER_PEARL, 'y', Blocks.TRAPDOOR));
6175

62-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.GOLD_DIMENSIONAL_DOOR, 1),
76+
registry.register(makeShapedRecipe(new ItemStack(ModItems.GOLD_DIMENSIONAL_DOOR),
6377
"yxy", 'x', ModItems.STABLE_FABRIC, 'y', ModItems.GOLD_DOOR));
6478

65-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.GOLD_DOOR, 1),
79+
registry.register(makeShapedRecipe(new ItemStack(ModItems.GOLD_DOOR),
6680
"yy", "yy", "yy", 'y', Items.GOLD_INGOT));
6781

68-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.QUARTZ_DIMENSIONAL_DOOR, 1),
82+
registry.register(makeShapedRecipe(new ItemStack(ModItems.QUARTZ_DIMENSIONAL_DOOR),
6983
"yx", 'x', ModItems.STABLE_FABRIC, 'y', ModItems.QUARTZ_DOOR));
7084

71-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.QUARTZ_DOOR, 1),
72-
"yy", "yy", "yy", 'y', Items.QUARTZ));
85+
registry.register(makeShapedRecipe(new ItemStack(ModItems.QUARTZ_DOOR), "yy", "yy", "yy", 'y', Items.QUARTZ));
7386

74-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.RIFT_BLADE),
87+
registry.register(makeShapedRecipe(new ItemStack(ModItems.RIFT_BLADE),
7588
"y", "y", "x", 'y', ModItems.STABLE_FABRIC, 'x', Items.IRON_SWORD));
76-
89+
7790
//should not be craftable
78-
/*event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.RIFT_CONFIGURATION_TOOL),
91+
/*registry.register(makeShapedRecipe(new ItemStack(ModItems.RIFT_CONFIGURATION_TOOL),
7992
" w ", "xyx", "xzx", 'z', Items.DIAMOND_SHOVEL, 'y', ModItems.STABLE_FABRIC, 'x', ModItems.WORLD_THREAD, 'w', Items.DIAMOND));*/
8093

81-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.RIFT_REMOVER),
94+
registry.register(makeShapedRecipe(new ItemStack(ModItems.RIFT_REMOVER),
8295
"xxx", "xyx", "xxx", 'x', Items.GOLD_INGOT, 'y', Items.ENDER_PEARL));
8396

84-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.RIFT_REMOVER),
97+
registry.register(makeShapedRecipe(new ItemStack(ModItems.RIFT_REMOVER),
8598
" x ", "xyx", " x ", 'x', Items.GOLD_INGOT, 'y', ModItems.STABLE_FABRIC));
8699

87-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.RIFT_SIGNATURE),
100+
registry.register(makeShapedRecipe(new ItemStack(ModItems.RIFT_SIGNATURE),
88101
"xxx", "xyx", "xxx", 'x', Items.IRON_INGOT, 'y', Items.ENDER_PEARL));
89102

90-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.RIFT_SIGNATURE),
103+
registry.register(makeShapedRecipe(new ItemStack(ModItems.RIFT_SIGNATURE),
91104
" x ", "xyx", " x ", 'x', Items.IRON_INGOT, 'y', ModItems.STABLE_FABRIC));
92105

93-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.STABILIZED_RIFT_SIGNATURE),
106+
registry.register(makeShapedRecipe(new ItemStack(ModItems.STABILIZED_RIFT_SIGNATURE),
94107
" x ", "xyx", " x ", 'x', ModItems.STABLE_FABRIC, 'y', ModItems.RIFT_SIGNATURE));
95108

96-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_HELMET),
109+
registry.register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_HELMET),
97110
"xxx", "x x", 'x', ModItems.WORLD_THREAD));
98111

99-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_CHESTPLATE),
112+
registry.register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_CHESTPLATE),
100113
"x x", "xxx", "xxx", 'x', ModItems.WORLD_THREAD));
101114

102-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_LEGGINGS),
115+
registry.register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_LEGGINGS),
103116
"xxx", "x x", "x x", 'x', ModItems.WORLD_THREAD));
104117

105-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_BOOTS),
118+
registry.register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_BOOTS),
106119
"x x", "x x", 'x', ModItems.WORLD_THREAD));
107120

108-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_HELMET),
121+
registry.register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_HELMET),
109122
"xyx", "x x", 'x', ModItems.WORLD_THREAD, 'y', Items.LEATHER_HELMET));
110123

111-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_CHESTPLATE),
124+
registry.register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_CHESTPLATE),
112125
"x x", "xyx", "x x", 'x', ModItems.WORLD_THREAD, 'y', Items.LEATHER_CHESTPLATE));
113126

114-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_LEGGINGS),
127+
registry.register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_LEGGINGS),
115128
"xyx", "x x", "x x", 'x', ModItems.WORLD_THREAD, 'y', Items.LEATHER_LEGGINGS));
116129

117-
event.getRegistry().register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_BOOTS),
130+
registry.register(makeShapedRecipe(new ItemStack(ModItems.WOVEN_WORLD_THREAD_BOOTS),
118131
" y ", "x x", 'x', ModItems.WORLD_THREAD, 'y', Items.LEATHER_BOOTS));
132+
133+
for (int meta = 0; meta <= 15; meta++) {
134+
registry.register(makeShapedlessRecipe(new ItemStack(ModItems.FABRIC, 1, meta),
135+
ModItems.FABRIC, new ItemStack(Items.DYE, 1, EnumDyeColor.byDyeDamage(meta).getMetadata())));
136+
}
119137
}
120138
}

src/main/java/org/dimdev/dimdoors/shared/rifts/destinations/EscapeDestination.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
@Getter @AllArgsConstructor @Builder(toBuilder = true) @ToString
2323
public class EscapeDestination extends RiftDestination {
24-
boolean canEscapeLimbo = false;
24+
@Builder.Default boolean canEscapeLimbo = false;
2525

2626
public EscapeDestination() {}
2727

0 commit comments

Comments
 (0)